Background
The planner currently operates entirely in seconds for all time-related values. This includes:
RuntimeOptions.prometheus_scrape_interval — u64 seconds
QueryGroup.repetition_delay, step, range_duration — u64 seconds
InstantQueryInfo.repetition_delay / RangeQueryInfo.repetition_delay, step, range_duration — all seconds (frequency.rs)
IntermediateWindowConfig.window_size / slide_interval — seconds (window.rs)
AggregationConfig.window_size / slide_interval in asap-common — explicitly documented as seconds (aggregation_config.rs:23–24)
- The
windowSize and slideInterval fields in the generated streaming YAML — seconds
The query engine then multiplies these by 1000 at the point of use (e.g. promql.rs:484, capability_matching.rs:73).
Problem
This makes it impossible to plan configs for workloads with sub-second scrape intervals or millisecond-granularity step/range values. The minimum expressible window is 1 second. With high-frequency data sources (e.g. 100ms or 500ms scrape intervals), the planner cannot generate correct configs.
Background
The planner currently operates entirely in seconds for all time-related values. This includes:
RuntimeOptions.prometheus_scrape_interval—u64secondsQueryGroup.repetition_delay,step,range_duration—u64secondsInstantQueryInfo.repetition_delay/RangeQueryInfo.repetition_delay,step,range_duration— all seconds (frequency.rs)IntermediateWindowConfig.window_size/slide_interval— seconds (window.rs)AggregationConfig.window_size/slide_intervalinasap-common— explicitly documented as seconds (aggregation_config.rs:23–24)windowSizeandslideIntervalfields in the generated streaming YAML — secondsThe query engine then multiplies these by 1000 at the point of use (e.g.
promql.rs:484,capability_matching.rs:73).Problem
This makes it impossible to plan configs for workloads with sub-second scrape intervals or millisecond-granularity step/range values. The minimum expressible window is 1 second. With high-frequency data sources (e.g. 100ms or 500ms scrape intervals), the planner cannot generate correct configs.