summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsebres <sebres@users.sourceforge.net>2019-05-24 16:56:29 (GMT)
committersebres <sebres@users.sourceforge.net>2019-05-24 16:56:29 (GMT)
commitd249b0629de85329fc55a4e44c994c10021698f3 (patch)
tree2a138a2b83cde2767ef54c2bad51ff7b62dd42ea
parente298c2595dd09f5e4ad00b1e42251c2ac5a4f51a (diff)
parentcb9018a721f8b149c7add1abdda5826c9385c501 (diff)
downloadtcl-d249b0629de85329fc55a4e44c994c10021698f3.zip
tcl-d249b0629de85329fc55a4e44c994c10021698f3.tar.gz
tcl-d249b0629de85329fc55a4e44c994c10021698f3.tar.bz2
merge 8.5
-rw-r--r--doc/timerate.n2
-rw-r--r--generic/tclCmdMZ.c2
-rw-r--r--tests-perf/test-performance.tcl12
-rw-r--r--tests/cmdMZ.test4
4 files changed, 10 insertions, 10 deletions
diff --git a/doc/timerate.n b/doc/timerate.n
index 636d9de..c5fdf30 100644
--- a/doc/timerate.n
+++ b/doc/timerate.n
@@ -41,7 +41,7 @@ iterations is reached or the time is exceeded.
It will then return a canonical tcl-list of the form:
.PP
.CS
-\fB0.095977 \(mcs/# 52095836 # 10419167 #/sec 5000.000 nett-ms\fR
+\fB0.095977 \(mcs/# 52095836 # 10419167 #/sec 5000.000 net-ms\fR
.CE
.PP
which indicates:
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index 2cadce8..183db0b 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.c
@@ -4799,7 +4799,7 @@ Tcl_TimeRateObjCmd(
} else {
objs[6] = Tcl_NewWideIntObj(0);
}
- TclNewLiteralStringObj(objs[7], "nett-ms");
+ TclNewLiteralStringObj(objs[7], "net-ms");
}
/*
diff --git a/tests-perf/test-performance.tcl b/tests-perf/test-performance.tcl
index 99a4e47..a05c380 100644
--- a/tests-perf/test-performance.tcl
+++ b/tests-perf/test-performance.tcl
@@ -51,13 +51,13 @@ proc _test_out_total {} {
set mintm 0x7fffffff
set maxtm 0
- set nett 0
+ set nettm 0
set wtm 0
set wcnt 0
set i 0
foreach tm $_(itm) {
if {[llength $tm] > 6} {
- set nett [expr {$nett + [lindex $tm 6]}]
+ set nettm [expr {$nettm + [lindex $tm 6]}]
}
set wtm [expr {$wtm + [lindex $tm 0]}]
set wcnt [expr {$wcnt + [lindex $tm 2]}]
@@ -69,15 +69,15 @@ proc _test_out_total {} {
puts [string repeat ** 40]
set s [format "%d cases in %.2f sec." $tcnt [expr {([clock milliseconds] - $_(starttime)) / 1000.0}]]
- if {$nett > 0} {
- append s [format " (%.2f nett-sec.)" [expr {$nett / 1000.0}]]
+ if {$nettm > 0} {
+ append s [format " (%.2f net-sec.)" [expr {$nettm / 1000.0}]]
}
puts "Total $s:"
lset _(m) 0 [format %.6f $wtm]
lset _(m) 2 $wcnt
- lset _(m) 4 [format %.3f [expr {$wcnt / (($nett ? $nett : ($tcnt * [lindex $_(reptime) 0])) / 1000.0)}]]
+ lset _(m) 4 [format %.3f [expr {$wcnt / (($nettm ? $nettm : ($tcnt * [lindex $_(reptime) 0])) / 1000.0)}]]
if {[llength $_(m)] > 6} {
- lset _(m) 6 [format %.3f $nett]
+ lset _(m) 6 [format %.3f $nettm]
}
puts $_(m)
puts "Average:"
diff --git a/tests/cmdMZ.test b/tests/cmdMZ.test
index b574886..4286bbb 100644
--- a/tests/cmdMZ.test
+++ b/tests/cmdMZ.test
@@ -373,10 +373,10 @@ test cmdMZ-6.4 {Tcl_TimeRateObjCmd: compile of script happens even with negative
list [catch {timerate "foreach a {c d e} \{" -12456} msg] $msg
} {1 {missing close-brace}}
test cmdMZ-6.5a {Tcl_TimeRateObjCmd: result format and one iteration} {
- regexp {^\d+(?:\.\d+)? \ws/# 1 # \d+(?:\.\d+)? #/sec \d+(?:\.\d+)? nett-ms$} [timerate {} 0]
+ regexp {^\d+(?:\.\d+)? \ws/# 1 # \d+(?:\.\d+)? #/sec \d+(?:\.\d+)? net-ms$} [timerate {} 0]
} 1
test cmdMZ-6.5b {Tcl_TimeRateObjCmd: result format without iterations} {
- regexp {^0 \ws/# 0 # 0 #/sec 0 nett-ms$} [timerate {} 0 0]
+ regexp {^0 \ws/# 0 # 0 #/sec 0 net-ms$} [timerate {} 0 0]
} 1
test cmdMZ-6.6 {Tcl_TimeRateObjCmd: slower commands take longer, but it remains almost the same time of measument} {
set m1 [timerate {_nrt_sleep 0} 20]