formatted code
This commit is contained in:
parent
5957af19fc
commit
c0d3864c68
|
@ -159,7 +159,7 @@ func gatherInfoOutput(
|
||||||
acc plugins.Accumulator,
|
acc plugins.Accumulator,
|
||||||
tags map[string]string,
|
tags map[string]string,
|
||||||
) error {
|
) error {
|
||||||
var keyspace_hits, keyspace_misses uint64 = 0,0
|
var keyspace_hits, keyspace_misses uint64 = 0, 0
|
||||||
|
|
||||||
scanner := bufio.NewScanner(rdr)
|
scanner := bufio.NewScanner(rdr)
|
||||||
for scanner.Scan() {
|
for scanner.Scan() {
|
||||||
|
@ -210,7 +210,7 @@ func gatherInfoOutput(
|
||||||
}
|
}
|
||||||
var keyspace_hitrate float64 = 0.0
|
var keyspace_hitrate float64 = 0.0
|
||||||
if keyspace_hits != 0 || keyspace_misses != 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)
|
fmt.Println(keyspace_hitrate)
|
||||||
acc.Add("keyspace_hitrate", keyspace_hitrate, tags)
|
acc.Add("keyspace_hitrate", keyspace_hitrate, tags)
|
||||||
|
|
Loading…
Reference in New Issue