• jarin's avatar
    Runtime call counters and timers. · 747bd6f2
    jarin authored
    In d8, run with --runtime-call-stats and it will output the stats when d8 finishes.
    
    In Chrome, run the following: (only on trusted code, this punches *massive* security hole into Chrome)
    
    chrome --js-flags="--runtime-call-stats --allow-natives-syntax"
    
    To get the stats in the console, just run
    
    console.log(%GetAndResetRuntimeCallStats());
    
    To output stats every second:
    
    setInterval(function() { console.log(%GetAndResetRuntimeCallStats()); }, 1000)
    
    Review URL: https://codereview.chromium.org/1615943002
    
    Cr-Commit-Position: refs/heads/master@{#33462}
    747bd6f2
runtime.h 49.4 KB