Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 1.74 KB

README.md

File metadata and controls

23 lines (18 loc) · 1.74 KB

Duel guide

The README shows how to install Duel, write a first benchmark, run it, and run it in CI. This guide covers the rest.

Page What it covers
Write benchmarks Hooks that run code around a benchmark, starting every sample alike, undoing each iteration, measuring work that a benchmark leaves for later, sharing code between benchmarks, choosing what a benchmark is judged on, and benchmarking a whole process.
Configure Duel .duel.rb and its settings, preparing each worker and each version, running code in each worker, running each version on its own Ruby, adding your own metrics, and using plugins.
Run Duel in CI The GitHub Actions workflow that duel init writes, catching slow creep, commenting on a pull request, and installing the baseline's Ruby on CI.
How Duel works How Duel tells a regression from noise, what it measures, where the extra time went, where the baseline comes from, and JIT compilers, including JRuby and TruffleRuby.
Read Duel's report as JSON Writing the report as JSON with --json, its schema and how it's versioned, and an example.
Troubleshooting What Duel says when it can't compare, or reports what you don't expect, and what to do about it.
Write a Duel plugin Plugin conventions, adding to the DSL, hooks and metrics in a plugin, explaining a sample, and testing a plugin.

Public API

What the README and this guide document is Duel's public API, which follows Semantic Versioning.

Important

Anything marked @api private in the code or in its signatures (sig/) is Duel's own, and can change in any release.