pull/15692/head
Muxi Yan 6 years ago
parent 252359bbdc
commit 4df5a4d384
  1. 9
      tools/profiling/ios_bin/binary_size.py

@ -113,7 +113,8 @@ for frameworks in [False, True]:
text += row_format.format('New size', '', 'Old size') text += row_format.format('New size', '', 'Old size')
if old_size == None: if old_size == None:
for i in range(0, len(size_labels)): for i in range(0, len(size_labels)):
text += ('\n' if i == len(size_labels) - 1 else '') + row_format.format( text += ('\n'
if i == len(size_labels) - 1 else '') + row_format.format(
'{:,}'.format(new_size[i]), size_labels[i], '') '{:,}'.format(new_size[i]), size_labels[i], '')
else: else:
has_diff = False has_diff = False
@ -125,9 +126,9 @@ for frameworks in [False, True]:
else: else:
diff_sign = ' (<)' diff_sign = ' (<)'
has_diff = True has_diff = True
text += row_format.format( text += row_format.format('{:,}'.format(new_size[i]),
'{:,}'.format(new_size[i]), size_labels[i] + diff_sign, size_labels[i] + diff_sign, '{:,}'.format(
'{:,}'.format(old_size[i])) old_size[i]))
i = len(size_labels) - 1 i = len(size_labels) - 1
if new_size[i] > old_size[i]: if new_size[i] > old_size[i]:
diff_sign = ' (>)' diff_sign = ' (>)'

Loading…
Cancel
Save