Skip to content
This repository was archived by the owner on Mar 31, 2026. It is now read-only.

Commit 91553d8

Browse files
committed
add README for performance microbenchmarks with usage instructions
1 parent a20622c commit 91553d8

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Performance Microbenchmarks
2+
3+
This directory contains performance microbenchmarks for the Python Storage client library.
4+
5+
## Usage
6+
7+
To run the benchmarks, use `pytest` with the `--benchmark-json` flag to specify an output file for the results.
8+
9+
Example:
10+
```bash
11+
pytest --benchmark-json=output.json -vv -s tests/perf/microbenchmarks/reads/test_reads.py
12+
```
13+
14+
### Running a Specific Test
15+
16+
To run a single test, append `::` followed by the test name to the file path.
17+
18+
Example:
19+
```bash
20+
pytest --benchmark-json=output.json -vv -s tests/perf/microbenchmarks/reads/test_reads.py::test_downloads_single_proc_single_coro
21+
```
22+
23+
## Configuration
24+
25+
The benchmarks are configured using `config.yaml` files located in the respective subdirectories (e.g., `reads/config.yaml`).
26+
27+
## Overriding Buckets
28+
29+
You can override the buckets used in the benchmarks by setting environment variables. Please refer to the specific benchmark implementation for the environment variable names.
30+
31+
## Output
32+
33+
The benchmarks produce a JSON file with the results. This file can be converted to a CSV file for easier analysis in spreadsheets using the provided `json_to_csv.py` script.
34+
35+
Example:
36+
```bash
37+
python3 tests/perf/microbenchmarks/json_to_csv.py output.json
38+
```

0 commit comments

Comments
 (0)