Merge pull request #24735 from veblush/ios-requests

Python3ize ios_bin/binary_size.py
pull/24742/head
Esun Kim 4 years ago committed by GitHub
commit cdc1961bf8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      tools/profiling/ios_bin/binary_size.py
  2. 4
      tools/profiling/ios_bin/parse_link_map.py

@ -1,4 +1,4 @@
#!/usr/bin/env python2.7
#!/usr/bin/env python3
#
# Copyright 2018 gRPC authors.
#
@ -143,6 +143,6 @@ for frameworks in [False, True]:
text += '\n No significant differences in binary sizes\n'
text += '\n'
print text
print(text)
check_on_pr.check_on_pr('Binary Size', '```\n%s\n```' % text)

@ -36,7 +36,7 @@ def parse_link_map(filename):
objc_size = 0
protobuf_size = 0
lines = list(open(filename))
lines = open(filename, encoding='utf-8', errors='ignore').readlines()
for line in lines:
line_stripped = line[:-1]
if "# Object files:" == line_stripped:
@ -66,6 +66,8 @@ def parse_link_map(filename):
if len(line_stripped) == 0 or line_stripped[0] == '#':
continue
segs = re.search('^.+?\s+(.+?)\s+(\[.+?\]).*', line_stripped)
if not segs:
continue
target = table_tag[segs.group(2)]
target_stripped = re.search('^(.*?)(\(.+?\))?$', target).group(1)
size = int(segs.group(1), 16)

Loading…
Cancel
Save