lib/iresearch/scripts/Prometheus/INSTALL.md
PythonBenchmark.py script is used to upload IResearch benchmark data to Prometheus. Upload is done throug pushing data to Prometheus PushGateway. Script requires Python 3.8 or above. Pushgateway need to be installed using Pip command: pip install prometheus_client
Script run parameters: python PythonBenchmark.py <Path-to-benchmark-logs> <Platform-used-to-run-benchmark> <Branch-user-to-run-benchmark> < Push-gate-url> <Job-name>
Sample call: python PythonBenchmark.py C:\Data Windows10 master localhost:9091 benchmark
Following metrics are exposed to prometheus: Time Execution time (microseconds) Memory Consumed memory (kbytes) CPU CPU utilization % (across all cores, so values more than 100 are expected) Wall_Clock Elapsed wall clock (seconds) MinorPageFaults Minor (reclaiming a frame) page faults MajorPageFaults Major (requiring I/O) page faults VolContextSwitches Voluntary context switches InvolContextSwitches Involuntary context switches
Each metrics comes with folllwong labels (althrough non-applicapable labels contains <None>): "engine" - Search engine used. IResearch, Lucene. Determined while parsing benchmark logs. "size" - Search dataset size. Determined while parsing benchmark logs. "category" - Benchmarked operation. Determined while parsing benchmark logs. "repeat" - number of test repeats. Determined while parsing benchmark logs. "threads" - number of search/index threads used. Determined while parsing benchmark logs. "random" - random mode. Determined while parsing benchmark logs. "scorer" - scorer used. Determined while parsing benchmark logs. "scorerarg" - scorer-arg used. Determined while parsing benchmark logs. "run" - run number (Each test might be run several times to calculate average results) "calls" - number of benchmark time measured "branch" - Git Branch. Taken from <Branch-user-to-run-benchmark> "platform" - Platform. Taken from <Platform-used-to-run-benchmark> argument "stage" - Query Execution stage.
In order to configure uploading IResearch benchmark results to prometheus it is needed:
3.2 Annotation for tag BUILD should be added to dashboard (included in sample pre-configured dashboard).