Skip to content
Skills Library
Programming · Analysis

docker-jfr-benchmark-loop

/docker-jfr-benchmark-loop

Run a repeatable RDF4J performance loop against one JMH benchmark in Docker with Linux Java 26 and JFR CPU-time profiling. Use when working in this repo on benchmark-guided performance changes, hotspot triage, JFR reading, CPU bottleneck analysis, or repeated baseline, fix, and rerun loops. Trigger on requests mentioning benchmark, profiling, JFR, hotspot, perf loop, CPU bottleneck, or Docker benchmark runs in RDF4J.

Repository
rdf4j ↗
Licence
BSD-3-Clause
Last repository change
27.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
5
Scripts
1
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.

Licence

BSD-3-Clause, otwarta.

What to check before installing
  • 1 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: scripts/run-docker-jfr-loop.sh

What it does and when to use it

Run a repeatable RDF4J performance loop against one JMH benchmark in Docker with Linux Java 26 and JFR CPU-time profiling. Use when working in this repo on benchmark-guided performance changes, hotspot triage, JFR reading, CPU bottleneck analysis, or repeated baseline, fix, and rerun loops. Trigger on requests mentioning benchmark, profiling, JFR, hotspot, perf loop, CPU bottleneck, or Docker benchmark runs in RDF4J.

Original author description

Run a repeatable RDF4J performance loop against one JMH benchmark in Docker with Linux Java 26 and JFR CPU-time profiling. Use when working in this repo on benchmark-guided performance changes, hotspot triage, JFR reading, CPU bottleneck analysis, or repeated baseline, fix, and rerun loops. Trigger on requests mentioning benchmark, profiling, JFR, hotspot, perf loop, CPU bottleneck, or Docker benchmark runs in RDF4J.

How it works

  1. Quick start
  2. Repo-grounded defaults
  3. Core loop
  4. Operating rules
  5. Output contract
  6. Escalate cleanly
  7. Reference map
Original SKILL.md headings · 87 lines, 406 words
SKILL.md preview
---
name: docker-jfr-benchmark-loop
description: Run a repeatable RDF4J performance loop against one JMH benchmark in Docker with Linux Java 26 and JFR CPU-time profiling. Use when working in this repo on benchmark-guided performance changes, hotspot triage, JFR reading, CPU bottleneck analysis, or repeated baseline, fix, and rerun loops. Trigger on requests mentioning benchmark, profiling, JFR, hotspot, perf loop, CPU bottleneck, or Docker benchmark runs in RDF4J.
---

# Docker JFR Benchmark Loop

Use this skill for one-benchmark perf work in this repo. Default runner: `scripts/run-docker-jfr-loop.sh`, not ad hoc Maven or raw JMH commands.

## Quick start

Dry-run a known selector:

```bash
.codex/skills/docker-jfr-benchmark-loop/scripts/run-docker-jfr-loop.sh \
  org.eclipse.rdf4j.model.benchmark.ValueCreationBenchmark.createBNode \
  --dry-run
```

Explicit selector plus params:

```bash
.codex/skills/docker-jfr-benchmark-loop/scripts/run-docker-jfr-loop.sh \
  --module core/model \
  --class org.eclipse.rdf4j.model.benchmark.ValueCreationBenchmark \
  --method createBNode \
  --param samples=1000
```

## Repo-grounded defaults

- The wrapper calls repo helper `scripts/run-single-benchmark-docker.sh`.
- The Docker helper already forces Linux Java 26 plus `--enable-jfr --enable-jfr-cpu-times`.
- The inner helper already enforces:
  - `settings=profile`
  - `dumponexit=true`
  - `duration=120s`
  - `warmup=0`
  - `measurement=10` iterations of `10s`
  - `forks=1`
  - `jdk.CPUTimeSample#enabled=true`
  - `report-on-exit=cpu-time-hot-methods`
- This skill wrapper adds the missing fidelity flags:
  - `-XX:FlightRecorderOptions=stackdepth=1024,samplethreads=true`
  - `-XX:+UnlockDiagnosticVMOptions`
  - `-XX:+DebugNonSafepoints`

## Core loop

1. Pick one benchmark selector. Keep selector, params, Docker image, and profiling flags constant for the whole comparison.
2. Capture a baseline run with `scripts/run-docker-jfr-loop.sh`.
3. Read the `.jfr` using [references/jfr-reading.md](references/jfr-reading.md).
4. Choose one candidate fix with material CPU share. Prefer the fix most likely to move total runtime, not just local self time.
5. Re-run the exact same selector and params.
6. Compare benchmark delta plus hotspot shift.
7. Repeat until:
   - the hotspot shifts,
   - CPU share falls below a meaningful threshold,
   - or GC / locks / memory / I/O / JIT behavior dominates instead.

## Operating rules

- Route benchmark variation through `--param`.
- Route JVM tuning through `--jvm-arg`.
- Do not use raw `--jmh-arg` during JFR runs; the helper rejects extra JMH args when JFR is enabled.
- Do not switch to a second `StartFlightRecording`; stay aligned with repo helper behavior.
- Do not treat a small benchmark gain as proof the hotspot fix failed. First check whether another bottleneck surfaced and now caps the total speedup.
- If the run is not CPU-bound, say so and pivot to lock, GC, memory, I/O, or JIT evidence instead of forcing a CPU-only story.

## Output contract

Answers using this skill should usually include:

- exact run command
- `.jfr` path
- top CPU hotspots
- confidence notes
- next-fix hypothesis
- whether a second bottleneck likely masks part of the gain

## Escalate cleanly

- Use [high-performance-java](../high-performance-java/SKILL.md) for algorithm, data-structure, and code-shape changes.
- Use [hotspot-jit-forensics](../hotspot-jit-forensics/SKILL.md) when inlining, tiering, C2, or codegen behavior is in question.
- Use [jmh-benchmark-compare](../jmh-benchmark-compare/SKILL.md) for multi-run diffs, history, and exported reports.

## Reference map

- Loop workflow: [references/perf-loop.md](references/perf-loop.md)
- JFR reading guide: [references/jfr-reading.md](references/jfr-reading.md)
Files in this package (5)
  • SKILL.md 4 KB
  • agents/openai.yaml 1 KB
  • references/jfr-reading.md 2 KB
  • references/perf-loop.md 2 KB
  • scripts/run-docker-jfr-loop.sh 4 KB

Versions

RepositoryScoreLicence
This page · eclipse-rdf4j/rdf4j100BSD-3-Clause
eclipse-rdf4j/rdf4j100BSD-3-Clause
eclipse-rdf4j/rdf4j100BSD-3-Clause

Database snapshot: 13.11.2026 · package version 057a422e6e8d (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100161-java-profiling-detect
    Use when you need to set up Java application profiling to detect and measure performance issues — including trusted preinstalled async-profiler v4.x setup, problem-driven profiling (CPU, memory, threading, GC, I/O), interactive profiling scripts, JFR integration with Java 25…
  • 100profile-run
    Runs this project under a profiler and analyses what comes out — a benchmark, a test, a load script or the application itself, recorded with JFR or async-profiler, imported into a running Jeffrey Microscope and handed to analyze-jfr. Use whenever the user wants to profile…
  • 95jmh-benchmarks
    Expert guidance for writing Java microbenchmarks using JMH (Java Microbenchmark Harness). Use this skill when writing performance benchmarks, measuring method execution time, comparing algorithm implementations, profiling code performance, or debugging benchmark issues. Trigger…
  • 100profile-run
    Runs this project under a profiler and analyses what comes out — a benchmark, a test, a load script or the application itself, recorded with JFR or async-profiler, imported into a running Jeffrey Microscope and handed to analyze-jfr. Use whenever the user wants to profile…
  • 90jvm-profiling
    Profile JVM services with async-profiler and JFR, separating CPU, allocation, and lock evidence, safely in production. Use when a JVM service is slow, hot, or memory-hungry and you need the cause.
  • 100162-java-profiling-analyze
    Use when you need to analyze Java profiling data collected during the detection phase — including interpreting flamegraphs, memory allocation patterns, CPU hotspots, threading issues, systematic problem categorization, evidence documentation with profiling-problem-analysis and…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.