pub fn stats_document(registry: &Registry, passes: &[Pass]) -> ValueExpand description
The document emitted by devp stats --json.
Three different vintages of number live here, and the field names say which is which.
lifetime has been accumulating since 1.0.0. recent_passes and the bytes_freed
inside repositories are only recorded from 1.1.0 onward, so on an upgraded machine
they start near zero while lifetime does not — history_starts_at names the version
that changed, so a consumer can say so rather than reporting a regression.
lifetime.cache_bytes_freed is the third vintage: 1.9.0 onward, and zero on every
machine that has not emptied a cache since upgrading.
by_manager and by_trigger are the fourth: they are summed from the prune log, so
they cover only the passes it holds — detail_starts_at, not history_starts_at. Each carries its own passes_not_counted,
and the two numbers differ on purpose — a pass can have a directory list without a
trigger, so the manager breakdown reaches back further than the trigger split does.