Revision 5c03805d684cb541ba5a40138457bb598642de20 authored by Alon Zakai on 14 March 2014, 22:09:59 UTC, committed by Alon Zakai on 14 March 2014, 23:14:00 UTC
1 parent e56b193
profile_used.py
# Run, then execute
'''
dump(JSON.stringify(usedFunctions))
'''
# then strip with profile_strip.py
import sys
print 'var usedFunctions = {};'
for line in open(sys.argv[1]).readlines():
line = line.strip()
print line
if line.startswith('function _') and line.endswith(('){', ') {')):
name = line.split(' ')[1].split('(')[0]
print 'usedFunctions["%s"] = 1;' % name
Computing file changes ...