Home | History | Annotate | Download | only in test_data

Lines Matching full:timestamps

33 "saveTraceFileComplete")},onSaveTraceFileCanceled:function(){cr.dispatchSimpleEvent(this,"saveTraceFileCanceled")},selfTest:function(){this.beginTracing();window.setTimeout(this.endTracing.bind(This),500)}};return{TracingController:g}});cr.define("tracing",function(){function g(a,b,d,c,f){this.title=a;this.start=d;this.colorId=b;this.args=c;this.didNotFinish=!1;void 0!==f&&(this.duration=f)}function e(a,b,d,c,f){g.call(this,a,b,d,c,f);this.subSlices=[]}function c(a,b,d,c){g.call(this,a,b,d,c)}function f(a,b){if(!a)throw"Parent must be provided.";this.parent=a;this.tid=b;this.subRows=[[]];this.asyncSlices=new d(this.ptid)}function h(a,b,d){this.parent=a;this.id=b;this.name=d;this.seriesNames=[];this.seriesColors=[];this.timestamps=
38 -1:d.name?1:b.tid-d.tid};h.prototype={__proto__:Object.prototype,get numSeries(){return this.seriesNames.length},get numSamples(){return this.timestamps.length},shiftTimestampsForward:function(a){for(var b=0;b<this.timestamps.length;b++)this.timestamps[b]+=a},updateBounds:function(){if(this.seriesNames.length!=this.seriesColors.length)throw"seriesNames.length must match seriesColors.length";if(this.numSeries*this.numSamples!=this.samples.length)throw"samples.length must be a multiple of numSamples.";
39 this.totals=[];if(0==this.samples.length)this.maxTimestamp=this.minTimestamp=void 0,this.maxTotal=0;else{this.minTimestamp=this.timestamps[0];this.maxTimestamp=this.timestamps[this.timestamps.length-1];for(var a=this.numSeries,b=-Infinity,d=0;d<this.timestamps.length;d++){for(var c=0,f=0;f<a;f++)c+=this.samples[d*a+f],this.totals.push(c);c>b&&(b=c)}this.maxTotal=b}}};h.compare=function(b,d){if(b.parent.pid!=d.parent.pid)return a.compare(b.parent,d.parent.pid);var c=b.name.localeCompare(d.name);return 0==
62 e,m.start,{},m.duration))}a.cpuSlices=d}})},alignClocks:function(){if(0==this.clockSyncRecords_.length){if(!this.isAdditionalImport_)return;this.abortImport();return!1}var a=this.clockSyncRecords_[0];if(0==a.parentTS||a.parentTS==a.perfTS)return!0;var a=a.parentTS-a.perfTS,b;for(b in this.cpuStates_){for(var d=this.cpuStates_[b].cpu,c=0;c<d.slices.length;c++){var f=d.slices[c];f.start+=a;f.duration=f.duration}for(var e in d.counters){c=d.counters[e];for(f=0;f<c.timestamps.length;f++)c.timestamps[f]+=
69 ".state")));a.timestamps.push(b);a.samples.push(d)},importCpuData:function(){this.lines_=this.events_.split("\n");for(this.lineNumber=0;this.lineNumber<this.lines_.length;++this.lineNumber){var a=this.lines_[this.lineNumber];if(!(/^#/.exec(a)||0==a.length)){var b=f.exec(a);if(b){var a=b[1],d=b[2],c=b[4],e=b[5],b=b[6],h=this.eventDefinitions[e];if(h){var g;if(h.format){if(g=h.format.exec(b),!g){this.malformedEvent(e);continue}}else g={};g.timestamp=1E3*parseFloat(c);g.name=e;g.info=b;g.taskId=a;g.cpuState=
71 handler:function(a,b){var d=b[1],c=parseInt(b[2]),f=parseInt(b[3]);a.markPidRunnable(b.timestamp,c,d,f)}},power_start:{format:/type=(\d+) state=(\d) cpu_id=(\d)+/,handler:function(a,b){var d=parseInt(b[3]),d=a.getOrCreateCpuState(d);if("1"==b[1]){d=d.cpu.getOrCreateCounter("","C-State");0==d.numSeries&&(d.seriesNames.push("state"),d.seriesColors.push(tracing.getStringColorId(d.name+".state")));var c=parseInt(b[2]);d.timestamps.push(b.timestamp);d.samples.push(c)}else a.importError("Don't understand power_start events of type "+
72 b[1])}},power_frequency:{format:/type=(\d+) state=(\d+) cpu_id=(\d)+/,handler:function(a,b){var d=parseInt(b[3]),d=a.getOrCreateCpuState(d).cpu.getOrCreateCounter("","Power Frequency");0==d.numSeries&&(d.seriesNames.push("state"),d.seriesColors.push(tracing.getStringColorId(d.name+".state")));var c=parseInt(b[2]);d.timestamps.push(b.timestamp);d.samples.push(c)}},cpu_frequency:{format:/state=(\d+) cpu_id=(\d)+/,handler:function(a,b){var d=parseInt(b[2]),d=a.getOrCreateCpuState(d).cpu.getOrCreateCounter("",
73 "Clock Frequency");0==d.numSeries&&(d.seriesNames.push("state"),d.seriesColors.push(tracing.getStringColorId(d.name+".state")));var c=parseInt(b[1]);d.timestamps.push(b.timestamp);d.samples.push(c)}},cpu_idle:{format:/state=(\d+) cpu_id=(\d)+/,handler:function(a,b){var d=parseInt(b[2]),d=a.getOrCreateCpuState(d).cpu.getOrCreateCounter("","C-State");0==d.numSeries&&(d.seriesNames.push("state"),d.seriesColors.push(tracing.getStringColorId(d.name)));var c=parseInt(b[1]);4294967295!=c?d.samples.push(c):
74 d.samples.push(0);d.timestamps.push(b.timestamp)}},workqueue_execute_start:{format:/work struct (.+): function (\S+)/,handler:function(a,b){var d=a.getOrCreateKernelThread(b.taskId);a.openSlice(d,b[2],b.timestamp)}},workqueue_execute_end:{format:/work struct (.+)/,handler:function(a,b){var d=a.getOrCreateKernelThread(b.taskId);a.closeSlice(d,b.timestamp,{})}},workqueue_queue_work:{},workqueue_activate_work:{},ext4_sync_file_enter:{format:/dev (\d+,\d+) ino (\d+) parent (\d+) datasync (\d+)/,handler:function(a,
84 f.numSeries){for(var e in c.args)f.seriesNames.push(e),f.seriesColors.push(tracing.getStringColorId(f.name+"."+e));if(0==f.numSeries){this.model_.importErrors.push("Expected counter "+c.name+" to have at least one argument to use as a value.");delete f.parent.counters[f.name];return}}f.timestamps.push(c.ts/1E3);for(var a=0;a<f.numSeries;a++)e=f.seriesNames[a],void 0===c.args[e]?f.samples.push(0):f.samples.push(c.args[e])},importEvents:function(){for(var c=this.events_,f=0;f<c.length;f++){var e=c[f],
119 j+=t;d+=" "+c(k,a)+": "+f(g(t)+"ms",12)+" "+f(""+v.slices.length,5)+" occurrences\n"}d+=c("*Totals",a)+" : "+f(g(j)+"ms",12)+" "+f(""+e.length,5)+" occurrences\n";d=d+"\n"+(c("Selection start",a)+" : "+f(g(o)+"ms",12)+"\n");d+=c("Selection extent",a)+" : "+f(g(q-o)+"ms",12)+"\n"}if(1==h.length){d="Selected counter:\n";a=55;h=h[0];e=h.counter;h=h.sampleIndex;k=[];for(l=0;l<e.numSeries;++l)k.push(e.samples[e.numSeries*h+l]);d+=c("Title",a)+": "+e.name+"\n";d+=c("Timestamp",a)+": "+g(e.timestamps[h])+
142 set counter(a){this.counter_=a;this.invalidate()},get selectedSamples(){return this.selectedSamples_},redraw:function(){var a=this.counter_,b=this.ctx_,c=this.canvas_.width,d=this.canvas_.height;b.clearRect(0,0,c,d);var e=this.viewport_,g=e.xViewVectorToWorld(1),h=e.xViewToWorld(0),c=e.xViewToWorld(c),i=e.xViewVectorToWorld(1);b.save();e.applyTransformToCanavs(b);for(var e=a.numSeries,j=a.numSamples,k=tracing.findLowIndexInSortedArray(a.timestamps,function(){},h),l=d/a.maxTotal,m=a.numSeries-1;0<=
143 m;m--){b.fillStyle=f[a.seriesColors[m]];b.beginPath();for(var o=k-1,w=0<=o?a.timestamps[o]-i:-1,x=d,A=!1;;){var r=o+1;if(r>=j){b.lineTo(w,x);b.lineTo(w+8*g,x);b.lineTo(w+8*g,d);break}var s=a.timestamps[r],o=a.totals[r*e+m],z=d-l*o;if(s>c){b.lineTo(s,x);b.lineTo(s,d);break}s-w<i?o=r:(A||(b.moveTo(h,d),A=!0),b.lineTo(s,x),b.lineTo(s,z),o=r,w=s,x=z)}b.closePath();b.fill()}b.fillStyle="rgba(255, 0, 0, 1)";for(r in this.selectedSamples_)if(this.selectedSamples_[r]){s=a.timestamps[r];for(m=a.numSeries-
144 1;0<=m;m--)o=a.totals[r*e+m],z=d-l*o,b.fillRect(s-g,z-1,3*g,3)}b.restore()},addIntersectingItemsToSelection:function(a,b,c){var d=this.getBoundingClientRect();if(b<d.top||b>=d.bottom)return!1;b=this.counter_;if(a<this.counter_.timestamps[0])return!1;d=tracing.findLowIndexInSortedArray(b.timestamps,function(a){return a},a);if(0>d||d>=b.timestamps.length)return!1;0<d&&a>this.counter_.timestamps[d-1]&&d--;this.getBoundingClientRect();this.decorateHit(c.addCounterSample(this,this.counter,d));return!0},
145 addIntersectingItemsInRangeToSelection:function(a,b,c,d,f){var e=this.getBoundingClientRect(),c=Math.max(c,e.top),d=Math.min(d,e.bottom);if(!(c>d)){d=this.counter_;c=tracing.findLowIndexInSortedArray(d.timestamps,function(a){return a},a);e=tracing.findLowIndexInSortedArray(d.timestamps,function(a){return a},b);0<c&&a>d.timestamps[c-1]&&c--;0<e&&b>d.timestamps[e-1]&&e--;for(a=c;a<=e;a++)a>=d.timestamps.length||this.decorateHit(f.addCounterSample(this,this.counter,a))}},addAllObjectsMatchingFilterToSelection:function(){}};