MoonBench is a benchmarking and performance regression toolkit for MoonBit.
It is proposed for the 2026 MoonBit open source ecosystem track as a small
developer tool that helps MoonBit packages measure performance, keep baselines,
and catch regressions in CI.
MoonBench is not a logging or tracing library. It does not collect application
logs, define span lifecycles, or export runtime trace events. Its scope is
benchmark declaration, repeatable measurement, statistical summaries, baseline
comparison, and machine-readable reports.
Goals
Provide a compact MoonBit API for declaring benchmarks and benchmark suites.
Support warmup rounds, measured rounds, minimum duration, and repeat counts.
Summarize measurements with min, max, mean, median, standard deviation, and P90.
Save benchmark results as JSON baselines.
Compare current results with baselines and fail when regressions exceed a threshold.
Export JSON and Markdown reports for CI, reviews, and release notes.
Include examples, tests, CI, and project application materials.
Quick Start
moon check
moon test
moon run cmd/main
fn readme_example() -> String {
let sample = [100L, 120L, 110L, 105L, 115L]
let summary = @moonbench.summarize("sort-small", sample)
@moonbench.to_markdown(summary)
}
Repository Layout
moonbench.mbt: core data model and proposal-stage implementation.
moonbench_test.mbt: tests for statistics, reporting, and regression checks.
cmd/main: runnable demonstration for reviewers.
examples/basic: minimal package using MoonBench.
docs: application materials, roadmap, architecture notes, and review rationale.
Status
This repository contains the registration-stage implementation and materials.
The first delivery milestone is a complete benchmark result model, report
export path, baseline comparison, and CI-friendly command behavior.
MoonBench
MoonBench is a benchmarking and performance regression toolkit for MoonBit. It is proposed for the 2026 MoonBit open source ecosystem track as a small developer tool that helps MoonBit packages measure performance, keep baselines, and catch regressions in CI.
MoonBench is not a logging or tracing library. It does not collect application logs, define span lifecycles, or export runtime trace events. Its scope is benchmark declaration, repeatable measurement, statistical summaries, baseline comparison, and machine-readable reports.
Goals
Quick Start
Repository Layout
moonbench.mbt: core data model and proposal-stage implementation.moonbench_test.mbt: tests for statistics, reporting, and regression checks.cmd/main: runnable demonstration for reviewers.examples/basic: minimal package using MoonBench.docs: application materials, roadmap, architecture notes, and review rationale.Status
This repository contains the registration-stage implementation and materials. The first delivery milestone is a complete benchmark result model, report export path, baseline comparison, and CI-friendly command behavior.
License
MIT