mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Add total time to test_differ in etc/ci/performance.
This commit is contained in:
parent
40adc3fd88
commit
201f931fa1
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