Correction SS-2367
1 vote

[silent mode] -w returns misleading feedback

Created by Davide on 8/6/2016 7:02 PM Last Updated by Davide on 8/7/2016 8:43 PM
Logged: 0   (hrs)


Tests made with attachment.


SMathStudio_Desktop.exe -silent -t "test" -w 10000

returns > Testing failed (1058 ms): "Region (#0) error differs. Expected: NoError, actual: NotDefined.".

that is ok


SMathStudio_Desktop.exe -silent -t "test" -w 10

returns > File tested OK (841 ms).

that is not ok; I expect something like "File test aborted (> 10ms)". Note that in this case we have a false negative (file seems ok even if it is not).

    Davide (Sunday, August 7, 2016 8:42 PM) #

Thank you for the hints Andrey :)

With a more heavy worksheet (placed as 2nd worksheet, just in case) I was able to test a wider range of thresholds; I see that if I choose one higher enough, a "ProcessInterruptedByUser" is triggered in the errors (- Testing failed (4030 ms): "Region (#137) error differs. Expected: NoError, actual: ProcessingInterruptedByUser.".); when the threshold is low enough (approx 1 second or less on my notebook) the document falls in the "File tested OK" false message . Seems to me that this happens if the evaluation is stopped before starting calculations (?).

I know are edgi cases, just something to consider (and I'm fine it's not a swiss clock - maybe you might change the front-end input from milliseconds to seconds [or even minutes] to make it more consistant)

    smath (Saturday, August 6, 2016 8:57 PM) #

In addition:

  1. Output time shown in CMD will always be a bit greater then set by -w parameter (at least 5-10 ms, but greater).
  2. -w parameter were implemeted to limit time like a minute, or ten minutes in order to ensure application will finish work in all possible cases (even in case of dead loop). So big accuracy is not what is really expected for this functionality.

    smath (Saturday, August 6, 2016 8:51 PM) #

Davide, hello.

There are two possible reasons:

  1. Precompilation (true only for the first worksheet). Time shown in output is a real time required to process a worksheet and it includes background work of the PC.
  2. There are several cases when it is impossible to abort calculation when it is requested. In that case application have to finish current iteration (i.e. background operation) and only afterwards do abort.

To see what is the real reason in your case, just try to process two files where worksheet in interest should be the second one.