Some timings on different methods of invoking a shell command and waiting for it to finish before proceeding.

   6!:2 'tmshl=. testShellWaitGapTask 10'
54.895768
   tmshl
 1 0.90646684
 2   2.045727
 3   3.004945
…
9  8.9784859
10  9.9684722
   $tmshl=. tmshl,testShellWaitGapTask 10 [ tmshl=. tmshl,testShellWaitGap...
10 10 2
   [('C:\amisc\J\NYCJUG\200604\') fileVar 'tmshl'    NB. Save these timings and get the others.
   [(<'C:\amisc\J\NYCJUG\200602\') unfileVar_WS_&.> 'tmwts';'tmwe'
   $&.>tmwts;tmwe
+-------+-------+
|10 10 2|10 10 2|
+-------+-------+
   [(<'C:\amisc\J\NYCJUG\200603\') unfileVar_WS_&.> <'tmtsk'
   >,&.>}."1&.>mean &.>tmwe;tmwts;tmtsk;tmshl
1.5979812 2.2556814 3.2297579 3.7779361 5.7840476 6.7776504 6.8326559 7.6...
1.0231155 2.0238059 3.0120209 3.9767511 4.9960696 6.0108432 7.0526843 8.0...
1.0625265 2.0060558 2.9993423  4.035198 4.9880274  6.006053 6.9974078 8.0...
1.0447916 1.9385369 2.9957357 3.9990385 5.0200492 6.0015234 6.9776958 7.9...

{{{ 'key tmwe tmwts tmtsk tmshl' plot >,&.>}."1&.>mean &.>tmwe;tmwts;tmtsk;tmshl

}}} meanTimings.jpg {{{ 'key tmwe tmwts tmtsk tmshl' plot >,&.>}."1&.>stddev &.>tmwe;tmwts;tmt... }}} stddevTimings.jpg {{{ 6!:2 'tmshl60=. testShellWaitGapTask 60' 1776.592

... 58 57.982919 59 59.085524 60 1.3296317

0.89565196

}}} diffsTimings.jpg

NYCJUG/2006-04-11/WaitingForShellCommandToFinish (last edited 2008-12-08 10:45:44 by )