summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsebres <sebres@users.sourceforge.net>2017-01-10 22:58:29 (GMT)
committersebres <sebres@users.sourceforge.net>2017-01-10 22:58:29 (GMT)
commitba4330456f8bb2e2c45c3dfd27f9e7ce1cdaeb52 (patch)
treec57be387f09bc30eea5cdb16aaf97c2b5152cece
parent5b78094ea6b2026c6b28ee878ad1c09b26946bd5 (diff)
downloadtcl-ba4330456f8bb2e2c45c3dfd27f9e7ce1cdaeb52.zip
tcl-ba4330456f8bb2e2c45c3dfd27f9e7ce1cdaeb52.tar.gz
tcl-ba4330456f8bb2e2c45c3dfd27f9e7ce1cdaeb52.tar.bz2
test-performance: added calibration of `timerate` to minimize influence of the parasitical execution-overhead by extremely fast execution times
-rw-r--r--tests-perf/clock.perf.tcl15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests-perf/clock.perf.tcl b/tests-perf/clock.perf.tcl
index f3b8a10..7b522d0 100644
--- a/tests-perf/clock.perf.tcl
+++ b/tests-perf/clock.perf.tcl
@@ -19,11 +19,19 @@
## set testing defaults:
set ::env(TCL_TZ) :CET
-## warm-up (load clock.tcl, system zones, locales, etc.):
+# warm-up interpeter compiler env, clock platform-related features,
+# calibrate timerate measurement functionality:
+puts -nonewline "Calibration ... "; flush stdout
+puts "done: [lrange \
+ [timerate -calibrate {}] \
+0 1]"
+
+## warm-up test-related features (load clock.tcl, system zones, locales, etc.):
clock scan "" -gmt 1
clock scan ""
clock scan "" -timezone :CET
clock scan "" -format "" -locale en
+clock scan "" -format "" -locale de
## ------------------------------------------
@@ -239,6 +247,11 @@ proc test-scan {{reptime 1000}} {
{clock scan "2009-06-30T18:30:00Z" -format "%Y-%m-%dT%H:%M:%S%z"}
{clock scan "2009-06-30T18:30:00 UTC" -format "%Y-%m-%dT%H:%M:%S %z"}
+ # Scan : locale date-time (en):
+ {clock scan "06/30/2009 18:30:15" -format "%x %X" -gmt 1 -locale en}
+ # Scan : locale date-time (de):
+ {clock scan "30.06.2009 18:30:15" -format "%x %X" -gmt 1 -locale de}
+
# Scan : dynamic format (cacheable)
{clock scan "25.11.2015 10:35:55" -format [string trim "%d.%m.%Y %H:%M:%S "] -base 0 -gmt 1}