sbt-benchmark

Automate JMH benchmarks for Spark protobuf backport with sbt clean and log parsing.

1|Updated Jul 24, 2025
One-click install
npx skills add https://github.com/bumfo/spark-protobuf-backport --skill sbt-benchmark
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sbt-benchmark
Source: https://github.com/bumfo/spark-protobuf-backport/tree/main/.claude/skills/sbt-benchmark
Command: npx skills add https://github.com/bumfo/spark-protobuf-backport --skill sbt-benchmark

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Manually running, monitoring, and parsing JMH benchmarks is a tedious and error-prone process for developers. This Skill automates the entire benchmarking workflow for Scala/sbt projects, ensuring consistent execution, real-time monitoring, and clear extraction of results, saving significant developer time and reducing complexity.

Core Features & Use Cases

  • Automated JMH Execution: Runs specific or all benchmarks with a mandatory sbt clean to ensure reliable, consistent results.
  • Live Progress Monitoring: Provides real-time updates on benchmark progress, ETA, and current iterations for long-running tests.
  • Result Parsing & Presentation: Automatically extracts and presents JMH result tables from log files, eliminating manual log sifting.
  • Use Case: Quickly compare the performance of two different Spark Protobuf parser implementations within the project, receiving a clean, parsed result table that highlights speedups or regressions without manual intervention.

Quick Start

To run a specific benchmark and monitor its progress: sbt clean bench/Test/compile 'bench/Jmh/run .<BenchmarkName>.' | tee /tmp/jmh_my_benchmark.log & scripts/monitor-jmh.sh -t 300 /tmp/jmh_my_benchmark.log

Frequently Asked Questions about sbt-benchmark

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate JMH benchmarks in an sbt project?

Automate JMH benchmarks by running `sbt clean bench/Test/compile 'bench/Jmh/run .*<BenchmarkName>.*'` with mandatory sbt clean to ensure consistent results. Pipe output to a log file and use monitoring scripts to track progress in real time.

Can I monitor JMH benchmark progress while tests run?

Yes, use the monitor-jmh.sh script to track live progress, current iterations, and ETA. Run benchmarks in the background and pipe logs to /tmp, then point the monitor script to the log file to watch execution without blocking your terminal.

How do I extract and parse JMH results from benchmark logs?

The Skill automatically parses JMH log files and extracts result tables, eliminating manual sifting. A log-reader agent identifies performance metrics and presents them in a clean, structured format for easy comparison.

What's the best way to compare performance between two parser implementations?

Run targeted benchmarks for each parser implementation using sbt patterns, save outputs to /tmp, and let the parsing scripts extract results. Compare the result tables side-by-side to identify speedups or regressions without manual interpretation.

Do I need to manually clean before running JMH benchmarks?

No, the Skill enforces `sbt clean` before every benchmark run automatically. This ensures reliable, consistent results and removes the risk of stale artifacts affecting performance measurements.

Can I run benchmarks in the background without blocking my workflow?

Yes, append `&` to run benchmarks in the background while you continue working. Monitor progress separately using the monitor-jmh.sh script pointed at your /tmp log file.