Set a max-history-duration for Diagnostics
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
## What problem does this solve or what need does it fill?
I feel like with diagnostics, the value I often want to know is:
'what was the average value over the last X seconds'
(for example what was the bandwidth over the last 1 second, or what was the fps averaged over the last 3 seconds).
The current diagnostics requires you to specify a `max_history_length` which will be the number of values stored in the buffer.
But personally I don't particulary care for the 'bandwidth over the last 64 measurements`, i'm more interested in knowing in knowing the value averaged over a specific amount of time.
## What solution would you like?
The API could accept a parameter like
```
pub enum HistorySize {
HistoryLength(u32),
HistoryDuration(Duration)
}
```
Contributor guide
Research direction
Start by locating the Diagnostics API and the existing max_history_length configuration. Compare the proposed HistorySize enum with current history handling, then verify that duration-based history can produce averages over intervals such as one or three seconds while preserving length-based behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100