From b741b2f5b9097dfb96e9fdcc621f29f1c085d986 Mon Sep 17 00:00:00 2001 From: Chris Blum Date: Mon, 29 Jun 2020 12:57:58 +0200 Subject: [PATCH] Pretty print server benchmark results to console --- server/main.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/server/main.go b/server/main.go index fed9f8e..9921fcb 100644 --- a/server/main.go +++ b/server/main.go @@ -145,7 +145,13 @@ func scheduleTests(config common.Testconf) { log.WithField("test", test.Name).Infof("GRAFANA: ?from=%d&to=%d", startTime.UnixNano()/int64(1000000), stopTime.UnixNano()/int64(1000000)) benchResult := sumBenchmarkResults(benchResults) benchResult.Duration = stopTime.Sub(startTime) - log.WithField("test", test.Name).Infof("PERF RESULTS: %+v", benchResult) + log.WithField("test", test.Name). + WithField("Total Operations", benchResult.Operations). + WithField("Total Bytes", benchResult.Bytes). + WithField("Average BW in Byte/s", benchResult.Bandwidth). + WithField("Average latency in ms", benchResult.LatencyAvg). + WithField("Test runtime on server", benchResult.Duration). + Infof("PERF RESULTS") } log.Info("All performance tests finished") for {