src/debug/timer.js
function printStats() {
  _.each(statsTracker, function(vals, stat) {
    var numStats = vals.length;
    var total = _.reduce(vals, function(memo, num) {
      return memo + num;
    }, 0);
    var avg = parseFloat(total / numStats).toFixed(4) + 'ms';
    var printableTotal = parseFloat(total).toFixed(4) + 'ms';
    logger.log(stat + ': ' + avg + ' (' + printableTotal + ' / ' + numStats + ')');
  });
  statsTracker = {};
}
function printStats() {
  _.each(statsTracker, function(vals, stat) {
    var numStats = vals.length;
    var total = _.reduce(vals, function(memo, num) {
      return memo + num;
    }, 0);
    var avg = parseFloat(total / numStats).toFixed(4) + 'ms';
    var printableTotal = parseFloat(total).toFixed(4) + 'ms';
    logger.log(stat + ': ' + avg + ' (' + printableTotal + ' / ' + numStats + ')');
  });
  statsTracker = {};
}
function printStats ( ) { _ . each ( statsTracker , function ( vals , stat ) { var numStats = vals . length ; var total = _ . reduce ( vals , function ( memo , num ) { return memo + num ; } , 0 ) ; var avg = parseFloat ( total / numStats ) . toFixed ( 4 ) + 'ms' ; var printableTotal = parseFloat ( total ) . toFixed ( 4 ) + 'ms' ; logger . log ( stat + ': ' + avg + ' (' + printableTotal + ' / ' + numStats + ')' ) ; } ) ; statsTracker = { } ; }
Output the average stats to logger
Output the average stats to logger