Last active
February 2, 2016 07:08
-
-
Save frozendevil/3ddedf1e5e02a448607f to your computer and use it in GitHub Desktop.
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/env python | |
import subprocess | |
import sys | |
results = [] | |
if not sys.stdin.isatty(): | |
input_stream = sys.stdin | |
for line in input_stream: | |
if "ms\t" in line: | |
if "<invalid" not in line: | |
columns = line.split('\t') | |
columns[0] = columns[0][:-2] # remove 'ms' from duration | |
columns[2] = columns[2][:-1] # remove '\n' from end of line | |
if float(columns[0]) >= 1.0: | |
results.append(columns) | |
for result in results: | |
for column in result: | |
sys.stdout.write(column) | |
sys.stdout.write("\t") | |
sys.stdout.write('\n') | |
# use like `xcodebuild OTHER_SWIFT_FLAGS='-Xfrontend -debug-time-function-bodies' | <PATH_TO_THIS_SCRIPT>.py` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment