Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
marcel_olmo
Partner Ambassador
Partner Ambassador

Is there any way to know how much time does it take to load the script?

I mean, if you do a reloadtime(), you'll get the date the script was loaded for last time. But how about the time between the start of the loading and the end of the loading?

If anybody knows how to do it, I'll appreciate that.

Many thanks in advance!

1 Solution

Accepted Solutions
Not applicable

You can allocate variables in the script, so at the start put in:

LET StartOfScript = Now();

And at the end of the script put in:

LET EndOfScript = Now();

And then calculate the time taken in a chart or textbox.

Regards,

Craig

View solution in original post

8 Replies
Not applicable

You can allocate variables in the script, so at the start put in:

LET StartOfScript = Now();

And at the end of the script put in:

LET EndOfScript = Now();

And then calculate the time taken in a chart or textbox.

Regards,

Craig

Not applicable

I use this:


LET SCRIPT_START = now(1);
LET vDURATION = INTERVAL(now(1)-SCRIPT_START);


rbecher
MVP
MVP

Hi Marcel,

we're using a loging table to trace the load script in this way:

LOAD Now() as LogTime, 'Start' as LogStatus AUTOGENERATE(1);
.....load script.....
LOAD Now() as LogTime, 'Step 1' as LogStatus AUTOGENERATE(1);
.....load script.....
LOAD Now() as LogTime, 'End' as LogStatus AUTOGENERATE(1);


- Ralf

Astrato.io Head of R&D
Not applicable

I was working on a batch file for reloading an application today from a scheduled job and I have that logging the start and end time of the reload.

Basically the batch file is set up to generate 2 log files when it reloads the data. The first LOG file it creates captures the start and end time of the reload activity into the 'Reload.log'. If the file doesn't exist it creates it. If it does exist then the '>>' flag appends the date and time and string "Command Line Reload Start" into the log file. The batch file will continue to append the start and end times to the reload.log file unless you either delete the log file or clear all the entries. At this point it will then continue to append data to it.

It then reloads the application using the standard /r flag. Within the app itself I have set the ErrorMode to ZERO in order to suppress any error messages generated during the reload. These are however captured in the generated log file that the application creates.

The batch file then tries to find the string 'Error:' within the generated LOG file and if it finds it, it copies the line of found text into a separate error log file - 'Error.log'. The batch file then adds a further statement to the Reload.log to say the reload is complete. The batch file then closes

** Batch file start**

echo off

echo.

cd\

echo Initialize the log file with Command Line reload...

echo %date% %time% "inforM Command Line Reload Start" >> "C:\Path to the log file\Reload.log"

echo Run QlikView and Reload Data...

"C:\Program Files\QlikView\QV.exe" /r "C:\Path to your App\QlikView.qvw"

echo Look through the log file for Errors...

echo Create Error Log File if a Data Load error is found...

Find /i "Error:" < "C:\Path to your AppQlikView.qvw.log" >> "C:\Path to the log file\Error.log"

echo %date% %time% "Command Line Reload Finished" >>"C:\Path to the log file\Reload.log"



Not applicable

If you turn the Generate logfile option on in the Document Properties ->General tab, you will get a logfile of the script progress generated in the same directory with timings for each step.

regards

Lucy

Not applicable

You can genrate the logfile for the application, from which you come to know the start time and the end time.

Not applicable

Use At the start f your script ..................

LET Start_Time= Now();

Use at the end of the script....................

LET End_Time = Now();

Now use this variable as text in your front end to display time.

Log File will also generate the same and will give you a detailed scheduled of time consumed between start and end.

marcel_olmo
Partner Ambassador
Partner Ambassador
Author

Thank you all of you. I've got everything I need in two different ways to do it. I'll see which one is more useful.

Thanks mates!

See you around!!