$plot->log("returned from test.php"); ############################################################################### // now to test plotter aggregation $plot->log("closing and reopening plotter", 0x7f7f7f); $plot->saveData("data.txt"); unset($plot); // init new plotter $plot = new plot_timeline(); $plot->loadData("data.txt"); $plot->log("reinstated plotter, " . $plot->entries() . " entries", 0x7f7f7f); ############################################################################### $h = $w = 64; $a = $b = $c = $d = 3; require "dejong.php"; $plot->log("returned from dejong.php"); ############################################################################### // make some more data require "test.php"; $plot->log("returned from test.php"); ############################################################################### $color = 0xffffff; for ($i = 0; $i < 10; $i++) { $plot->log("color test iteration {$i}, color 0x" . dechex($color), $color); $color -= 0x111111; } $plot->log("returned from color test loop"); ############################################################################### // write to file $plot->log("closing plotter"); $plot->saveImage("data.png"); echo "done.\n";
$plot->log("set up logging"); ############################################################################### usleep(round(rand() * $pause / getrandmax())); $plot->log("closing and reopening plotter"); // now to test plotter aggregation $plot->saveData("func.txt"); unset($plot); // init new plotter $plot = new plot_timeline(); $plot->loadData("func.txt"); // use relative paths and log to stdout only $plot->log("reinstated plotter, " . $plot->entries() . " entries"); ############################################################################### usleep(round(rand() * $pause / getrandmax())); $plot->log("testing custom message coloration"); $color = 0xffffff; for ($i = 0; $i < 15; $i++) { if ($i > 0) { usleep(round($pause / 1000)); } $plot->log("color test iteration {$i}, color 0x" . dechex($color), $color); $color -= 0x111111; } unset($color); ############################################################################### // more test cases here... ############################################################################### $plot->log("ok, we're done."); ini_set("memory_limit", "8M"); $plot->saveImage("func.png");