Skip to content

feat(stats): Reduce day-valued precision to 5 decimals#3607

Merged
jqnatividad merged 2 commits intomasterfrom
stats-subsecond-precision
Mar 12, 2026
Merged

feat(stats): Reduce day-valued precision to 5 decimals#3607
jqnatividad merged 2 commits intomasterfrom
stats-subsecond-precision

Conversation

@jqnatividad
Copy link
Collaborator

Change day-valued rounding from 8 to 5 decimal places and update wording from “millisecond precision” to “sub-second precision”. Updated DAY_DECIMAL_PLACES (8 -> 5) and related comments and docs so date/datetime spreads (reported in days) are described and formatted with sub-second precision (1e-5 days ≈ 0.864s). Files updated: docs/STATS_DEFINITIONS.md, src/cmd/pragmastat.rs, src/cmd/stats.rs.

Change day-valued rounding from 8 to 5 decimal places and update wording from “millisecond precision” to “sub-second precision”. Updated DAY_DECIMAL_PLACES (8 -> 5) and related comments and docs so date/datetime spreads (reported in days) are described and formatted with sub-second precision (1e-5 days ≈ 0.864s). Files updated: docs/STATS_DEFINITIONS.md, src/cmd/pragmastat.rs, src/cmd/stats.rs.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adjusts how date/datetime “spread” statistics (reported in days) are described and formatted, standardizing day-valued rounding to 5 decimal places and updating related wording to reflect sub-second (not millisecond) precision.

Changes:

  • Update date/day rounding precision constant used by pragmastat from 8 to 5 decimal places.
  • Update CLI/help text and inline comments in stats to describe the precision as “sub-second”.
  • Update stats definitions documentation to match the new precision wording.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/cmd/stats.rs Updates help text/comments describing day-valued date stats precision as sub-second.
src/cmd/pragmastat.rs Changes DAY_DECIMAL_PLACES from 8 → 5 and updates explanatory comments.
docs/STATS_DEFINITIONS.md Updates documentation wording from millisecond → sub-second precision for day-valued date stats.

Address Copilot review feedback: `round_num(..).normalize()` trims
trailing zeros, so "at least 5 decimal places" was misleading as a
display guarantee. Reworded to describe 1e-5 day precision with
trailing zeros trimmed. Also updated docs/help/stats.md which still
had the old "millisecond precision" wording.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jqnatividad jqnatividad merged commit 4bcbffd into master Mar 12, 2026
16 checks passed
@jqnatividad jqnatividad deleted the stats-subsecond-precision branch March 12, 2026 11:45
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.

2 participants