File tree Expand file tree Collapse file tree 3 files changed +15
-5
lines changed
Expand file tree Collapse file tree 3 files changed +15
-5
lines changed Original file line number Diff line number Diff line change 99if 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
1515class TestRunBenchmarksFiltering (unittest .TestCase ):
Original file line number Diff line number Diff line change 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"""
67Run benchmarks for the `benchmarks` module, capture JMH text output, and update
78any <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
1213By default this will:
1314 - run the maven wrapper to package the benchmarks: `./mvnw -pl benchmarks -am -DskipTests package`
Original file line number Diff line number Diff line change 77Run 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
2727See 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
4142multiple threads recording data in shared
4243metrics.
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
4655The ` src/main/archive/ ` directory contains the old benchmarks from 0.16.0 and earlier. It will be
You can’t perform that action at this time.
0 commit comments