diff options
author | sebres <sebres@users.sourceforge.net> | 2019-05-24 17:00:46 (GMT) |
---|---|---|
committer | sebres <sebres@users.sourceforge.net> | 2019-05-24 17:00:46 (GMT) |
commit | 3bf5bf30794cbfd0ef689709d43230525ff7bc8f (patch) | |
tree | 5dd334fe29648942dec60acb6cdcd68655d5a699 | |
parent | c230bbb7b47c5283043c613dfa91ba0a983d5d0f (diff) | |
parent | d249b0629de85329fc55a4e44c994c10021698f3 (diff) | |
download | tcl-3bf5bf30794cbfd0ef689709d43230525ff7bc8f.zip tcl-3bf5bf30794cbfd0ef689709d43230525ff7bc8f.tar.gz tcl-3bf5bf30794cbfd0ef689709d43230525ff7bc8f.tar.bz2 |
merge 8.6
-rw-r--r-- | doc/timerate.n | 2 | ||||
-rw-r--r-- | generic/tclCmdMZ.c | 2 | ||||
-rw-r--r-- | tests-perf/test-performance.tcl | 12 | ||||
-rw-r--r-- | tests/cmdMZ.test | 4 |
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 02f98d1..e8fff16 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -4659,7 +4659,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 418c999..78189e6 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 60cc621..60b104f 100644 --- a/tests/cmdMZ.test +++ b/tests/cmdMZ.test @@ -369,10 +369,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] |