This repository contains load generation scripts using k6 to test the performance of the Openbeta API (v1 endpoints).
- Install dependencies:
bun install
The load tests are categorized by query complexity and are located in the v1/ directory.
| Script | Description |
|---|---|
v1/public-light-queries.ts | Tests basic, quick-to-resolve GraphQL queries. |
v1/public-merged-queries.ts | Tests merged queries (multiple simple fields requested). |
v1/public-heavy-queries.ts | Tests complex or data-intensive GraphQL queries. |
To run a test, use the k6 run command:
k6 run v1/public-light-queries.tsTest options such as Virtual Users (vus), Duration (duration), and the target API endpoint (url) are configured directly within each script's options export.
Example from a script:
exportconstoptions={vus: 100,duration: '60s',url: 'http://localhost:4000',// ... other options};