diff options
author | sebres <sebres@users.sourceforge.net> | 2019-05-24 16:49:32 (GMT) |
---|---|---|
committer | sebres <sebres@users.sourceforge.net> | 2019-05-24 16:49:32 (GMT) |
commit | cb9018a721f8b149c7add1abdda5826c9385c501 (patch) | |
tree | 2156c71fc914fb99c6c1f5f6eab4cdeaf44ebb25 | |
parent | 3ab1f672a4432f15afd982ad5857d67abd7e5db2 (diff) | |
download | tcl-cb9018a721f8b149c7add1abdda5826c9385c501.zip tcl-cb9018a721f8b149c7add1abdda5826c9385c501.tar.gz tcl-cb9018a721f8b149c7add1abdda5826c9385c501.tar.bz2 |
fixes typo ("net" instead of outdated term "nett")
-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 34cc962..a82da3b 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -4476,7 +4476,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 db72a44..e7c8e6c 100644 --- a/tests/cmdMZ.test +++ b/tests/cmdMZ.test @@ -378,10 +378,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] |