feat(stats): Reduce day-valued precision to 5 decimals#3607
Merged
jqnatividad merged 2 commits intomasterfrom Mar 12, 2026
Merged
feat(stats): Reduce day-valued precision to 5 decimals#3607jqnatividad merged 2 commits intomasterfrom
jqnatividad merged 2 commits intomasterfrom
Conversation
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.
Contributor
There was a problem hiding this comment.
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
pragmastatfrom 8 to 5 decimal places. - Update CLI/help text and inline comments in
statsto 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.