Lines Matching refs:category
33 openAsyncSlice:function(a,e,b,g,h){e=new tracing.trace_model.AsyncSlice(e,b,tracing.getStringColorId(b),h);e.id=g;e.startThread=a;this.openAsyncSlices||(this.openAsyncSlices={});this.openAsyncSlices[b+":"+g]=e},closeAsyncSlice:function(a,e,b,g){this.openAsyncSlices&&(e=e+":"+b,b=this.openAsyncSlices[e])&&(b.endThread=a,b.duration=g-b.start,b.startThread.asyncSliceGroup.push(b),b.subSlices=[new tracing.trace_model.Slice(b.category,b.title,b.colorId,b.start,b.args,b.duration)],delete this.openAsyncSlices[e])},
126 a.name.toLowerCase().indexOf(this.text_)},matchSlice:function(a){return 0===this.text_.length||void 0===a.title?!1:-1!==a.title.toLowerCase().indexOf(this.text_)}};a.prototype={__proto__:d.prototype,addCategory:function(a){this.categories_[a]=!0},matchCounter:function(a){return a.category?!this.categories_[a.category]:!0},matchSlice:function(a){return a.category?!this.categories_[a.category]:!0}};return{filterCounterArray:function(a,b){if(void 0===a)return b;for(var f=[],g=0;g<b.length;++g)a.matchCounter(b[g])&&
128 base.exportTo("tracing.trace_model",function(){function d(b,a,c,e){this.guid_=base.GUID.allocate();this.parent=b;this.id=a;this.category=c||"";this.name=e;this.series_=[];this.bounds=new base.Range}d.prototype={__proto__:Object.prototype,get guid(){return this.guid_},toJSON:function(){for(var b={},a=Object.keys(this),c=0;c<a.length;c++){var e=a[c];"function"!=typeof this[e]&&(b[e]="parent"==e?this[e].guid:this[e])}return b},set timestamps(b){throw Error("Bad counter API. No cookie.");},set seriesNames(b){throw Error("Bad counter API. No cookie.");
131 this.maxTotal=Math.max(e,this.maxTotal)}}}};d.compare=function(b,a){var c=b.parent.compareTo(a);if(0!=c)return c;c=b.name.localeCompare(a.name);return 0==c?b.tid-a.tid:c};return{Counter:d}});"use strict";base.exportTo("tracing.trace_model",function(){function d(b,a,c,e,f){this.category=b||"";this.title=a;this.colorId=c;this.start=e;this.args=f;this.didNotFinish=!1}d.prototype={selected:!1,duration:0,get end(){return this.start}};return{TraceModelEvent:d}});"use strict";base.require("tracing.trace_model.trace_model_event");
134 this.slices.length&&(this.bounds.addValue(this.slices[0].start),this.bounds.addValue(this.slices[this.slices.length-1].end));for(var a in this.counters)this.counters[a].updateBounds(),this.bounds.addRange(this.counters[a].bounds)},addCategoriesToDict:function(a){for(var c=0;c<this.slices.length;c++)a[this.slices[c].category]=!0;for(var b in this.counters)a[this.counters[b].category]=!0}};d.compare=function(a,c){return a.cpuNumber-c.cpuNumber};return{Cpu:d}});"use strict";
143 base.exportTo("tracing.trace_model",function(){function d(b,a,c,e,f){this.parent=b;this.id=a;this.category=c;this.name=e;this.creationTs=f;this.creationTsWasExplicit=!1;this.deletionTs=Number.MAX_VALUE;this.selected=this.deletionTsWasExplicit=!1;this.colorId=0;this.bounds=new base.Range;this.snapshots=[];this.hasImplicitSnapshots=!1}d.prototype={__proto__:Object.prototype,get typeName(){return this.name},addSnapshot:function(b,a){if(b<this.creationTs)throw Error("Snapshots must be >= instance.creationTs");
156 this.instanceMapsById_[b];if(a)return a;a=new tracing.trace_model.TimeToObjectInstanceMap(this.createObjectInstance_,this.parent,b);return this.instanceMapsById_[b]=a},idWasCreated:function(b,a,c,e){return this.getOrCreateInstanceMap_(b).idWasCreated(a,c,e)},addSnapshot:function(b,a,c,e,f){b=this.getOrCreateInstanceMap_(b,a,c,e).addSnapshot(a,c,e,f);if(b.objectInstance.category!=a)throw Error("Added snapshot with different category than when it was created");if(b.objectInstance.name!=c)throw Error("Added snapshot with different name than when it was created");
157 return b},idWasDeleted:function(b,a,c,e){if(b=this.getOrCreateInstanceMap_(b,a,c,e).idWasDeleted(a,c,e)){if(b.category!=a)throw Error("Deleting an object with a different category than when it was created");if(b.name!=c)throw Error("Deleting an object with a different name than when it was created");}},autoDeleteObjects:function(b){base.iterItems(this.instanceMapsById_,function(a,c){var e=c.lastInstance;e.deletionTs==Number.MAX_VALUE&&(c.idWasDeleted(e.category,e.name,b),e.deletionTsWasExplicit=!1)})},
160 addCategoriesToDict:function(b){this.iterObjectInstances(function(a){b[a.category]=!0})},toJSON:function(){return{}}};return{ObjectCollection:d}});"use strict";base.require("tracing.trace_model.slice");
169 new this.sliceConstructor(a.category,a.title,a.colorId,a.start,a.args,a.duration);c.didNotFinish=a.didNotFinish;return c}};d.merge=function(a,c){if(0<a.openPartialSlices_.length)throw Error("groupA has open partial slices");if(0<c.openPartialSlices_.length)throw Error("groupB has open partial slices");for(var b=new d,f=a.slices,g=c.slices,h=f.length-1,k=g.length-1,l=[],m=[],n=function(a){for(var c=0;c<m.length;c++){var f=m[c],g=f.end;if(a<f.start||g<a)throw Error("slice should not be split");var d=
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: "+
188 this.bounds.addRange(this.objects.bounds)},addCategoriesToDict:function(a){for(var b in this.threads)this.threads[b].addCategoriesToDict(a);for(var f in this.counters)a[this.counters[f].category]=!0;this.objects.addCategoriesToDict(a)},findAllThreadsNamed:function(a){var b=[],f;for(f in this.threads){var g=this.threads[f];g.name==a&&b.push(g)}return b},pruneEmptyContainers:function(){var a={},b;for(b in this.threads){var f=this.threads[b];f.isEmpty||(a[b]=f)}this.threads=a},getOrCreateThread:function(a){this.threads[a]||
251 createImplicitObjects_:function(){base.iterItems(this.model_.processes,function(a,c){this.createImplicitObjectsForProcess_(c)},this)},createImplicitObjectsForProcess_:function(a){function c(c,b,e,d){if(e&&void 0!==e.id&&!(e instanceof tracing.trace_model.ObjectSnapshot)){var l=e.id,m=/(.+)\/(.+)/.exec(l);if(!m)throw Error("Implicit snapshots must have names.");delete e.id;var n=m[1],m=m[2],p;try{p=a.objects.addSnapshot(m,d.objectInstance.category,n,d.ts,e)}catch(q){this.model_.importErrors.push("While processing implicit snapshot of "+
310 base.exportTo("tracing.analysis",function(){function d(b,a){var c=a.slice,e=b.appendTable("analysis-slice-table",2);b.appendTableHeader(e,"Selected slice:");b.appendSummaryRow(e,"Title",c.title);c.category&&b.appendSummaryRow(e,"Category",c.category);b.appendSummaryRowTime(e,"Start",c.start);b.appendSummaryRowTime(e,"Duration",c.duration);c.durationInUserTime&&b.appendSummaryRowTime(e,"Duration (U)",c.durationInUserTime);var f=0,d;for(d in c.args)f+=1;if(0<f)for(d in b.appendSummaryRow(e,"Args"),
348 base.exportTo("tracing",function(){var d=ui.define("div");d.prototype={__proto__:ui.Overlay.prototype,decorate:function(){ui.Overlay.prototype.decorate.call(this);this.className="view-category-filter-overlay";this.obeyCloseEvents=!0;var b=base.instantiateTemplate("#view-category-filter-dialog-template");this.appendChild(b);this.formEl_=this.querySelector("form");this.categoriesEl_=this.querySelector(".categories");this.addEventListener("visibleChange",this.onVisibleChange_.bind(this))},set categories(b){this.categories_=
521 new tracing.CategoryFilter(b))},createCategoryFilterButton_:function(){var b=base.instantiateTemplate("#category-filter-btn-template").querySelector(".view-info-button");b.addEventListener("click",function(){var a=new tracing.CategoryFilterDialog;a.categories=this.model.categories;a.settings_key="categories";a.settingUpdatedCallback=this.updateCategoryFilter_.bind(this);a.visible=!0}.bind(this));var a=function(){b.style.display=this.model?"":"none"}.bind(this);a();this.addEventListener("modelChange",