Fix whitespace/etc. in examples (#1115)

This commit is contained in:
Isiah Meadows 2016-06-18 03:39:55 -04:00 committed by GitHub
parent 8d4db4bfa9
commit 02cc4ec1d6
21 changed files with 282 additions and 283 deletions

View file

@ -57,7 +57,7 @@ var MemoryStats = function (){
if( perf.memory.totalJSHeapSize === 0 ){
console.warn('totalJSHeapSize === 0... performance.memory is only available in Chrome .')
}
// TODO, add a sanity check to see if values are bucketed.
// If so, reminde user to adopt the --enable-precise-memory-info flag.
// open -a "/Applications/Google Chrome.app" --args --enable-precise-memory-info
@ -76,16 +76,16 @@ var MemoryStats = function (){
var delta = perf.memory.usedJSHeapSize - lastUsedHeap;
lastUsedHeap = perf.memory.usedJSHeapSize;
var color = delta < 0 ? '#830' : '#131';
var ms = perf.memory.usedJSHeapSize;
msMin = Math.min( msMin, ms );
msMax = Math.max( msMax, ms );
msText.textContent = "Mem: " + bytesToSize(ms, 2);
var normValue = ms / (30*1024*1024);
var height = Math.min( 30, 30 - normValue * 30 );
updateGraph( msGraph, height, color);
function bytesToSize( bytes, nFractDigit ){
var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
if (bytes == 0) return 'n/a';
@ -97,5 +97,5 @@ var MemoryStats = function (){
}
}
};
};