Operational Diagnostics Reports
Saturation Marker Report
Compute a saturation percentage from used and capacity values and classify the fill level.
saturation marker
A saturation marker converts raw usage into a percentage label that signals capacity pressure.
Saturation Marker Report
saturation_marker.php
Replay: real traced execution (multi-file project)
<?php
$used = 78;
$capacity = 100;
$percent = intdiv($used * 100, $capacity);
$satStatus = "clear";
if ($percent >= 90) {
$satStatus = "saturated";
} elseif ($percent >= 70) {
$satStatus = "warm";
}
echo "used=" . $used . " percent=" . $percent . " status=" . $satStatus . "\n";
<?php
$used = 45;
$capacity = 100;
$percent = intdiv($used * 100, $capacity);
$satStatus = "clear";
if ($percent >= 90) {
$satStatus = "saturated";
} elseif ($percent >= 70) {
$satStatus = "warm";
}
echo "used=" . $used . " percent=" . $percent . " status=" . $satStatus . "\n";
<?php
$used = 96;
$capacity = 100;
$percent = intdiv($used * 100, $capacity);
$satStatus = "clear";
if ($percent >= 90) {
$satStatus = "saturated";
} elseif ($percent >= 70) {
$satStatus = "warm";
}
echo "used=" . $used . " percent=" . $percent . " status=" . $satStatus . "\n";
$used ← 78, $capacity ← 100, $percent ← 78, $satStatus ← clear
1<?php2$used→ 78 = 78; //@used=45, 963$capacity→ 100 = 100;4$percent→ 78 = intdiv($used78 * 100, $capacity100);5$satStatus→ clear = "clear";67if ($percent >= 90) {8 $satStatus = "saturated";9} elseif ($percent >= 70) {10 $satStatus→ warm = "warm";11}1213echo "used=" . $used78 . " percent=" . $percent78 . " status=" . $satStatuswarm . "\n";outputused=78 percent=78 status=warm
$used ← 45, $capacity ← 100, $percent ← 45, $satStatus ← clear
1<?php2$used→ 45 = 45;3$capacity→ 100 = 100;4$percent→ 45 = intdiv($used45 * 100, $capacity100);5$satStatus→ clear = "clear";67if ($percent >= 90) {8 $satStatus = "saturated";9} elseif ($percent >= 70) {10 $satStatus = "warm";11}1213echo "used=" . $used45 . " percent=" . $percent45 . " status=" . $satStatusclear . "\n";outputused=45 percent=45 status=clear
$used ← 96, $capacity ← 100, $percent ← 96, $satStatus ← clear
1<?php2$used→ 96 = 96;3$capacity→ 100 = 100;4$percent→ 96 = intdiv($used96 * 100, $capacity100);5$satStatus→ clear = "clear";$satStatus ← saturated
7if ($percent96 >= 90) {8 $satStatus→ saturated = "saturated";9} elseif ($percent >= 70) {echo "used=" . $used . " percent=" . $percent . " status=" . $satStatu…
13echo "used=" . $used96 . " percent=" . $percent96 . " status=" . $satStatussaturated . "\n";outputused=96 percent=96 status=saturated