We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f55665a commit ae6eed6Copy full SHA for ae6eed6
src/Dashboards/Redis/RedisTrait.php
@@ -50,9 +50,10 @@ private function panels(): string {
50
$used_memory_formatted = ['Used', Format::bytes($used_memory)];
51
}
52
53
- $hits = $info['stats']['keyspace_hits'];
54
- $misses = $info['stats']['keyspace_misses'];
55
- $hit_rate = $hits !== 0 ? round(($hits / ($hits + $misses)) * 100, 2) : 0;
+ $hits = (int) $info['stats']['keyspace_hits'];
+ $misses = (int) $info['stats']['keyspace_misses'];
+ $total = $hits + $misses;
56
+ $hit_rate = $total !== 0 ? round(($hits / $total) * 100, 2) : 0;
57
58
$panels = [
59
[
0 commit comments