5 Replies Latest reply: Sep 1, 2014 1:44 AM by Friedrich Hofmann RSS

    Calculate average LOAD_duration of an app loaded several times a day?

    Friedrich Hofmann


      `Hi,

       

      with the help of Shane from the Community I have just been able to write some good code to load, in a loop and one  by one, thus giving me detailes debug_info in the log, ten or eleven files.

      Now I would like to apply the principle to another task:

      - The background is, we need to get a plan of our entire reload_structure which is quite big and getting a bit unclear.

      - So now I would like to calculate the average load_duration of an app which is loaded several times a day (virtually every one)

       

      - I know I can use the >> directory << command to set a kind of standard - the directory Qlikview will use for any following LOAD.

      - Using a SET command, I can set like a mask - all the folders in "DistributionService\1\log" have the word "production" in the name,

         so I write >> SET v_nameformat_applog = '*production*'; <<

      - Then I can start a loop with the key command >> For each Dir in Dirlist('$(v_nameformat_applog') <<

      - Inside that loop, I would like to load just the name

      <=> Unfortunately, there is a structure of directories: Inside "DistributionService\1\Log", there is a directory for every day and inside those, there is a number of directories, one for every reload during that day - and it's in those that I need to look at the end of it.

      That looping business somehow does not seem to work on directories - or I do not know what to put inside the LOAD_statement. I tried with FileBaseName(), but apparently that wasn't it.

       

      I have already tried and found out how to load one single DocumentLog.txt - once I get that far down - and calculate the Load_Duration.

      My idea is loading all the DocumentLogs from the same app from one day and calculating the average.