Author: uwendel
Date: 2007-04-17 21:21:47 +0200 (Tue, 17 Apr 2007)
New Revision: 335
Modified:
trunk/tests/ext/mysqli/bench/framework/web/rb_create_csv.php
Log:
Let's export correct figures...
Modified: trunk/tests/ext/mysqli/bench/framework/web/rb_create_csv.php
===================================================================
--- trunk/tests/ext/mysqli/bench/framework/web/rb_create_csv.php 2007-04-17 16:55:11 UTC
(rev 334)
+++ trunk/tests/ext/mysqli/bench/framework/web/rb_create_csv.php 2007-04-17 19:21:47 UTC
(rev 335)
@@ -73,18 +73,22 @@
foreach ($labels as $k => $label) {
foreach ($binaries as $k => $run_id) {
$runtime = $storage->getRuntimeByRunIDAndLabel($run_id, $label);
- $runtimes[$run_id] = $runtime['runtime'];
+ $runtimes[$label][$run_id] = $runtime['runtime'];
}
}
+
$lines[] = $line_bin_label;
foreach ($labels as $k => $label) {
- $fac = 100 / $runtimes[$mysqlnd_run_id];
+ $fac = (0 == $runtimes[$label][$mysqlnd_run_id]) ? 0 : 100 /
$runtimes[$label][$mysqlnd_run_id];
$line = sprintf("%s%s", $label, $sep);
foreach ($binaries as $k => $run_id) {
if ($run_id == $mysqlnd_run_id) {
- $line .= sprintf("%s%s", number_format(100, 2, ',', ''), $sep);
+ if (0 == $fac)
+ $line .= sprintf("%s%s", number_format(0, 3, ',', ''), $sep);
+ else
+ $line .= sprintf("%s%s", number_format(100, 3, ',', ''), $sep);
} else {
- $line .= sprintf("%s%s", number_format($runtimes[$run_id] * $fac, 2, ',', ''),
$sep);
+ $line .= sprintf("%s%s", number_format($runtimes[$label][$run_id] * $fac, 3,
',', ''), $sep);
}
}
$lines[] = substr($line, 0, strlen($sep) * -1);
@@ -95,7 +99,7 @@
foreach ($labels as $k => $label) {
$line = sprintf("%s%s", $label, $sep);
foreach ($binaries as $k => $run_id) {
- $line .= sprintf("%s%s", number_format($runtimes[$run_id], 6, ',', ''), $sep);
+ $line .= sprintf("%s%s", str_replace('.', ',', sprintf("%f",
$runtimes[$label][$run_id])), $sep);
}
$lines[] = substr($line, 0, strlen($sep) * -1);
}
@@ -125,6 +129,8 @@
<form action="<?php print $PHP_SELF; ?>" method="GET">
<font face="sans-serif">
<h1>Extract CSV data for Excel and Co.</h1>
+ <h3>Back</h3>
+ <a href="index.html">Back to the overview page</a>
<h3>Select Run, Binary and Measured Times</h3>
<table cellspacing="2" cellpadding="2" border="1">
<tr>
| Thread |
|---|
| • PHP mysqlnd svn commit: r335 - trunk/tests/ext/mysqli/bench/framework/web | uwendel | 17 Apr |