Index: tracing/tracing/model/model.html |
diff --git a/tracing/tracing/model/model.html b/tracing/tracing/model/model.html |
index 8cc5f9b6329d963247dc0fcd98a4ffa7d2372934..113e984c556850ed793d7e704f77b28c4c33cdac 100644 |
--- a/tracing/tracing/model/model.html |
+++ b/tracing/tracing/model/model.html |
@@ -104,7 +104,7 @@ tr.exportTo('tr', function() { |
this.importWarnings_ = []; |
this.reportedImportWarnings_ = {}; |
- this.isTimeHighResolution_ = undefined; |
+ this.isTimeHighResolution_ = true; |
this.patchupsToApply_ = []; |
@@ -393,16 +393,10 @@ tr.exportTo('tr', function() { |
}, |
get isTimeHighResolution() { |
- if (this.isTimeHighResolution_ === undefined) |
- this.isTimeHighResolution_ = this.isTimeHighResolutionHeuristic_(); |
return this.isTimeHighResolution_; |
}, |
set isTimeHighResolution(value) { |
- if (this.isTimeHighResolution_ === value) |
- return; |
- if (this.isTimeHighResolution_ !== undefined) |
- throw new Error('isTimeHighResolution already set'); |
this.isTimeHighResolution_ = value; |
}, |
@@ -573,38 +567,6 @@ tr.exportTo('tr', function() { |
}); |
}, |
- isTimeHighResolutionHeuristic_: function() { |
- if (this.intrinsicTimeUnit !== tr.v.TimeDisplayModes.ms) |
- return false; |
- // If the timer is only precise to the millisecond, then almost all event |
- // will be precisely X ms apart. We check that by looking at the |
- // decimal part of each event's start time. We create 100 bins for |
- // these fractions. If at least 90% of the events are in the same bin then |
- // the timer is deemed to be low resolution. |
- var nbEvents = 0; |
- var nbPerBin = []; |
- var maxEvents = 0; |
- for (var i = 0; i < 100; ++i) |
- nbPerBin.push(0); |
- this.iterateAllEvents(function(event) { |
- nbEvents++; |
- if (event.start !== undefined) { |
- // Compute |
- var remainder = Math.floor( |
- (event.start - Math.floor(event.start)) * 100); |
- nbPerBin[remainder]++; |
- maxEvents = Math.max(maxEvents, nbPerBin[remainder]); |
- } |
- }); |
- // If there are too few events our heuristic is not very good, assume the |
- // timer is high resolution. |
- if (nbEvents < 100) |
- return true; |
- // If more than 90% of the events are snapped precisely on milliseconds |
- // boundary we got a trace with a low resolution timer. |
- return (maxEvents / nbEvents) < 0.9; |
- }, |
- |
/** |
* Called by the model to join references between objects, after final model |
* bounds have been computed. |