aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-11-21 17:49:58 +0100
committerAlon Zakai <alonzakai@gmail.com>2012-11-21 20:47:02 +0100
commitb74207976b1e6b4972bcfee9512b6847ebc1625e (patch)
tree5ce23979f45ae8ad9db8d10e3cdea92dab63d751
parentcbfcb2e9f1591407cd4d64c1a0237c4783fe2450 (diff)
print out total time in emcc in debug mode
-rwxr-xr-xemcc4
1 files changed, 4 insertions, 0 deletions
diff --git a/emcc b/emcc
index ccb57df6..7e7efe6d 100755
--- a/emcc
+++ b/emcc
@@ -713,6 +713,8 @@ try:
minify_whitespace = closure # if closure is run, minify whitespace
if opt_level <= 0: keep_debug = True # always keep debug in -O0
+ if DEBUG: start_time = time.time() # done after parsing arguments, which might affect debug state
+
if closure:
assert os.path.exists(shared.CLOSURE_COMPILER), 'emcc: fatal: Closure compiler (%s) does not exist' % shared.CLOSURE_COMPILER
@@ -1240,6 +1242,8 @@ try:
# copy final JS to output
shutil.move(final, target)
+ if DEBUG: print >> sys.stderr, 'emcc: total time: %.2f seconds' % (time.time() - start_time)
+
finally:
if not TEMP_DIR:
try: