testsuite as $suite) { foreach ($suite->testcase as $test) { if (stripos((string)$suite['name'], 'performance') !== false || stripos((string)$test['name'], 'performance') !== false) { $name = (string)$suite['name'] . '#' . (string)$test['name']; $graphs[$name][] = (double)$test['time']; } } } } if (isset($testsuite) && isset($testcase)) { $graphName = $testsuite . '#' . $testcase; $graphData = $graphs[$graphName]; // Create the graph. These two calls are always required $graph = new Graph(650,250); //$graph->SetScale('intint'); $graph->SetScale('textlin'); $graph->yaxis->scale->SetAutoMin(0); $graph->title->Set($testsuite); $graph->subtitle->Set($testcase); $graph->xaxis->title->Set('revision'); $graph->yaxis->title->Set('seconds'); $graph->SetMargin(100, 100, 50, 50); // Create the linear plot $lineplot = new LinePlot($graphData); $lineplot->SetColor('blue'); $graph->xaxis->SetTickLabels($revisions); // Add the plot to the graph $graph->Add($lineplot); // Display the graph $graph->Stroke(); } else { echo ''; echo 'Pick a test and click "show":
'; echo '
'; echo ''; echo ''; echo '
'; echo ''; }