Skip to content

Commit

Permalink
fix: check for mismatching ranges in benchmark csv
Browse files Browse the repository at this point in the history
  • Loading branch information
siddarthkay committed Dec 6, 2024
1 parent 90dd86b commit ac53a53
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scripts/block-import-stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ def formatBins(df: pd.DataFrame, bins: int):
start = max(min(baseline.index), min(contender.index))
end = min(max(baseline.index), max(contender.index))

# Check if there's any overlap in the time ranges
if start > max(max(baseline.index), max(contender.index)) or end < min(min(baseline.index), min(contender.index)):
print(f"Error: No overlapping time ranges between baseline and contender datasets")
print(f"Baseline range: {min(baseline.index)} to {max(baseline.index)}")
print(f"Contender range: {min(contender.index)} to {max(contender.index)}")
exit(1)

baseline = baseline.loc[baseline.index >= start and baseline.index <= end]
contender = contender.loc[contender.index >= start and contender.index <= end]

Expand Down

0 comments on commit ac53a53

Please sign in to comment.