Cybersecurity
DevOps Cloud
IT Operations Cloud
You can use the Amazon CloudFront console to display a graphical representation of statistics related to CloudFront Edge locations. LoadRunner DevWeb protocol enables you to collect CloudFront information during script execution and analyze it as part of load test results. The idea is to extract information from responses received from the CloudFront Edge locations and report that information as custom metrics.
DevWeb SDK provides you with the capability to extract values from the web response, by defining the extractors option parameter. Extractors describe the method and conditions to search for required values in the server response and provide some options to manipulate the extracted value. “Transform” is one of these options; it enables the value to be passed to a custom function that is executed each time a new value is captured.
Extractors can be defined for a specific web request, but also globally, so that they are applied on all web requests, without the need to update steps in the script.
To get statistics we use the following extractor:
Figure 1- extractor.png
The value of “X-Amz-Cf-Pop” header represents the Edge location.
The “transform” function will use the extracted value as the “metric” name and report it using the reportDataPoint API without changing it.
Figure 2- transform.png
To activate “statistics report” functionality, the above code snippets should be added manually to the script.
Figure 3- sample.png
Collected statistics can be displayed in LoadRunner Analysis in the User-Defined Data Points graph. The following example uses graph type “Pie” and values type “Count”.
Figure 4- report.png