diff options
-rw-r--r-- | main.go | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -21,6 +21,12 @@ import ( ) func main() { + 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)) + }() + opts := options.Parse() cli := &http.Client{ Transport: &http.Transport{ @@ -48,12 +54,6 @@ func main() { ctx, cancel := context.WithCancel(bg) defer cancel() - 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: ctrl+C to exit prematurely\n") go func() { wg.Add(1) |