Home | History | Annotate | Download | only in chromium-trace

Lines Matching refs:getSample

29 b.prototype={__proto__:Object.prototype,toJSON:function(){for(var a={},c=Object.keys(this),e=0;e<c.length;e++){var b=c[e];"function"!=typeof this[b]&&(a[b]="parent"==b?this[b].guid:this[b])}return a},get length(){return this.timestamps_.length},get name(){return this.name_},get color(){return this.color_},get samples(){return this.samples_},get timestamps(){return this.timestamps_},getSample:function(a){return this.samples_[a]},getTimestamp:function(a){return this.timestamps_[a]},addSample:function(a,
30 c){this.timestamps_.push(a);this.samples_.push(new d(a,c))},getStatistics:function(a){for(var c=0,e=Number.MAX_VALUE,b=-Number.MAX_VALUE,g=0;g<a.length;++g)var h=this.getSample(a[g]).value,c=c+h,e=Math.min(h,e),b=Math.max(h,b);return{min:e,max:b,avg:c/a.length,start:this.getSample(a[0]).value,end:this.getSample(a.length-1).value}},shiftTimestampsForward:function(a){for(var c=0;c<this.timestamps_.length;++c)this.timestamps_[c]+=a,this.samples_[c].timestamp=this.timestamps_[c]}};return{CounterSeries:b}});
130 return a},shiftTimestampsForward:function(b){for(var a=0;a<this.series_.length;++a)this.series_[a].shiftTimestampsForward(b)},updateBounds:function(){this.totals=[];this.maxTotal=0;this.bounds.reset();if(0!==this.series_.length){var b=this.series_[0],a=this.series_[this.series_.length-1];this.bounds.addValue(b.getTimestamp(0));this.bounds.addValue(a.getTimestamp(a.length-1));this.maxTotal=-Infinity;for(var c=0;c<b.length;++c){var e=0;this.series_.forEach(function(a){e+=a.getSample(c).value;this.totals.push(e)}.bind(this));
307 base.exportTo("tracing.analysis",function(){return{analyzeSingleCounterSampleHit:function(d,b){for(var a=b.counter,c=b.sampleIndex,e=[],f=0;f<a.numSeries;++f)e.push(a.getSeries(f).getSample(c).value);var g=d.appendTable("analysis-counter-table",2);d.appendTableHeader(g,"Selected counter:");d.appendSummaryRow(g,"Title",a.name);d.appendSummaryRowTime(g,"Timestamp",a.timestamps[c]);for(f=0;f<a.numSeries;f++)d.appendSummaryRow(g,a.getSeries(f).name,e[f])},analyzeMultipleCounterSampleHits:function(d,b){for(var a=
308 {},c=0;c<b.length;c++){var e=b[c].counter;a[e.guid]||(a[e.guid]=[]);a[e.guid].push(b[c])}var f=d.appendTable("analysis-counter-table",2);d.appendTableHeader(f,"Counters:");for(var g in a){for(var h=a[g],e=h[0].counter,k=[],c=0;c<h.length;c++)k.push(h[c].sampleIndex);h=e.getSampleStatistics(k);for(c=0;c<h.length;c++){for(var l=[],m=0;m<k.length;++m)l.push(e.getSeries(c).getSample(k[m]).value);d.appendDataRow(f,e.name+": series("+e.getSeries(c).name+")",l,l.length,h[c])}}}}});"use strict";base.requireStylesheet("tracing.analysis.analyze_slices");