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 0f0e283 commit bdbd96bCopy full SHA for bdbd96b
src/Dashboards/Redis/RedisTrait.php
@@ -42,9 +42,9 @@ private function panels(): string {
42
43
$used_memory = (int) $info['memory']['used_memory'];
44
$max_memory = (int) $info['memory']['maxmemory'];
45
- $memory_usage = $max_memory > 0 ? round(($used_memory / $max_memory) * 100, 2) : 0;
46
47
if ($max_memory > 0) { // 0 = unlimited
+ $memory_usage = round(($used_memory / $max_memory) * 100, 2);
48
$used_memory_formatted = ['Used', Format::bytes($used_memory).' ('.$memory_usage.'%)', $memory_usage];
49
} else {
50
$used_memory_formatted = ['Used', Format::bytes($used_memory)];
0 commit comments