Created
October 15, 2010 19:05
-
-
Save eglaysher/628743 to your computer and use it in GitHub Desktop.
Script used to measure differences in size of object files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# | |
# Script used to measure differences in size of object files | |
# | |
# $ make -j15 chrome | |
# $ find out/Debug/ -name "*.a" | xargs ls -s > before.txt | |
# --- CHANGE CHANGE CHANGE --- | |
# $ make -j15 chrome | |
# $ find out/Debug/ -name "*.a" | xargs ls -s > after.txt | |
# $ diff -u before.txt after.txt | ./count_sizediff.py | |
import sys | |
total = 0 | |
for line in sys.stdin: | |
size_str = line[1:7] | |
if line[1] == '+' or line[1] == '-': | |
continue | |
elif line[0] == '-': | |
total += int(size_str) | |
elif line[0] == '+': | |
total -= int(size_str) | |
print total |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment