Results & graphs structure
When you play a script all the results are stored under the directory which name is specified by the --output-dir option.
By default, the output directory name is ./results.
The output directory contains the following files and subdirectories:
js/: directory which containshighcharts.jsandjquery.jsstatic/css/: directory which contains CSS files - here there is onlybootstrap.cssmeta.yml: contains some simple metadata about the load test. For example:
starttime: 2021-08-20T12:49:35.650663732+02:00 endtime: 2021-08-20T12:49:38.682219757+02:00 scriptname: - /tmp/my_playbook.ymlindex.html: the main page which displays the resultsdata.csv: this CSV file contains the measures of each injected requests. This first line gives the column name. TheTimestampcolumn gives the expired time (in nano-seconds) expired since the start of the injection. TheVidcolumn gives the ID of the Virtuel User (VU) that made the request. TheLatencyof the request is also expressed in nano-seconds. TheTypeindicates the type of the action (and so the protocol) used (here, it is only HTTP). TheStatuscolumn show the code returned by the server (here it's a HTTP code since we used HTTP protocol).
The last line of this CSV sample has aTimestamp,Vid,Type,Title,Status,Size,Latency,FullRequest 223080,1568600000,HTTP,Homepage,200,8119,33602814,http://172.20.143.218/ban/index.html 35038017,1568600000,HTTP,Report DEPT,200,32,81984511,http://172.20.143.218/ban/api/private/numReport?type=DEPT 117165315,1568600000,HTTP,Homepage,200,8119,41754524,http://172.20.143.218/ban/index.html ... 363854709,1568600001,HTTP,Homepage,200,8119,11792771,http://172.20.143.218/ban/index.html 375952258,1568600001,HTTP,Report DEPT,200,32,87894624,http://172.20.143.218/ban/api/private/numReport?typeConstat=DEPT ... 843159979,1568600000,HTTP,Report DEPT,200,32,81250046,http://172.20.143.218/ban/api/private/numReport?typeConstat=DEPT 924514932,1568600000,HTTP,Homepage,200,8119,8351343,http://172.20.143.218/ban/index.html 1000000000,,GLOBAL,,0,2,0,typevalue ofGLOBAL. These lines are generated each second. Thesizecolumn is used to store the number of active virtual user at the moment (there are 2 VU here).data.js: this file is generated by theplayerbased on the content of thedata.csvfile. It defines the structure needed by Highcharts to display the graphs. It is read by theindex.htmlfile.
data.csv file, you could develop your own graph generator
with your favorite language and libraries !
In case of distributed injection
In that case the data.csv file is replaced by multiple CSV files, each of them being the result of a single remote injector
(a remote player). For example, if you used two remote injectors like this:
--injectors 10.1.2.3:1234,other_srv:8080, the CSV files will be named 10.1.2.3:1234 and other_srv:8080.
The graphs are generated after merging the single CSV files into a global one named merged.csv. This is the file used to create
the data.js file that will be used for the final rendering in your browser.
How to (re)generate the graphs ?
What is the use case ? You want to patch a CSV file an regenerate the graphs, how could you do this ? Just execute the player in "graph mode":
$ player graph --output-dir /path/to/results --script original-script.yml
This "trick" may also used if you're looking for CI/CD integration.