Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(272)

Unified Diff: tracing/tracing/model/resource_usage_series.html

Issue 2771723003: [tracing] Move math utilities from base into their own subdirectory (attempt 2) (Closed)
Patch Set: rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tracing/tracing/model/resource_usage_sample_test.html ('k') | tracing/tracing/model/slice_group.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/model/resource_usage_series.html
diff --git a/tracing/tracing/model/resource_usage_series.html b/tracing/tracing/model/resource_usage_series.html
index e9ba2f6f2203b1219acc670c67b66b6b92243686..282278bb377450818c14a3da5be6c281d0521dc1 100644
--- a/tracing/tracing/model/resource_usage_series.html
+++ b/tracing/tracing/model/resource_usage_series.html
@@ -5,8 +5,8 @@ Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/base/sorted_array_utils.html">
+<link rel="import" href="/tracing/base/math/range.html">
+<link rel="import" href="/tracing/base/math/sorted_array_utils.html">
<link rel="import" href="/tracing/base/unit_scale.html">
<link rel="import" href="/tracing/model/event_container.html">
<link rel="import" href="/tracing/model/resource_usage_sample.html">
@@ -59,12 +59,12 @@ tr.exportTo('tr.model', function() {
* the specified start and end timestamps (in milliseconds).
*/
computeResourceTimeConsumedInMs(start, end) {
- var measurementRange = tr.b.Range.fromExplicitRange(start, end);
+ var measurementRange = tr.b.math.Range.fromExplicitRange(start, end);
var resourceTimeInMs = 0;
- var startIndex = tr.b.findLowIndexInSortedArray(
+ var startIndex = tr.b.math.findLowIndexInSortedArray(
this.samples, x => x.start, start) - 1;
- var endIndex = tr.b.findLowIndexInSortedArray(
+ var endIndex = tr.b.math.findLowIndexInSortedArray(
this.samples, x => x.start, end);
if (startIndex < 0) startIndex = 0;
@@ -73,7 +73,7 @@ tr.exportTo('tr.model', function() {
var sample = this.samples[i];
var nextSample = this.samples[i + 1];
- var sampleRange = new tr.b.Range();
+ var sampleRange = new tr.b.math.Range();
sampleRange.addValue(sample.start);
sampleRange.addValue(nextSample ? nextSample.start : sample.start);
@@ -87,9 +87,9 @@ tr.exportTo('tr.model', function() {
}
getSamplesWithinRange(start, end) {
- var startIndex = tr.b.findLowIndexInSortedArray(
+ var startIndex = tr.b.math.findLowIndexInSortedArray(
this.samples, x => x.start, start);
- var endIndex = tr.b.findLowIndexInSortedArray(
+ var endIndex = tr.b.math.findLowIndexInSortedArray(
this.samples, x => x.start, end);
return this.samples.slice(startIndex, endIndex);
}
« no previous file with comments | « tracing/tracing/model/resource_usage_sample_test.html ('k') | tracing/tracing/model/slice_group.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698