formatted code
This commit is contained in:
@@ -159,7 +159,7 @@ func gatherInfoOutput(
|
||||
acc plugins.Accumulator,
|
||||
tags map[string]string,
|
||||
) error {
|
||||
var keyspace_hits, keyspace_misses uint64 = 0,0
|
||||
var keyspace_hits, keyspace_misses uint64 = 0, 0
|
||||
|
||||
scanner := bufio.NewScanner(rdr)
|
||||
for scanner.Scan() {
|
||||
@@ -210,7 +210,7 @@ func gatherInfoOutput(
|
||||
}
|
||||
var keyspace_hitrate float64 = 0.0
|
||||
if keyspace_hits != 0 || keyspace_misses != 0 {
|
||||
keyspace_hitrate = float64(keyspace_hits) / float64(keyspace_hits + keyspace_misses)
|
||||
keyspace_hitrate = float64(keyspace_hits) / float64(keyspace_hits+keyspace_misses)
|
||||
}
|
||||
fmt.Println(keyspace_hitrate)
|
||||
acc.Add("keyspace_hitrate", keyspace_hitrate, tags)
|
||||
|
||||
Reference in New Issue
Block a user