profiling - Gathering JavaScript memory profile data from users -
i'm writing client-heavy site. since own testing me far, i'd gather statistics on how it's performing in wild.
i'm imagining adding sort of profiling code app run percentage of time (so doesn't slow down) , sending info home.
adding timing benchmarks should easy, becomes problem long-running pages lots of js memory usage. there way instrument memory used app normal, unprivileged js code in of major browsers? there other profiling metrics available?
in chrome:
for (var key in performance.memory) { alert(key+': '+performance.memory[key]); }
demo: http://jsfiddle.net/usuxv/1/
sample output:
jsheapsizelimit: 1620000000 usedjsheapsize: 10000000 totaljsheapsize: 16100000
you can use console.memory
. seems return same results.
Comments
Post a Comment