目录

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

  • 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.

License

MIT

关于

MoonBit 基准测试与性能回归分析工具链,提供 benchmark API、统计摘要、基线比较、CI 回归检查和报告导出。

47.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802047560号