subdivide graph hours im tired of being in front of the computer
This commit is contained in:
+11
-1
@@ -63,12 +63,22 @@ header("Content-Type: image/png");
|
|||||||
include "../../lib/graph_gen.php";
|
include "../../lib/graph_gen.php";
|
||||||
$graph = new graph();
|
$graph = new graph();
|
||||||
|
|
||||||
|
$c = count($real_requests);
|
||||||
|
|
||||||
|
if($c > 25){
|
||||||
|
|
||||||
|
$c = 25;
|
||||||
|
}elseif($c <= 2){
|
||||||
|
|
||||||
|
$c = 2;
|
||||||
|
}
|
||||||
|
|
||||||
echo $graph->render([
|
echo $graph->render([
|
||||||
"title" => "Number of requests within the last 72 hours (non-cummulative)",
|
"title" => "Number of requests within the last 72 hours (non-cummulative)",
|
||||||
"subtitle" => date("jS M y @ g:ia", time()) . " || 24h=" . number_format($real_reqs_24h) . ", 72h=" . number_format($real_reqs_72h) . " || " . config::SERVER_NAME,
|
"subtitle" => date("jS M y @ g:ia", time()) . " || 24h=" . number_format($real_reqs_24h) . ", 72h=" . number_format($real_reqs_72h) . " || " . config::SERVER_NAME,
|
||||||
"x_label" => "<= Hours passed =>",
|
"x_label" => "<= Hours passed =>",
|
||||||
"y_label" => "<= Request count/hour =>",
|
"y_label" => "<= Request count/hour =>",
|
||||||
"grad_x" => 25,
|
"grad_x" => $c,
|
||||||
"grad_y" => 20,
|
"grad_y" => 20,
|
||||||
"data" => [
|
"data" => [
|
||||||
"Bot requests" => $bot_requests,
|
"Bot requests" => $bot_requests,
|
||||||
|
|||||||
Reference in New Issue
Block a user