aboutsummaryrefslogtreecommitdiffstats
path: root/examples/stats-client/stats_api.go
diff options
context:
space:
mode:
Diffstat (limited to 'examples/stats-client/stats_api.go')
-rw-r--r--examples/stats-client/stats_api.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/examples/stats-client/stats_api.go b/examples/stats-client/stats_api.go
index 66dd451..0ccfa89 100644
--- a/examples/stats-client/stats_api.go
+++ b/examples/stats-client/stats_api.go
@@ -137,10 +137,15 @@ func main() {
}
n := 0
for _, counter := range stats.Errors {
- if skipZeros && counter.Value == 0 {
+ var sum uint32
+ for _, valuePerWorker := range counter.Values {
+ sum += uint32(valuePerWorker)
+ }
+
+ if skipZeros && sum == 0 {
continue
}
- fmt.Printf(" - %v\n", counter)
+ fmt.Printf(" - %v %d (per worker: %v)\n", counter.CounterName, sum, counter.Values)
n++
}
fmt.Printf("Listed %d (%d) error counters\n", n, len(stats.Errors))