mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Auto merge of #19206 - asajeffrey:test-perf-add-differ-summary, r=aneeshusa
Add total time to test_differ in etc/ci/performance <!-- Please describe your changes on the following line: --> Add the total time to test_differ in etc/ci/performance. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes do not require tests because this is test infrastructure <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19206) <!-- Reviewable:end -->
This commit is contained in:
commit
e6b05fa204
1 changed files with 19 additions and 4 deletions
|
@ -38,6 +38,18 @@ GREEN = '\033[92m'
|
|||
WARNING = '\033[93m'
|
||||
END = '\033[0m'
|
||||
|
||||
|
||||
total1 = 0
|
||||
total2 = 0
|
||||
|
||||
|
||||
def print_line(value1, value2, key):
|
||||
diff = value2 - value1
|
||||
change = diff / value1
|
||||
color = BLUE if value1 <= value2 else GREEN
|
||||
print("{}{:6} {:6} {:+6} {:+8.2%} {}.{}".format(color, value1, value2, diff, change, key, END))
|
||||
|
||||
|
||||
for key in keys:
|
||||
value1 = data1.get(key)
|
||||
value2 = data2.get(key)
|
||||
|
@ -46,7 +58,10 @@ for key in keys:
|
|||
elif value2 and not(value1):
|
||||
print ("{}Test {}: missing from {}.{}".format(WARNING, key, args.file1, END))
|
||||
elif value1 and value2:
|
||||
diff = value2 - value1
|
||||
change = diff / value1
|
||||
color = BLUE if value1 <= value2 else GREEN
|
||||
print("{}{:6} {:6} {:+6} {:+8.2%} {}.{}".format(color, value1, value2, diff, change, key, END))
|
||||
total1 += value1
|
||||
total2 += value2
|
||||
print_line(value1, value2, key)
|
||||
|
||||
|
||||
print("")
|
||||
print_line(total1, total2, "TOTAL")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue