Skip to content

Commit f49854c

Browse files
committed
update benchmark
Signed-off-by: Gregor Zeitlinger <[email protected]>
1 parent 2103314 commit f49854c

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
if here not in sys.path:
1010
sys.path.insert(0, here)
1111

12-
from run_benchmarks import update_pre_blocks_under_module
12+
from update_benchmarks import update_pre_blocks_under_module
1313

1414

1515
class TestRunBenchmarksFiltering(unittest.TestCase):
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
#!/usr/bin/env python3
22

33
#MISE description="Run and update JMH benchmark outputs in the benchmarks module"
4+
#MISE alias="update-benchmarks"
45

56
"""
67
Run benchmarks for the `benchmarks` module, capture JMH text output, and update
78
any <pre>...</pre> blocks containing "thrpt" under the `benchmarks/` module
89
(files such as Java sources with embedded example output in javadocs).
910
10-
Usage: ./scripts/run_benchmarks.py [--mvnw ./mvnw] [--module benchmarks] [--java java] [--jmh-args "-f 1 -wi 0 -i 1"]
11+
Usage: ./scripts/update_benchmarks.py [--mvnw ./mvnw] [--module benchmarks] [--java java] [--jmh-args "-f 1 -wi 0 -i 1"]
1112
1213
By default this will:
1314
- run the maven wrapper to package the benchmarks: `./mvnw -pl benchmarks -am -DskipTests package`

benchmarks/README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Run benchmarks and update the results in the Javadoc of the benchmark classes:
88

99
```shell
10-
mise run run-benchmarks
10+
mise run update-benchmarks
1111
```
1212

1313
### Running benchmarks manually
@@ -26,8 +26,9 @@ java -jar ./benchmarks/target/benchmarks.jar CounterBenchmark
2626

2727
See Javadoc of the benchmark classes:
2828

29-
- [CounterBenchmark](https://github.com/prometheus/client_java/blob/1.0.x/benchmarks/src/main/java/io/prometheus/metrics/benchmarks/CounterBenchmark.java) <!-- editorconfig-checker-disable-line -->
30-
- [HistogramBenchmark](https://github.com/prometheus/client_java/blob/1.0.x/benchmarks/src/main/java/io/prometheus/metrics/benchmarks/HistogramBenchmark.java) <!-- editorconfig-checker-disable-line -->
29+
- [CounterBenchmark](https://github.com/prometheus/client_java/blob/main/benchmarks/src/main/java/io/prometheus/metrics/benchmarks/CounterBenchmark.java) <!-- editorconfig-checker-disable-line -->
30+
- [HistogramBenchmark](https://github.com/prometheus/client_java/blob/main/benchmarks/src/main/java/io/prometheus/metrics/benchmarks/HistogramBenchmark.java) <!-- editorconfig-checker-disable-line -->
31+
- [TextFormatUtilBenchmark](https://github.com/prometheus/client_java/blob/main/benchmarks/src/main/java/io/prometheus/metrics/benchmarks/TextFormatUtilBenchmark.java) <!-- editorconfig-checker-disable-line -->
3132

3233
## What Prometheus Java client optimizes for
3334

@@ -41,6 +42,14 @@ Prometheus client Java metrics support concurrent updates and scrapes. This show
4142
multiple threads recording data in shared
4243
metrics.
4344

45+
## Test the benchmark creation script
46+
47+
To test the benchmark creation script, run:
48+
49+
```shell
50+
python ./.mise/tasks/test_update-benchmarks.py
51+
```
52+
4453
## Archive
4554

4655
The `src/main/archive/` directory contains the old benchmarks from 0.16.0 and earlier. It will be

0 commit comments

Comments
 (0)