Skip to content

fix(simple-engine): SQL start timestamp multiplied by scrape_interval (#202)#330

Merged
milindsrivastava1997 merged 1 commit into
mainfrom
202-calculate_start_timestamp_sql-multiplies-duration-by-scrape_interval-making-window-scrape_interval×-too-wide
May 6, 2026

Hidden character warning

The head ref may contain hidden characters: "202-calculate_start_timestamp_sql-multiplies-duration-by-scrape_interval-making-window-scrape_interval\u00d7-too-wide"
Merged

fix(simple-engine): SQL start timestamp multiplied by scrape_interval (#202)#330
milindsrivastava1997 merged 1 commit into
mainfrom
202-calculate_start_timestamp_sql-multiplies-duration-by-scrape_interval-making-window-scrape_interval×-too-wide

Conversation

@milindsrivastava1997
Copy link
Copy Markdown
Contributor

get_duration() returns seconds, not a count of scrape intervals, so
multiplying by prometheus_scrape_interval again produced a window
scrape_interval× too wide. Drop the extra factor and rename the
variable from scrape_intervals to duration_secs.

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

…#202)

get_duration() returns seconds, not a count of scrape intervals, so
multiplying by prometheus_scrape_interval again produced a window
scrape_interval× too wide. Drop the extra factor and rename the
variable from scrape_intervals to duration_secs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@milindsrivastava1997 milindsrivastava1997 merged commit 88da02f into main May 6, 2026
7 checks passed
@milindsrivastava1997 milindsrivastava1997 deleted the 202-calculate_start_timestamp_sql-multiplies-duration-by-scrape_interval-making-window-scrape_interval×-too-wide branch May 6, 2026 19:04
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.

calculate_start_timestamp_sql multiplies duration by scrape_interval, making window scrape_interval× too wide

1 participant