コード例 #1
0
ファイル: driver.php プロジェクト: numist/plot-timeline
$d = 100;
require "dejong.fast.php";
unset($renderfile);
$plot->log("returned from dejong.fast.php");
###############################################################################
// make some more data
require "test.php";
$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;
コード例 #2
0
ファイル: functest.php プロジェクト: numist/plot-timeline
$pause = 0;
ini_set("memory_limit", "1M");
error_reporting(E_ALL);
require "plot-timeline.php";
// init new plotter
$plot = new plot_timeline();
$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);
###############################################################################