From 886b7d9a1b3b09fadb70cf33bf79afd2760eabb3 Mon Sep 17 00:00:00 2001 From: maiha Date: Mon, 29 Aug 2016 19:37:43 +0900 Subject: [PATCH] report: add epochs (started_at - stopped_at) --- src/lib/periodical.cr | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/periodical.cr b/src/lib/periodical.cr index bdcfd67..fff6af6 100644 --- a/src/lib/periodical.cr +++ b/src/lib/periodical.cr @@ -64,8 +64,10 @@ module Periodical def summarize String.build do |io| - hms = @started_at.to_s("%H:%M:%S") - io << "%s (OK:%s, KO:%s) [%s +%s]" % [qps, ok, ko, hms, spent_hms] + hms = @started_at.to_s("%H:%M:%S") + t1 = @started_at.epoch + t2 = stopped_at.epoch + io << "%s (OK:%s, KO:%s) [%s +%s](%d - %d)" % [qps, ok, ko, hms, spent_hms, t1, t2] io << " # #{errors.first}" if errors.any? end end