himorime

command module
v0.5.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 9, 2026 License: MIT Imports: 3 Imported by: 0

README

UnitTest E2E Lint Go Reference GitHub Downloads (all assets, all releases) OpenSSF Scorecard

himorime logo

himorime measures a command-line program from a YAML suite, checks latency and optional throughput, CPU and peak RSS budgets, and compares revisions for regressions.

First run

$ go run github.com/nao1215/himorime@latest init
$ go run github.com/nao1215/himorime@latest run

init writes one runnable git --version case with a latency budget and the JSON Schema URL for editor completion. Replace the command with your tool, then keep the suite in your repository.

When developing himorime from a checkout, use go run .; a released @latest binary and the main schema can differ before a release. See Configuration migration.

1 passed · 1 benchmark · exit 0

Use Getting started for the first suite, Configuration for the file format, Metrics for measured values, and Reports for output formats.

For tool selection, see Comparison; atago checks CLI behavior, while himorime checks performance.

GitHub Actions

Use setup-himorime and himorime ci on pull requests; the GitHub Actions guide contains the workflow.

Measuring programs you did not write

himorime measures a command, so a program you did not write is measured like your own. The suites in bench/thirdparty measure real third-party tools and are written to be copied; Real-world suites says what each one shows.

Suite Programs
json jq, gojq, jaq
compression gzip, bzip2, xz
search GNU grep, ripgrep
copy cp, rsync
csv Miller, qsv, xan
sql DuckDB, trdsql, csvq, sqly
diff GNU diff, git diff
yaml yq, yj, gojq
awk GNU awk, mawk, GoAWK
sort GNU sort, uutils sort
shell bash, dash
cc GCC, Clang
js Node.js, Bun, Deno

Install

go install github.com/nao1215/himorime@latest

Homebrew: brew install --cask nao1215/tap/himorime. Arch Linux: yay -S himorime-bin from the AUR. The release page has archives and Linux packages, and setup-himorime installs a release in GitHub Actions.

The name

himorime was inspired by atago and named after 火防女 (himorime), the maiden who tends the fire in Demon's Souls.

Contributors

License

MIT

Documentation

Overview

Command himorime checks whether command-line programs stay within their performance budgets: latency, throughput, CPU time and peak RSS, locally and in CI.

It measures commands declared in a versioned YAML suite, compares them with each other or with a Git base revision, checks absolute performance budgets, and exits non-zero on a confirmed regression. See https://nao1215.github.io/himorime/ for the documentation.

Directories

Path Synopsis
bench
thirdparty/gen command
Command gen writes the input files the third-party benchmark suites measure over, so that no sample data from anyone else's project is committed here.
Command gen writes the input files the third-party benchmark suites measure over, so that no sample data from anyone else's project is committed here.
examples
tools/sleepy command
Command sleepy stands in for a program whose behavior you control: it sleeps or spins, optionally with jitter, optionally in child processes, then exits with the status you ask for.
Command sleepy stands in for a program whose behavior you control: it sleeps or spins, optionally with jitter, optionally in child processes, then exits with the status you ask for.
tools/wordcount command
Command wordcount counts lines, words and bytes, like a tiny wc.
Command wordcount counts lines, words and bytes, like a tiny wc.
internal
buildinfo
Package buildinfo reports the version himorime was built as.
Package buildinfo reports the version himorime was built as.
cli
Package cli implements himorime's command-line interface: subcommand dispatch, flag parsing, and the mapping of outcomes to exit codes.
Package cli implements himorime's command-line interface: subcommand dispatch, flag parsing, and the mapping of outcomes to exit codes.
config
Package config loads, validates and resolves himorime suite files.
Package config loads, validates and resolves himorime suite files.
diag
Package diag defines the stable error codes printed by himorime.
Package diag defines the stable error codes printed by himorime.
docgen
Package docgen generates the parts of the documentation that restate the code: the command reference, the exit code table, the configuration field reference and defaults, and the example suites embedded in the Cookbook and README.
Package docgen generates the parts of the documentation that restate the code: the command reference, the exit code table, the configuration field reference and defaults, and the example suites embedded in the Cookbook and README.
envinfo
Package envinfo describes the machine a benchmark ran on, for reports.
Package envinfo describes the machine a benchmark ran on, for reports.
exitcode
Package exitcode defines himorime's exit statuses, a stable public contract.
Package exitcode defines himorime's exit statuses, a stable public contract.
ghactions
Package ghactions is the thin adapter between himorime and GitHub Actions.
Package ghactions is the thin adapter between himorime and GitHub Actions.
gitwt
Package gitwt prepares a Git revision for measurement in a temporary worktree without touching the user's working tree, index or branches.
Package gitwt prepares a Git revision for measurement in a temporary worktree without touching the user's working tree, index or branches.
metric
Package metric defines the performance metrics himorime collects: their names, units, the direction that counts as better, how raw samples are aggregated, and the typed quantities (durations, byte sizes, rates and percentages) that budgets and regression thresholds are written in.
Package metric defines the performance metrics himorime collects: their names, units, the direction that counts as better, how raw samples are aggregated, and the typed quantities (durations, byte sizes, rates and percentages) that budgets and regression thresholds are written in.
proc
Package proc starts processes so that a whole process tree can be stopped, and measures their wall-clock duration.
Package proc starts processes so that a whole process tree can be stopped, and measures their wall-clock duration.
redact
Package redact removes secret values from text himorime prints.
Package redact removes secret values from text himorime prints.
report
Package report turns raw measurements into judged results and renders them as a terminal table, JSON, CSV, Markdown or a GitHub Actions job summary.
Package report turns raw measurements into judged results and renders them as a terminal table, JSON, CSV, Markdown or a GitHub Actions job summary.
rmtree
Package rmtree removes himorime's own temporary directory trees: the working directories of benchmarks and the base worktree of a comparison.
Package rmtree removes himorime's own temporary directory trees: the working directories of benchmarks and the base worktree of a comparison.
runner
Package runner executes benchmark suites and records raw samples.
Package runner executes benchmark suites and records raw samples.
stats
Package stats computes the summary statistics himorime reports and the bootstrap comparison it uses to classify a change between two revisions.
Package stats computes the summary statistics himorime reports and the bootstrap comparison it uses to classify a change between two revisions.
Package schema embeds the published JSON Schemas.
Package schema embeds the published JSON Schemas.
scripts
completions command
Command completions writes the shell completion scripts into completions/.
Command completions writes the shell completion scripts into completions/.
smoke command
Command smoke checks the artifacts GoReleaser wrote to a dist directory before they are published, on any operating system:
Command smoke checks the artifacts GoReleaser wrote to a dist directory before they are published, on any operating system:
test
e2e/helper command
Command helper is the portable stand-in program the end-to-end suite measures.
Command helper is the portable stand-in program the end-to-end suite measures.
e2e/run command
Command run executes the end-to-end suite.
Command run executes the end-to-end suite.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL