Make "Avg. time" column in the commmand-line benchmark table wider

redux
David Majda 13 years ago
parent c3822835c9
commit 17c1531068

@ -37,14 +37,14 @@ function center(text, length) {
} }
function writeTableHeader() { function writeTableHeader() {
sys.puts("+-------------------------------------+-----------+-----------+--------------+"); sys.puts("+-------------------------------------+-----------+------------+--------------+");
sys.puts("| Test | Inp. size | Avg. time | Avg. speed |"); sys.puts("| Test | Inp. size | Avg. time | Avg. speed |");
} }
function writeHeading(heading) { function writeHeading(heading) {
sys.puts("+-------------------------------------+-----------+-----------+--------------+"); sys.puts("+-------------------------------------+-----------+------------+--------------+");
sys.puts("| " + center(heading, 74) + " |"); sys.puts("| " + center(heading, 75) + " |");
sys.puts("+-------------------------------------+-----------+-----------+--------------+"); sys.puts("+-------------------------------------+-----------+------------+--------------+");
} }
function writeResult(title, inputSize, parseTime) { function writeResult(title, inputSize, parseTime) {
@ -56,7 +56,7 @@ function writeResult(title, inputSize, parseTime) {
+ " | " + " | "
+ padLeft((inputSize / KB).toFixed(2), 6) + padLeft((inputSize / KB).toFixed(2), 6)
+ " kB | " + " kB | "
+ padLeft(parseTime.toFixed(2), 6) + padLeft(parseTime.toFixed(2), 7)
+ " ms | " + " ms | "
+ padLeft(((inputSize / KB) / (parseTime / MS_IN_S)).toFixed(2), 7) + padLeft(((inputSize / KB) / (parseTime / MS_IN_S)).toFixed(2), 7)
+ " kB/s |" + " kB/s |"
@ -64,11 +64,11 @@ function writeResult(title, inputSize, parseTime) {
} }
function writeSeparator() { function writeSeparator() {
sys.puts("+-------------------------------------+-----------+-----------+--------------+"); sys.puts("+-------------------------------------+-----------+------------+--------------+");
} }
function writeTableFooter() { function writeTableFooter() {
sys.puts("+-------------------------------------+-----------+-----------+--------------+"); sys.puts("+-------------------------------------+-----------+------------+--------------+");
} }
/* Helpers */ /* Helpers */

Loading…
Cancel
Save