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

Unified Diff: trace_processor/experimental/mappers/trace_stats.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
Index: trace_processor/experimental/mappers/trace_stats.html
diff --git a/trace_processor/experimental/mappers/trace_stats.html b/trace_processor/experimental/mappers/trace_stats.html
index a8e48a0c39b37d5edc77b6365ca3ab64c58e6305..d86c7608411edf3af34fb3c472e1da10d22dc2d5 100644
--- a/trace_processor/experimental/mappers/trace_stats.html
+++ b/trace_processor/experimental/mappers/trace_stats.html
@@ -5,7 +5,7 @@ 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/math/range.html">
<link rel="import" href="/tracing/base/unit.html">
<link rel="import" href="/tracing/mre/function_handle.html">
<link rel="import" href="/tracing/value/histogram.html">
@@ -23,7 +23,7 @@ tr.exportTo('pi.m', function() {
var lastTime = 0;
var categories = {};
- var seconds_counts = {};
+ var secondsCounts = {};
for (var event of model.getDescendantEvents()) {
eventCount += 1;
if (event.start < firstTime)
@@ -39,17 +39,17 @@ tr.exportTo('pi.m', function() {
categories[event.category]++;
var second = Math.round(event.start / 1000);
- if (seconds_counts[second] === undefined)
- seconds_counts[second] = 0;
+ if (secondsCounts[second] === undefined)
+ secondsCounts[second] = 0;
- seconds_counts[second]++;
+ secondsCounts[second]++;
}
var histogram = new tr.v.Histogram(
tr.b.Unit.byName.count, COUNT_BOUNDARIES);
- for (var second in seconds_counts)
- histogram.add(seconds_counts[second]);
+ for (var second in secondsCounts)
+ histogram.add(secondsCounts[second]);
var stats = {
totalEvents: eventCount,
@@ -66,7 +66,7 @@ tr.exportTo('pi.m', function() {
tr.mre.FunctionRegistry.register(traceStatsFunction);
- //Exporting for tests.
+ // Exporting for tests.
return {
traceStatsFunctionForTest: traceStatsFunction
};
« no previous file with comments | « trace_processor/experimental/mappers/slice_cost.html ('k') | trace_processor/experimental/mappers/v8_map_function.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698