Skip to content

Commit

Permalink
Fix percent value in PrintStats()
Browse files Browse the repository at this point in the history
  • Loading branch information
rockdaboot committed Mar 29, 2023
1 parent 608353f commit 1cd86e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lru.go
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,6 @@ func (lru *LRU[K, V]) dump() {
func (lru *LRU[K, V]) PrintStats() {
fmt.Printf("Inserts: %d Collisions: %d (%.2f%%) Evictions: %d Removals: %d\n",
lru.inserts, lru.collisions,
float64(lru.collisions)/float64(lru.inserts),
float64(lru.collisions)/float64(lru.inserts)*100,
lru.evictions, lru.removals)
}

0 comments on commit 1cd86e8

Please sign in to comment.