Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
LET SCRIPT_START = now(1);
table1:
LOAD
1 as F1
AutoGenerate 10000000
;
LET LOAD_DURATION = now(1) - SCRIPT_START;
CALL Log ('Loading table1 took '& interval(LOAD_DURATION,'ss.fff'));
Hi,
Now() will return seconds as the minimum, not fractions of seconds. So in any case two variables with two different values of Now() will store seconds, that's why fractions are not shown.
Hope that helps.
BI Consultant
Hi Thomas,
interesting issue. If you add a small number to LOAD_DURATION like
interval(LOAD_DURATION+1e-006,'dd:hh:mm:ss,fff')
or use the small number without LOAD_DURATION, the fraction will appear, but only showing the addtional number (I tested this with an variable and text box output, I think LOG is a function defined in your script, right?).
I thought of truncation of LOAD_DURATION during interval evaluation, but my modification shouldn't work then neither.
Also printing LOAD_DURATION and sum of LOG_DURATION+1e-006 looks fine.
So I can't see a problem with the format and use of interval function, I am also clueless. This absolutely does not look logically to me.
Sorry, no real answer 😞
Stefan
Hi,
Now() will return seconds as the minimum, not fractions of seconds. So in any case two variables with two different values of Now() will store seconds, that's why fractions are not shown.
Hope that helps.
BI Consultant
Hi Stefan! Log is a subroutine. I'm just, trying to, extend Robs external logging from his cookbook.