Expand description
The human-readable benchmark report, docs/generated/economics.md: a rendering of one
EconomicsSummary and nothing else. Every number in it is a field of the summary,
spelled for a reader; the report computes none, so it cannot disagree with the CLI, the
API, MCP, the Cockpit or the site, which render the same summary.
use majordomus_cli::economics::{report, summarize};
let dir = tempfile::tempdir().unwrap();
let text = report::markdown(&summarize(dir.path(), &Default::default()));
assert!(text.contains("No verified total-token-savings claim is available"));Functions§
- amount
- A figure in its unit, as every surface spells it. A
ratiois a signed percentage with one decimal (percent_text); any other unit is a signed whole number followed by the unit. Neither carries a sign when it rounds to zero, and a value that is not a number printsn/a, so no surface ever shows-0.0%or a figure nobody computed. - interval_
text - An interval as every surface spells it: the confidence level (
level_text, so that9750reads97.5%and is never rounded into a level the methodology did not declare), then both bounds in the metric’s unit (amount). The bounds of a ratio are reductions, like the value they bracket. - markdown
- The whole report for one summary, as Markdown. It reads nothing but
s, so the same summary always renders to the same bytes. When no methodology is declared (presentis false) the report stops after the verdict, its unmet thresholds and the records that could not be read, because every later section would describe evidence that cannot exist. Free text placed in a table cell has its pipes escaped and its line breaks flattened, so a reason can never split a row. Every per-pair and aggregate token figure is a reduction, spelled byamount: a negative reduction means Majordomus used more tokens, and no figure is negated on the way to the page. - value
- A metric’s value as the report spells it:
amountin the metric’s unit, and an absent value the wordsnot measured, so that an unmeasured metric never reads as a change of zero. - words
- An enum of the summary as a person reads it: its serialised name (
wire, the one the API and MCP answer with) with each underscore a space, sono_evidencereadsno evidence. A surface never spells a state fromDebug, which would printNoEvidence, a word the API never uses.