pyroscope
pyroscope copied to clipboard
Fix/configurable min step duration
Fixes #4524
fix: make minimum step duration configurable for eBPF profiling
This change addresses issue #4524 where users setting `collect_interval`
below 15 seconds (e.g., 5s for eBPF profiling) were seeing their data
displayed at 15-second intervals in the UI due to a hardcoded minimum
step duration.
Changes:
- Added `--querier.min-step-duration` flag (default: 15s) to allow users to
configure the minimum step duration for timeline calculations
- Created `CalcPointIntervalWithMinInterval` function that accepts a custom
minimum interval parameter
- Updated HTTP handlers to pass the configurable value through the call chain
- Added comprehensive tests covering eBPF use cases (1s, 5s intervals)
- Maintains backward compatibility with 15-second default
Users can now run Pyroscope with `--querier.min-step-duration=5s` to support
fast eBPF profiling collection intervals while maintaining fine-grained
resolution in the UI.
@manab-pr do you mind rebasing this? This seems to contain also the changeset from #4526 .
@simonswine Sorry about that! I accidentally included changes from #4526 when I started working on this issue. I've now rebased the branch and it should be clean - only contains the eBPF profiling changes for #4524. Could you please take another look when you get a chance?
@simonswine The branch has been rebased and is ready for another look. Could you please review when you get a chance? Thanks.