Our legacy site: www.webwob.com   

VUgen scripting methods (page 3)

This page will cover more BASH scripting methods, following on from the legacy site pages.

     LoadRunner CI/CD      *_LR_CI_*      LR_CI_+      Email_out      Email_in      Cookies 1      TUTORIAL      sprintf      debug      VUgen      Kill -9      disk space      AWS S3      dig (DNS++)      substitute      curl with timings      LR_Jenkins_graphs     

    

Areas covered on this page

Step 1: Use curl to get simple performance metrics


Use curl to get simple performance metrics


Command line usage
  
curltime.bat "http://content-v1.core.perf.server.com/content-hubs-list.json"

  
curltime.bat:  
  curl -w "@%~dp0curl-format.txt" -o NUL -s %*
  :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  
[ or from cygwin use this directly:
curl -w "@curl-format.txt" -o /dev/null -s "http://my-request.json"
]

curl-format.txt:
  time_namelookup:  %{time_namelookup}\n
         time_connect:  %{time_connect}\n
      time_appconnect:  %{time_appconnect}\n
     time_pretransfer:  %{time_pretransfer}\n
        time_redirect:  %{time_redirect}\n
   time_starttransfer:  %{time_starttransfer}\n
                      ----------\n
           time_total:  %{time_total}\n
   
  
Notes
I am using cygwin on windows here, hence the use of curl inside a windows batch file!

I did get this technique in detail from here:
https://stackoverflow.com/questions/18215389/how-do-i-measure-request-and-response-times-at-once-using-curl


In practice:
I do have one issue in my case and I probably have to resort to JMeter here, just to make enough calls to get consistent numbers - I can't be sure how much of this variability is due to data caching and how much is due to data lookup and server lag etc. A proper JMeter test would allow us to run for longer and numbers settle down properly. This could be important for management reports etc. (to be fair, this call does bring back a lot of data)

Windows batch file:
Screenshot

cygwin BASH version:
Screenshot