Skip to content

Commit daf6a08

Browse files
committed
graph/db: fix log precision
1 parent 81ce05f commit daf6a08

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

graph/db/kv_store.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2150,8 +2150,8 @@ func (c *KVStore) ChanUpdatesInHorizon(startTime,
21502150
}
21512151

21522152
if len(edgesInHorizon) > 0 {
2153-
log.Debugf("ChanUpdatesInHorizon hit percentage: %f (%d/%d)",
2154-
float64(hits)/float64(len(edgesInHorizon)), hits,
2153+
log.Debugf("ChanUpdatesInHorizon hit percentage: %.2f (%d/%d)",
2154+
float64(hits)*100/float64(len(edgesInHorizon)), hits,
21552155
len(edgesInHorizon))
21562156
} else {
21572157
log.Debugf("ChanUpdatesInHorizon returned no edges in "+

graph/db/sql_store.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,8 +1103,8 @@ func (s *SQLStore) ChanUpdatesInHorizon(startTime,
11031103
}
11041104

11051105
if len(edges) > 0 {
1106-
log.Debugf("ChanUpdatesInHorizon hit percentage: %f (%d/%d)",
1107-
float64(hits)/float64(len(edges)), hits, len(edges))
1106+
log.Debugf("ChanUpdatesInHorizon hit percentage: %.2f (%d/%d)",
1107+
float64(hits)*100/float64(len(edges)), hits, len(edges))
11081108
} else {
11091109
log.Debugf("ChanUpdatesInHorizon returned no edges in "+
11101110
"horizon (%s, %s)", startTime, endTime)

0 commit comments

Comments
 (0)