github.com/grafana/pyroscope@v1.18.0/tools/k6/README.md (about)

     1  # Load testing for Pyroscope
     2  
     3  This directory contains load test scripts and helpers. Load test scripts are stored in the `tests` directory, whilst helper functions are kept in `lib`.
     4  
     5  ## Quick start
     6  
     7  ### TL;DR
     8  
     9  To run a test against a local Pyroscope, run
    10  
    11  ```bash
    12  ./run.sh testname
    13  ```
    14  
    15  To run a test from k6 cloud, run
    16  
    17  ```bash
    18  ./run.sh -c testname
    19  ```
    20  
    21  Keep in mind when running from k6 cloud, you will need to have a properly configured `.env` file.
    22  
    23  ### Configuration options
    24  
    25  Each load test can be configured with specific environment variables. Descriptions of these variables and their defaults can be found in the `.env.template` file. To modify a test's behavior, copy `.env.template` to `.env`, then modify the variables how you see fit. Once done, `run.sh` will use the new values to configure the test's behavior.
    26  
    27  ## Tests
    28  
    29  ### `read.js`
    30  
    31  This will run load tests targeting Pyroscope's read API. It issues the following queries in "last 1 hour" and "last 24 hour" time windows:
    32  
    33  - `SelectMergeProfile`
    34  - `/render`
    35  - `SelectMergeStacktraces`
    36  - `LabelNames`
    37  - `Series`
    38  - `/render-diff`