summaryrefslogtreecommitdiffstats
path: root/tests-perf
diff options
context:
space:
mode:
Diffstat (limited to 'tests-perf')
-rw-r--r--tests-perf/clock.perf.tcl21
1 files changed, 18 insertions, 3 deletions
diff --git a/tests-perf/clock.perf.tcl b/tests-perf/clock.perf.tcl
index 2e77a26..52bc91f 100644
--- a/tests-perf/clock.perf.tcl
+++ b/tests-perf/clock.perf.tcl
@@ -19,6 +19,18 @@ proc test-scan {{rep 100000}} {
foreach {comment c} {
"# FreeScan : relative date"
{clock scan "5 years 18 months 385 days" -base 0 -gmt 1}
+ "# FreeScan : relative date with relative weekday"
+ {clock scan "5 years 18 months 385 days Fri" -base 0 -gmt 1}
+ "# FreeScan : relative date with ordinal month"
+ {clock scan "5 years 18 months 385 days next 1 January" -base 0 -gmt 1}
+ "# FreeScan : relative date with ordinal month and relative weekday"
+ {clock scan "5 years 18 months 385 days next January Fri" -base 0 -gmt 1}
+ "# FreeScan : ordinal month"
+ {clock scan "next January" -base 0 -gmt 1}
+ "# FreeScan : relative week"
+ {clock scan "next Fri" -base 0 -gmt 1}
+ "# FreeScan : relative weekday and week offset "
+ {clock scan "next January + 2 week" -base 0 -gmt 1}
"# FreeScan : time only with base"
{clock scan "19:18:30" -base 148863600 -gmt 1}
"# FreeScan : time only without base"
@@ -34,8 +46,9 @@ proc test-scan {{rep 100000}} {
"# FreeScan : time only, zone in string (exchange zones between system / gmt)"
{clock scan "19:18:30 GMT" -base 148863600}
} {
+ if {[string first "**STOP**" $comment] != -1} { return -code error "**STOP**" }
puts "\n% $comment\n% $c"
- puts [clock format [{*}$c]]
+ puts [clock format [{*}$c] -locale en]
puts [time $c $rep]
}
}
@@ -45,15 +58,17 @@ proc test-other {{rep 100000}} {
"# Bad zone"
{catch {clock scan "1 day" -timezone BAD_ZONE}}
} {
+ if {[string first "**STOP**" $comment] != -1} { return -code error "**STOP**" }
puts "\n% $comment\n% $c"
puts [if 1 $c]
puts [time $c $rep]
}
}
+set factor 10; # 50
if 1 {;#
- test-scan 100000
- test-other 50000
+ test-scan [expr 10000 * $factor]
+ test-other [expr 5000 * $factor]
puts \n**OK**
};# \ No newline at end of file