Skip to content

✨ feat(mq-lang): add variance, stddev, mode, and describe builtins - #2165

Merged
harehare merged 2 commits into
mainfrom
feat/stats-builtins
Aug 9, 2026
Merged

✨ feat(mq-lang): add variance, stddev, mode, and describe builtins#2165
harehare merged 2 commits into
mainfrom
feat/stats-builtins

Conversation

@harehare

@harehare harehare commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Summary

Add stddev/variance/mode as individual statistical functions and describe(arr) to summarize an array as {min, max, mean, median, stddev, variance, count}, reusing existing mean/percentile helpers. Also fixes a stale doc comment on geomean that incorrectly described it as returning the median.

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • ♻️ Refactor
  • 📝 Documentation
  • ⚡ Performance
  • ✅ Test
  • 📦 Build / dependencies
  • 👷 CI

Checklist

  • I ran cargo fmt and cargo clippy and addressed any warnings
  • I ran just test-all and all tests pass
  • I added or updated tests covering this change
  • I updated relevant documentation (/docs, crate README.md) if needed
  • I added a changelog entry if this is a user-facing change

Additional Context

Add stddev/variance/mode as individual statistical functions and
describe(arr) to summarize an array as {min, max, mean, median,
stddev, variance, count}, reusing existing mean/percentile helpers.
Also fixes a stale doc comment on geomean that incorrectly described
it as returning the median.
@codspeed-hq

codspeed-hq Bot commented Aug 9, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing feat/stats-builtins (43856cf) with main (20316c1)

Open in CodSpeed

Expected output didn't match the actual key order and float
formatting produced by the engine, failing test_doc_examples_are_correct.
@harehare
harehare merged commit 80f9ac5 into main Aug 9, 2026
12 checks passed
@harehare
harehare deleted the feat/stats-builtins branch August 9, 2026 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant