Skip to content

Commit

Permalink
Update RedisTrait.php
Browse files Browse the repository at this point in the history
  • Loading branch information
RobiNN1 committed Oct 29, 2024
1 parent f52e70e commit 9b63720
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Dashboards/Redis/RedisTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ private function panels(): string {

$used_memory = (int) $info['memory']['used_memory'];
$max_memory = (int) $info['memory']['maxmemory'];
$memory_usage = round(($used_memory / $max_memory) * 100, 2);
$memory_usage = $max_memory > 0 ? round(($used_memory / $max_memory) * 100, 2) : 0;

$panels = [
[
Expand Down

0 comments on commit 9b63720

Please sign in to comment.