You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This directory contains utility scripts for users to run locally to kickstart and analyze APM Server benchmark workflows in different configurations.
4
+
5
+
The scripts here are used to generate the TBS benchmark docs at https://www.elastic.co/docs/solutions/observability/apm/transaction-sampling#_tail_based_sampling_performance_and_requirements
6
+
7
+
To generate non-TBS benchmark, modify the benchmarks workflow inputs in `start-workflows.sh`, and use the other scripts as is.
8
+
9
+
## Workflow
10
+
11
+
1.**Run benchmarks**: Execute `start-workflows.sh` to trigger multiple benchmark workflow runs on GitHub and save run IDs to `${BENCH_BRANCH}.txt`
12
+
2.**Wait for completion**: Monitor the workflow runs on GitHub Actions until all benchmarks finish
13
+
3.**Download results**: Run `download-artifacts.sh` to fetch all benchmark artifacts using the saved run IDs
14
+
4.**Analyze results**: Run `analyze-artifacts.sh` to generate benchstat analysis for each result
15
+
5.**Summarize for documentation**: Create a summary table from the benchstat results for the documentation (can be done manually or using an LLM to extract geomean values from each `benchstat.txt` file)
-`BENCH_BRANCH` (required): The git branch/ref to run the benchmarks against
43
+
44
+
### Description
45
+
46
+
This script triggers 9 benchmark workflow runs with different configurations:
47
+
- Tests 8GB, 16GB, and 32GB instance profiles
48
+
- Compares 3 different TBS disabled vs enabled and disk configurations
49
+
50
+
The script runs configurations sequentially with 2-second delays between each and automatically saves each workflow run ID to `${BENCH_BRANCH}.txt` for later use with `download-artifacts.sh`.
51
+
52
+
The script can be modified to run in any other configurations, e.g. non-TBS.
53
+
54
+
## download-artifacts.sh
55
+
56
+
Downloads benchmark result artifacts from completed GitHub workflow runs.
57
+
58
+
### Usage
59
+
60
+
```bash
61
+
# Download all benchmark results (after running start-workflows.sh)
-`BENCH_BRANCH` (required): The git branch/ref name, used to locate the file containing workflow run IDs
68
+
69
+
### Input
70
+
71
+
Reads workflow run IDs from `${BENCH_BRANCH}.txt` file (one per line). Each benchmark result is downloaded to a numbered directory (`benchmark-result-1`, `benchmark-result-2`, etc.).
72
+
73
+
## analyze-artifacts.sh
74
+
75
+
Generates benchstat analysis for each downloaded benchmark result.
76
+
77
+
### Usage
78
+
79
+
```bash
80
+
./analyze-artifacts.sh
81
+
# Creates benchmark-result-1/benchstat.txt, benchmark-result-2/benchstat.txt, etc.
82
+
```
83
+
84
+
### Description
85
+
86
+
For each `benchmark-result-*/benchmark-result.txt` file, runs `benchstat` and saves the output to `benchstat.txt` in the same directory.
87
+
88
+
### Requirements
89
+
90
+
-`benchstat` must be installed (`go install golang.org/x/perf/cmd/benchstat@latest`)
0 commit comments