aboutsummaryrefslogtreecommitdiff
path: root/bench.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'bench.tcl')
-rw-r--r--bench.tcl6
1 files changed, 3 insertions, 3 deletions
diff --git a/bench.tcl b/bench.tcl
index 7661a29..91c081b 100644
--- a/bench.tcl
+++ b/bench.tcl
@@ -4,7 +4,7 @@ set benchmarks {}
proc bench {title script} {
global benchmarks batchmode
- set Title [string range "$title [string repeat " " 20]" 0 20]
+ set Title [string range "$title " 0 20]
set failed [catch {time $script} res]
if {$failed} {
@@ -13,8 +13,8 @@ proc bench {title script} {
} else {
set t [lindex $res 0]
lappend benchmarks $title $t
- set ts "[string repeat " " 10]$t"
- set ts [string range $ts end-10 end]
+ set ts " $t"
+ set ts [string range $ts [expr {[string length $ts]-10}] end]
if {!$batchmode} {puts "$Title -$ts microseconds per iteration"}
}
}