fix: check for mismatching ranges in benchmark csv (#2914)

This commit is contained in:
Siddarth Kumar 2024-12-06 17:31:33 +05:30 committed by GitHub
parent 667897557a
commit 72d08030d9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 0 deletions

View File

@ -77,6 +77,13 @@ contender = readStats(args.contender)
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]