plugin/boomerang/boomerang-1.0.0.js
/**
	 * Given an array of server timing entries (from the resource timing entry),
	 * [initialize and] increment our count collector of the following format: {
	 *   "metric-one": {
	 *     count: 3,
	 *     counts: {
	 *       "description-one": 2,
	 *       "description-two": 1,
	 *     }
	 *   }
	 * }
	 *
	 * @param {Object} countCollector Per-beacon collection of counts
	 * @param {Array} serverTimingEntries Server Timing Entries from a Resource Timing Entry
	 * @returns nothing
	 */


@param {Object} countCollector Per-beacon collection of counts
@param {Array} serverTimingEntries Server Timing Entries from a Resource Timing Entry
@returns nothing
@param { Object } countCollector Per - beacon collection of counts @param { Array } serverTimingEntries Server Timing Entries from a Resource Timing Entry @returns nothing
function accumulateServerTimingEntries(countCollector, serverTimingEntries) {
		(serverTimingEntries || []).forEach(function(entry) {
			var name = entry.name || entry.metric;
			if (typeof countCollector[name] === "undefined") {
				countCollector[name] = {
					count: 0,
					counts: {}
				};
			}
			var metric = countCollector[name];
			metric.counts[entry.description] = metric.counts[entry.description] || 0;
			metric.counts[entry.description]++;
			metric.count++;
		});
	}
function accumulateServerTimingEntries ( countCollector , serverTimingEntries ) { ( serverTimingEntries || [ ] ) . forEach ( function ( entry ) { var name = entry . name || entry . metric ; if ( typeof countCollector [ name ] === "undefined" ) { countCollector [ name ] = { count : 0 , counts : { } } ; } var metric = countCollector [ name ] ; metric . counts [ entry . description ] = metric . counts [ entry . description ] || 0 ; metric . counts [ entry . description ] ++ ; metric . count ++ ; } ) ; }
Given an array of server timing entries (from the resource timing entry),
 [initialize and] increment our count collector of the following format: {
   "metric-one": {
     count: 3,
     counts: {
       "description-one": 2,
       "description-two": 1,
     }
   }
 }
Given an array of server timing entries ( from the resource timing entry ) [ initialize and ] increment our count collector of the following format : { " metric - one " : { count : 3 counts : { " description - one " : 2 " description - two " : 1 } } }