Skip to content

Commit

Permalink
Fix metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
aalda committed Apr 5, 2019
1 parent 0aca63e commit 3c3a77a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion storage/rocks/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package rocks

import (
"fmt"
"strconv"

"github.com/bbva/qed/rocksdb"
"github.com/bbva/qed/storage"
Expand Down Expand Up @@ -897,7 +898,12 @@ func newPerTableMetrics(table storage.Table, store *RocksDBStore) *perTableMetri
Help: fmt.Sprintf("Number of files at level %d.", i),
},
func() float64 {
return float64(store.db.GetUint64PropertyCF(propName, store.cfHandles[table]))
sValue := store.db.GetPropertyCF(propName, store.cfHandles[table])
if sValue != "" {
value, _ := strconv.ParseFloat(sValue, 64)
return value
}
return 0.0
},
))
}
Expand Down

0 comments on commit 3c3a77a

Please sign in to comment.