Skip to content

Commit b742079

Browse files
committed
print out total time in emcc in debug mode
1 parent cbfcb2e commit b742079

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

emcc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,8 @@ try:
713713
minify_whitespace = closure # if closure is run, minify whitespace
714714
if opt_level <= 0: keep_debug = True # always keep debug in -O0
715715

716+
if DEBUG: start_time = time.time() # done after parsing arguments, which might affect debug state
717+
716718
if closure:
717719
assert os.path.exists(shared.CLOSURE_COMPILER), 'emcc: fatal: Closure compiler (%s) does not exist' % shared.CLOSURE_COMPILER
718720

@@ -1240,6 +1242,8 @@ try:
12401242
# copy final JS to output
12411243
shutil.move(final, target)
12421244

1245+
if DEBUG: print >> sys.stderr, 'emcc: total time: %.2f seconds' % (time.time() - start_time)
1246+
12431247
finally:
12441248
if not TEMP_DIR:
12451249
try:

0 commit comments

Comments
 (0)