aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus@rgdd.se>2023-04-01 20:06:02 +0200
committerRasmus Dahlberg <rasmus@rgdd.se>2023-04-01 20:06:02 +0200
commite7cbe5b4c74d00aa828331d553371a294beb2247 (patch)
tree27cfee166b08fbf529510cf54e2a2ef13b8b6dba
parentda6c86ccb96e7e2f9a1d1102142f214b1b38a203 (diff)
Print measurement duration
-rw-r--r--main.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/main.go b/main.go
index 827eeb2..dfed7eb 100644
--- a/main.go
+++ b/main.go
@@ -78,6 +78,12 @@ func main() {
workAggregator(ctx, opts, answerCh)
}()
+ start := time.Now().Round(time.Second)
+ defer func() {
+ end := time.Now().Round(time.Second)
+ log.Printf("INFO: measurement duration was %v\n", end.Sub(start))
+ }()
+
log.Printf("INFO: generating work\n")
nextLine, readAll := workGenerator(ctx, opts, fp, questionCh)
if !readAll {