本文整理汇总了PHP中pts_client::generate_result_file_graphs方法的典型用法代码示例。如果您正苦于以下问题:PHP pts_client::generate_result_file_graphs方法的具体用法?PHP pts_client::generate_result_file_graphs怎么用?PHP pts_client::generate_result_file_graphs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pts_client
的用法示例。
在下文中一共展示了pts_client::generate_result_file_graphs方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
public static function run($r)
{
$URL = PTS_SAVE_RESULTS_PATH . $r[0];
if (!is_dir($URL . '/result-graphs/')) {
pts_client::generate_result_file_graphs($r[0], PTS_SAVE_RESULTS_PATH . $r[0] . '/');
}
pts_client::display_web_page($URL . '/index.html', null, false, true);
}
示例2: run
public static function run($r)
{
$_REQUEST['force_format'] = 'PNG';
// Force to PNG renderer
$_REQUEST['svg_dom_gd_no_interlacing'] = true;
// Otherwise FPDF will fail
$tdir = pts_client::create_temporary_directory();
pts_client::generate_result_file_graphs($r[0], $tdir);
$result_file = new pts_result_file($r[0]);
$pdf_file = pts_core::user_home_directory() . $r[0] . '.pdf';
$pdf_output = pts_result_file_output::result_file_to_pdf($result_file, $pdf_file, 'F');
echo PHP_EOL . 'Saved To: ' . $pdf_file . PHP_EOL;
}
示例3: regenerate_graphs
public static function regenerate_graphs($result_file_identifier, $full_process_string = false, $extra_graph_attributes = null)
{
$save_to_dir = pts_client::setup_test_result_directory($result_file_identifier);
$generated_graphs = pts_client::generate_result_file_graphs($result_file_identifier, $save_to_dir, $extra_graph_attributes);
$generated = count($generated_graphs) > 0;
if ($generated && $full_process_string) {
echo PHP_EOL . $full_process_string . PHP_EOL;
pts_client::display_web_page(PTS_SAVE_RESULTS_PATH . $result_file_identifier . '/index.html');
}
return $generated;
}
示例4: run
public static function run($r)
{
$_REQUEST['force_format'] = 'PNG';
// Force to PNG renderer
$_REQUEST['svg_dom_gd_no_interlacing'] = true;
// Otherwise FPDF will fail
$tdir = pts_client::create_temporary_directory();
pts_client::generate_result_file_graphs($r[0], $tdir);
$result_file = new pts_result_file($r[0]);
$pdf = new pts_pdf_template($result_file->get_title(), null);
$pdf->AddPage();
$pdf->Image(PTS_CORE_STATIC_PATH . 'images/pts-308x160.png', 69, 85, 73, 38);
$pdf->Ln(120);
$pdf->WriteStatementCenter('www.phoronix-test-suite.com');
$pdf->Ln(15);
$pdf->WriteBigHeaderCenter($result_file->get_title());
$pdf->WriteText($result_file->get_description());
$pdf->AddPage();
$pdf->Ln(15);
$pdf->SetSubject($result_file->get_title() . ' Benchmarks');
//$pdf->SetKeywords(implode(', ', $identifiers));
$pdf->WriteHeader('Test Systems:');
foreach ($result_file->get_systems() as $s) {
$pdf->WriteMiniHeader($s->get_identifier());
$pdf->WriteText($s->get_hardware());
$pdf->WriteText($s->get_software());
//$pdf->WriteText($notes_r[$i]);
}
/*
if(count($identifiers) > 1 && is_file($tdir . 'result-graphs/overview.jpg'))
{
$pdf->AddPage();
$pdf->Ln(100);
$pdf->Image($tdir . 'result-graphs/overview.jpg', 15, 40, 180);
}
*/
$pdf->AddPage();
$placement = 1;
$results = $result_file->get_result_objects();
for ($i = 1; $i <= count($results); $i++) {
if (is_file($tdir . 'result-graphs/' . $i . '.png')) {
$pdf->Ln(100);
$pdf->Image($tdir . 'result-graphs/' . $i . '.png', 50, 40 + ($placement - 1) * 120, 120);
}
if ($placement == 2) {
$placement = 0;
if ($i != count($results)) {
$pdf->AddPage();
}
}
$placement++;
}
// To save:
/*
$pdf_file = 'SAVE_TO';
if(substr($pdf_file, -4) != '.pdf')
{
$pdf_file .= '.pdf';
}
*/
$pdf_file = pts_client::user_home_directory() . $r[0] . '.pdf';
$pdf->Output($pdf_file);
pts_file_io::delete($tdir, null, true);
echo PHP_EOL . 'Saved To: ' . $pdf_file . PHP_EOL;
}
示例5: render_page_process
//.........这里部分代码省略.........
header('Content-Description: File Transfer');
header('Content-Type: application/csv');
header('Content-Disposition: attachment; filename=phoromatic-result.csv');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Length: ' . strlen($result_csv));
ob_clean();
flush();
echo $result_csv;
return;
} else {
if (isset($_GET['download']) && $_GET['download'] == 'txt') {
$result_txt = pts_result_file_output::result_file_to_text($result_file);
header('Content-Description: File Transfer');
header('Content-Type: application/txt');
header('Content-Disposition: attachment; filename=phoromatic-result.txt');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Length: ' . strlen($result_txt));
ob_clean();
flush();
echo $result_txt;
return;
} else {
if (isset($_GET['download']) && $_GET['download'] == 'pdf') {
ob_start();
$_REQUEST['force_format'] = 'PNG';
// Force to PNG renderer
$_REQUEST['svg_dom_gd_no_interlacing'] = true;
// Otherwise FPDF will fail
$tdir = pts_client::create_temporary_directory();
pts_client::generate_result_file_graphs($result_file, $tdir, $extra_attributes);
$pdf = new pts_pdf_template($result_file->get_title(), null);
$pdf->AddPage();
$pdf->Image(PTS_CORE_STATIC_PATH . 'images/pts-308x160.png', 69, 85, 73, 38);
$pdf->Ln(120);
$pdf->WriteStatementCenter('www.phoronix-test-suite.com');
$pdf->Ln(15);
$pdf->WriteBigHeaderCenter($result_file->get_title());
$pdf->WriteText($result_file->get_description());
$pdf->AddPage();
$pdf->Ln(15);
$pdf->SetSubject($result_file->get_title() . ' Benchmarks');
//$pdf->SetKeywords(implode(', ', $identifiers));
$pdf->WriteHeader('Test Systems:');
foreach ($result_file->get_systems() as $s) {
$pdf->WriteMiniHeader($s->get_identifier());
$pdf->WriteText($s->get_hardware());
$pdf->WriteText($s->get_software());
}
$pdf->AddPage();
$placement = 1;
$results = $result_file->get_result_objects();
for ($i = 1; $i <= count($results); $i++) {
if (is_file($tdir . 'result-graphs/' . $i . '.png')) {
$pdf->Ln(100);
$pdf->Image($tdir . 'result-graphs/' . $i . '.png', 50, 40 + ($placement - 1) * 120, 120);
}
if ($placement == 2) {
$placement = 0;
if ($i != count($results)) {
$pdf->AddPage();
}
}