Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: dfe2c7a386e2efbfc4854ea764ef3a3d63a26274d3fd0f2552b7f23d1dc9c31c
Ticket: 52fd7694564161f7a1ee24b073a5af8cf5675e08
cmdMZ-6.6 fails on low performance system
User & Date: chrstphrchvz on 2023-06-26 01:04:46
Changes

  1. 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 &#91;timerate {_nrt_sleep 0.01} 50&#93;
        set m2 &#91;timerate {_nrt_sleep 1.00} 50&#93;
        list &#91;list \
    	&#91;expr {&#91;lindex $m1 0&#93; &lt; &#91;lindex $m2 0&#93;}&#93; \
    	<span style="color:firebrick">&#91;expr {&#91;lindex $m1 0&#93; &lt; 100}&#93; \</span>
    	&#91;expr {&#91;lindex $m2 0&#93; &gt; 100}&#93; \
    	<span style="color:firebrick">&#91;expr {&#91;lindex $m1 2&#93; &gt; 500}&#93; \</span>
    	&#91;expr {&#91;lindex $m2 2&#93; &lt; 500}&#93; \
    	<span style="color:firebrick">&#91;expr {&#91;lindex $m1 4&#93; &gt; 10000}&#93; \</span>
    	&#91;expr {&#91;lindex $m2 4&#93; &lt; 10000}&#93; \
    	&#91;expr {&#91;lindex $m1 6&#93; &gt; 5 && &#91;lindex $m1 6&#93; &lt; 100}&#93; \
    	&#91;expr {&#91;lindex $m2 6&#93; &gt; 5 && &#91;lindex $m2 6&#93; &lt; 100}&#93; \
        &#93; $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>
    
  2. login: "chrstphrchvz"
  3. mimetype: "text/plain"