Artifacts Associated With Ticket 52fd769456
Ticket change [8d337d5086] (rid 215908) by chrstphrchvz on 2023-06-26 01:02:57:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/x-fossil-wiki"
- comment initialized to:
In cmdMZ.test, <tt>_nrt_sleep 0.01</tt> should take at least 10µs to run. But cmdMZ-6.6 assumes that <tt>timerate {_nrt_sleep 0.01} 50</tt> will run <tt>_nrt_sleep 0.01</tt> at least 500 times, with an average time less than 100µs and at a rate greater than 10000 times per second; this is not the case on one of my systems which is running IA-32 (32-bit x86) Linux on a single-core 1.73GHz Pentium M. Are such performance requirements truly necessary for this test? <pre> ==== cmdMZ-6.6 Tcl_TimeRateObjCmd: slower commands take longer, but it remains almost the same time of measument FAILED ==== Contents of test case:<br /> set m1 [timerate {_nrt_sleep 0.01} 50] set m2 [timerate {_nrt_sleep 1.00} 50] list [list \ [expr {[lindex $m1 0] < [lindex $m2 0]}] \ [expr {[lindex $m1 0] < 100}] \ [expr {[lindex $m2 0] > 100}] \ [expr {[lindex $m1 2] > 500}] \ [expr {[lindex $m2 2] < 500}] \ [expr {[lindex $m1 4] > 10000}] \ [expr {[lindex $m2 4] < 10000}] \ [expr {[lindex $m1 6] > 5 && [lindex $m1 6] < 100}] \ [expr {[lindex $m2 6] > 5 && [lindex $m2 6] < 100}] \ ] $m1 $m2; # interesting only in error case.<br /> ---- Result was: {1 0 1 0 1 0 1 1 1} {108.017 µs/# 463 # 9257.8 #/sec 50.012 net-ms} {1093.13 µs/# 46 # 914.80 #/sec 50.284 net-ms} ---- Result should have been (glob matching): {1 1 1 1 1 1 1 1 1} * ==== cmdMZ-6.6 FAILED </pre> - foundin initialized to: "8.6.13"
- is_private initialized to: "0"
- login: "chrstphrchvz"
- priority initialized to: "5 Medium"
- private_contact initialized to: "6133eb3026f9b10aa9b7b48da92ae2834fc225b0"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "chrstphrchvz"
- subsystem initialized to: "06. Time Measurement"
- title initialized to: "cmdMZ-6.6 fails on low performance system"
- type initialized to: "Bug"
Ticket change [dfe2c7a386] (rid 215909) by chrstphrchvz on 2023-06-26 01:04:46:
- comment changed to:
In cmdMZ.test, <tt>_nrt_sleep 0.01</tt> should take at least 10µs to run. But cmdMZ-6.6 assumes that <tt>timerate {_nrt_sleep 0.01} 50</tt> will run <tt>_nrt_sleep 0.01</tt> more than 500 times, with an average time less than 100µs and at a rate greater than 10000 times per second; this is not the case on one of my systems which is running IA-32 (32-bit x86) Linux on a single-core 1.73GHz Pentium M. Are such performance requirements truly necessary for this test? <pre> ==== cmdMZ-6.6 Tcl_TimeRateObjCmd: slower commands take longer, but it remains almost the same time of measument FAILED ==== Contents of test case:<br /> set m1 [timerate {_nrt_sleep 0.01} 50] set m2 [timerate {_nrt_sleep 1.00} 50] list [list \ [expr {[lindex $m1 0] < [lindex $m2 0]}] \ <span style="color:firebrick">[expr {[lindex $m1 0] < 100}] \</span> [expr {[lindex $m2 0] > 100}] \ <span style="color:firebrick">[expr {[lindex $m1 2] > 500}] \</span> [expr {[lindex $m2 2] < 500}] \ <span style="color:firebrick">[expr {[lindex $m1 4] > 10000}] \</span> [expr {[lindex $m2 4] < 10000}] \ [expr {[lindex $m1 6] > 5 && [lindex $m1 6] < 100}] \ [expr {[lindex $m2 6] > 5 && [lindex $m2 6] < 100}] \ ] $m1 $m2; # interesting only in error case.<br /> ---- Result was: {1 0 1 0 1 0 1 1 1} {108.017 µs/# 463 # 9257.8 #/sec 50.012 net-ms} {1093.13 µs/# 46 # 914.80 #/sec 50.284 net-ms} ---- Result should have been (glob matching): {1 1 1 1 1 1 1 1 1} * ==== cmdMZ-6.6 FAILED </pre> - login: "chrstphrchvz"
- mimetype: "text/plain"
- comment changed to:
Ticket change [21019dc046] (rid 215910) by chrstphrchvz on 2023-06-26 01:06:59:
- comment changed to:
In cmdMZ.test, <tt>_nrt_sleep 0.01</tt> should take at least 10µs to run. But cmdMZ-6.6 assumes that <tt>timerate {_nrt_sleep 0.01} 50</tt> will run <tt>_nrt_sleep 0.01</tt> more than 500 times, with an average time less than 100µs and at a rate greater than 10000 times per second; this is not the case on one of my systems which is running IA-32 (32-bit x86) Linux on a single-core 1.73GHz Pentium M. Are such performance requirements truly necessary for this test? <pre> ==== cmdMZ-6.6 Tcl_TimeRateObjCmd: slower commands take longer, but it remains almost the same time of measument FAILED ==== Contents of test case:<br /> set m1 [timerate {_nrt_sleep 0.01} 50] set m2 [timerate {_nrt_sleep 1.00} 50] list [list \ [expr {[lindex $m1 0] < [lindex $m2 0]}] \ <span style="color:firebrick">[expr {[lindex $m1 0] < 100}] \</span> [expr {[lindex $m2 0] > 100}] \ <span style="color:firebrick">[expr {[lindex $m1 2] > 500}] \</span> [expr {[lindex $m2 2] < 500}] \ <span style="color:firebrick">[expr {[lindex $m1 4] > 10000}] \</span> [expr {[lindex $m2 4] < 10000}] \ [expr {[lindex $m1 6] > 5 && [lindex $m1 6] < 100}] \ [expr {[lindex $m2 6] > 5 && [lindex $m2 6] < 100}] \ ] $m1 $m2; # interesting only in error case.<br /> ---- Result was: {1 <span style="color:firebrick">0</span> 1 <span style="color:firebrick">0</span> 1 <span style="color:firebrick">0</span> 1 1 1} {<span style="color:firebrick">108.017</span> µs/# <span style="color:firebrick">463</span> # <span style="color:firebrick">9257.8</span> #/sec 50.012 net-ms} {1093.13 µs/# 46 # 914.80 #/sec 50.284 net-ms} ---- Result should have been (glob matching): {1 1 1 1 1 1 1 1 1} * ==== cmdMZ-6.6 FAILED </pre> - login: "chrstphrchvz"
- mimetype: "text/plain"
- comment changed to:
Ticket change [12da65bc01] (rid 259444) by serhiy.storchaka on 2026-10-20 13:46:54:
- icomment:
The thresholds are unchanged on main, 9.0 and 8.6: cmdMZ-6.6 requires the 10 µs case to cost less than 100 µs per call and to run more than 500 times at more than 10000/s, a fixed budget for the interpreter overhead. A possible fix is to compare it with the 1 ms case instead (ideally 100 times faster; 5 times leaves room for slow systems): <verbatim> - [expr {[lindex $m1 0] < 100}] \ + [expr {[lindex $m1 0] * 5 < [lindex $m2 0]}] \ - [expr {[lindex $m1 2] > 500}] \ + [expr {[lindex $m1 2] > [lindex $m2 2] * 5}] \ - [expr {[lindex $m1 4] > 10000}] \ + [expr {[lindex $m1 4] > [lindex $m2 4] * 5}] \ </verbatim> I could not reproduce the failure (my machine is too fast, also under valgrind), but your numbers pass these checks (108 vs 1093 µs/#, 463 vs 46 #, 9257 vs 914 #/sec). - login: "serhiy.storchaka"
- mimetype: "text/x-fossil-wiki"
- icomment: