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

Unified Diff: tracing/tracing/model/power_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/power_sample_test.html ('k') | tracing/tracing/model/process_base.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/model/power_series.html
diff --git a/tracing/tracing/model/power_series.html b/tracing/tracing/model/power_series.html
index af7f0601a7f34ada454c67c9a9249d1aadde9979..5e302fcda1c5abe764bc7776225c35f4a87c460f 100644
--- a/tracing/tracing/model/power_series.html
+++ b/tracing/tracing/model/power_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/power_sample.html">
@@ -61,12 +61,12 @@ tr.exportTo('tr.model', function() {
* start and end timestamps (in milliseconds).
*/
getEnergyConsumedInJ: function(start, end) {
- var measurementRange = tr.b.Range.fromExplicitRange(start, end);
+ var measurementRange = tr.b.math.Range.fromExplicitRange(start, end);
var energyConsumedInJ = 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)
@@ -76,7 +76,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);
@@ -94,9 +94,9 @@ tr.exportTo('tr.model', function() {
},
getSamplesWithinRange: function(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/power_sample_test.html ('k') | tracing/tracing/model/process_base.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698