[Feature] Read JMH JSON benchmark results in `evidence add`
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- python
- Domain
- backend, performance
Research direction
Read packages/core/src/repowise/core/evidence/profile_formats/__init__.py and pytest_benchmark.py for format registration and conversion patterns, then inspect the JMH JSON fields described in the issue. The issue names tests/unit/evidence/ for coverage. Done means a JMH fixture with thrpt and avgt results ingests with correct directions, units, and benchmark function names; linked PR #6381 is already open.
Written by the indexing model from the issue text.
Description
Summary
evidence add reads pytest-benchmark, Go bench and hyperfine results, but not JMH's -rf json output, the common benchmark format on the JVM.
packages/core/src/repowise/core/evidence/profile_formats/__init__.py:77-91
profile_formats.register("hyperfine", ProfileFormat(hyperfine.sniff, to_v1=hyperfine.to_v1))
profile_formats.register("junit", ProfileFormat(junit.sniff, to_v1=junit.to_v1))
Mechanism
- A format is one module with
sniffandto_v1plus oneregistercall (module docstring,:1-25).pytest_benchmark.pyis the closest precedent: one series per benchmark,functionset when the name leads to a symbol. - JMH writes a JSON array. Each item has
benchmark(com.acme.CartBench.total),mode(thrpt,avgt,sample,ss) andprimaryMetricwithscore,scoreErrorandscoreUnit. - Open PR #6237 resolves JVM package-qualified names in
ingest.resolve_location, which afunctionofcom.acme.CartBench.totalcan use.
Repro
A one-result JMH file ([{"jmhVersion":"1.37","benchmark":"com.acme.CartBench.total","mode":"avgt",...}]) through input_format and prepare_evidence, as evidence add runs them:
jmh.json detected: repowise-evidence-v1
EvidenceRefusedError: the file is not a JSON object
Done looks like
- New
profile_formats/jmh.py. Sniff a JSON array whose first item hasjmhVersionandbenchmark. - One series per benchmark and mode.
thrptis higher-is-better (ops per time unit),avgt/sample/ssare lower-is-better. Convert units to the series unit. functionis the benchmark method's FQN.- Must not change: sniff order for other JSON formats.
Tests
tests/unit/evidence/: a fixture with one thrpt and one avgt result ingests with the right direction and units.
- Dominant language
- Python
- Stars
- 7.1k
- Forks
- 756
- Avg merge
- 21h 5m
- Merged PRs (30d)
- 797
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from repowise-dev/repowise
-
[Bug] Elixir `.formatter.exs`, `.credo.exs`, `config/*.exs` and `priv/**/*.exs` are reported as unreachable filesPossibly taken @ZYZ666-RGB claimed this 1 day ago. Openbug good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
repowise-dev/repowise#6296 · 1 comment ·
Maintainers usually reply within 1 day
-
[Bug] Coverage stack detection omits Swift, Dart, and Scala, falling through to UNKNOWN in evidence setupPossibly taken @RishabhIIITD claimed this 2 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
repowise-dev/repowise#5838 · 2 comments ·
Maintainers usually reply within 1 day
-
[Bug] PR-mined decisions store the decision sentence again as their rationalePossibly taken @suyashgitt claimed this 11 days ago. Openbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
repowise-dev/repowise#5702 · 2 comments ·
Maintainers usually reply within 1 day
-
[Bug] CICS CSD `DEFINE _PGMLIST` startup programs (`_PGMPH`) are not rootsPossibly taken @dchaudhari7177 claimed this 34 days ago. Openbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
repowise-dev/repowise#4477 ·
Maintainers usually reply within 1 day
-
[Bug] COBOL listing directives EJECT, SKIP1/SKIP2/SKIP3 and TITLE fail to parse and drop the rest of the filePossibly taken @dchaudhari7177 claimed this 34 days ago. Openbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
repowise-dev/repowise#4474 ·
Maintainers usually reply within 1 day
All issues in repowise-dev/repowise
Similar issues
-
triage
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
kornia/kornia-rs#1416 · 1 comment ·
Maintainers usually reply within 2 days
-
ui
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
PolicyEngine/ai-inequality#64 ·
Maintainers usually reply within 1 day
-
LinearGaussianStateSpace.dist splits states and observations wrongly when the transition varies over timePossibly taken @PabloRoque claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
pymc-devs/pymc-extras#839 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day