Commit 6829ebb0 authored by Daniel Smith's avatar Daniel Smith

Calculate observed regression percentage logically when regression testing against PARENT

parent 707be6e8
......@@ -924,6 +924,10 @@ if __name__ == "__main__":
result2 = testSingleCommit(secondCommit, args.secondBuildOnHead, noRebuild)
if not result2:
exit(1)
observedRegressionPercent = 0
if secondCommit == "PARENT":
observedRegressionPercent = int((((result2 - result1) / result2) * 100))
else:
observedRegressionPercent = int((((result1 - result2) / result1) * 100))
print(f"First commit scored {result1}. Second commit scored {result2}, a {observedRegressionPercent}% difference.")
finalResults = [result1, result2, observedRegressionPercent]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment