summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsebres <sebres@users.sourceforge.net>2017-07-03 13:27:47 (GMT)
committersebres <sebres@users.sourceforge.net>2017-07-03 13:27:47 (GMT)
commit2ae514f620d54d6e84cd40faa493265aae2a91fe (patch)
tree44c57e6e435c31947f98ecbbf650c29f36462ffe
parent86897b9570309f5109b17429741bf6ce57f69d2b (diff)
downloadtcl-2ae514f620d54d6e84cd40faa493265aae2a91fe.zip
tcl-2ae514f620d54d6e84cd40faa493265aae2a91fe.tar.gz
tcl-2ae514f620d54d6e84cd40faa493265aae2a91fe.tar.bz2
extended performance test-cases (test-nrt-capability): covering of brief wait-times and other RTS-near constructs.
-rw-r--r--tests-perf/timer-event.perf.tcl29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests-perf/timer-event.perf.tcl b/tests-perf/timer-event.perf.tcl
index fdca695..12b3320 100644
--- a/tests-perf/timer-event.perf.tcl
+++ b/tests-perf/timer-event.perf.tcl
@@ -111,6 +111,34 @@ proc test-exec-new {{reptime 1000}} {
}
}
+proc test-nrt-capability {{reptime 1000}} {
+ _test_run $reptime {
+ # comparison values:
+ {after 0 {set a 5}; update}
+ {after 0 {set a 5}; vwait a}
+
+ # conditional vwait with very brief wait-time:
+ {vwait 1 a}
+ {vwait 0.5 a}
+ {vwait 0.2 a}
+ {vwait 0.1 a}
+ {vwait 0.05 a}
+ {vwait 0.02 a}
+ {vwait 0.01 a}
+ {vwait 0.005 a}
+ {vwait 0.001 a}
+
+ # comparison of update's executing event:
+ {after idle {set a 5}; update -idle -timer}
+ {after 0 {set a 5}; update -idle -timer}
+ {after idle {set a 5}; update -idle}
+ # comparison of vwait's executing event:
+ {after idle {set a 5}; vwait -idle -timer a}
+ {after 0 {set a 5}; vwait -idle -timer a}
+ {after idle {set a 5}; vwait -idle a}
+ }
+}
+
proc test-long {{reptime 1000}} {
_test_run $reptime {
# in-between important event by amount of idle events:
@@ -126,6 +154,7 @@ proc test {{reptime 1000}} {
test-exec $reptime
if {![catch {update -noidle}]} {
test-exec-new $reptime
+ test-nrt-capability $reptime
}
test-long $reptime