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

Lines Matching refs:samples_

28 base.exportTo("tracing.trace_model",function(){function d(a,c){this.guid_=base.GUID.allocate();this.timestamp_=a;this.value_=c}function b(a,c){this.guid_=base.GUID.allocate();this.name_=a;this.color_=c;this.timestamps_=[];this.samples_=[]}d.prototype={__proto__:Object.prototype,get value(){return this.value_},set timestamp(a){this.timestamp_=a},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}};
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}});
172 base.exportTo("tracing.trace_model",function(){function d(c,b,e,d,l,m){a.call(this,c,b,e,d,l,m);this.subSlices=[]}function b(a,b){this.guid_=base.GUID.allocate();if(!a)throw Error("Parent must be provided.");this.parent=a;this.sortIndex=0;this.tid=b;this.sliceGroup=new c(d);this.cpuSlices=void 0;this.samples_=[];this.kernelSliceGroup=new c;this.asyncSliceGroup=new e;this.bounds=new base.Range;this.ephemeralSettings={}}var a=tracing.trace_model.Slice,c=tracing.trace_model.SliceGroup,e=tracing.trace_model.AsyncSliceGroup;
173 d.prototype={__proto__:a.prototype};b.prototype={get guid(){return this.guid_},compareTo:function(a){return b.compare(this,a)},toJSON:function(){for(var a={},c=Object.keys(this),b=0;b<c.length;b++){var e=c[b];"function"!=typeof this[e]&&(a[e]="parent"==e?this[e].guid:this[e])}return a},addSample:function(a,c,b,e){if(this.samples_.length&&b<this.samples_[this.samples_.length-1].start)throw Error("Samples must be added in increasing timestamp order.");var d=tracing.getStringColorId(c);a=new tracing.trace_model.Sample(a,
174 c,d,b,e?e:{});this.samples_.push(a);return a},get samples(){return this.samples_},name:void 0,shiftTimestampsForward:function(a){this.sliceGroup.shiftTimestampsForward(a);if(this.cpuSlices)for(var c=0;c<this.cpuSlices.length;c++)this.cpuSlices[c].start+=a;if(this.samples_.length)for(c=0;c<this.samples_.length;c++)this.samples_[c].start+=a;this.kernelSliceGroup.shiftTimestampsForward(a);this.asyncSliceGroup.shiftTimestampsForward(a)},get isEmpty(){return this.sliceGroup.length||this.sliceGroup.openSliceCount||
175 this.cpuSlices&&this.cpuSlices.length||this.kernelSliceGroup.length||this.asyncSliceGroup.length||this.samples_.length?!1:!0},updateBounds:function(){this.bounds.reset();this.sliceGroup.updateBounds();this.bounds.addRange(this.sliceGroup.bounds);this.kernelSliceGroup.updateBounds();this.bounds.addRange(this.kernelSliceGroup.bounds);this.asyncSliceGroup.updateBounds();this.bounds.addRange(this.asyncSliceGroup.bounds);this.cpuSlices&&this.cpuSlices.length&&(this.bounds.addValue(this.cpuSlices[0].start),
176 this.bounds.addValue(this.cpuSlices[this.cpuSlices.length-1].end));this.samples_.length&&(this.bounds.addValue(this.samples_[0].start),this.bounds.addValue(this.samples_[this.samples_.length-1].end))},addCategoriesToDict:function(a){for(var c=0;c<this.sliceGroup.length;c++)a[this.sliceGroup.slices[c].category]=!0;for(c=0;c<this.kernelSliceGroup.length;c++)a[this.kernelSliceGroup.slices[c].category]=!0;for(c=0;c<this.asyncSliceGroup.length;c++)a[this.asyncSliceGroup.slices[c].category]=!0;for(c=0;c<
177 this.samples_.length;c++)a[this.samples_[c].category]=!0},autoCloseOpenSlices:function(a){this.sliceGroup.autoCloseOpenSlices(a);this.kernelSliceGroup.autoCloseOpenSlices(a)},mergeKernelWithUserland:function(){if(0<this.kernelSliceGroup.length){var a=c.merge(this.sliceGroup,this.kernelSliceGroup);this.sliceGroup.slices=a.slices;this.kernelSliceGroup=new c;this.updateBounds()}},get userFriendlyName(){return this.name||this.tid},get userFriendlyDetails(){return"tid: "+this.tid+(this.name?", name: "+