Skip to content

Commit

Permalink
Log worker benchmark results when all info is collected
Browse files Browse the repository at this point in the history
  • Loading branch information
mulbc committed Jun 28, 2020
1 parent 9fe2c1a commit 6787c06
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/aws/aws-sdk-go v1.32.1
github.com/prometheus/client_golang v1.6.0
github.com/prometheus/client_model v0.2.0
github.com/prometheus/common v0.10.0
github.com/prometheus/common v0.10.0 // indirect
github.com/sirupsen/logrus v1.6.0
go.opencensus.io v0.22.3
gopkg.in/yaml.v2 v2.3.0
Expand Down
1 change: 1 addition & 0 deletions worker/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ func connectToServer(serverAddress string) error {
benchResults := getCurrentPromValues(config.Test.Name)
benchResults.Duration = duration
benchResults.Bandwidth = benchResults.Bytes / duration.Seconds()
log.Infof("PROM VALUES %+v", benchResults)
_ = encoder.Encode(common.WorkerMessage{Message: "work done", BenchResult: benchResults})
// Work is done - return to being a ready worker by reconnecting
return nil
Expand Down
1 change: 0 additions & 1 deletion worker/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ func getCurrentPromValues(testName string) common.BenchmarkResult {
benchResult.Operations = sumCounterForTest(resultmap["gosbench_finished_ops"], testName)
benchResult.Bytes = sumCounterForTest(resultmap["gosbench_uploaded_bytes"], testName) + sumCounterForTest(resultmap["gosbench_downloaded_bytes"], testName)
benchResult.LatencyAvg = averageHistogramForTest(resultmap["gosbench_ops_latency"], testName)
log.Infof("PROM VALUES %+v", benchResult)
return benchResult
}

Expand Down

0 comments on commit 6787c06

Please sign in to comment.