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

Unified Diff: tracing/tracing/metrics/system_health/loading_metric.html

Issue 2776653002: [ESLint] Fix violations when enabling curly rule in eslint. (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: tracing/tracing/metrics/system_health/loading_metric.html
diff --git a/tracing/tracing/metrics/system_health/loading_metric.html b/tracing/tracing/metrics/system_health/loading_metric.html
index dabd83225fa6e6b8fb267d5c08b189175384e31d..95130e439423be1d2e1b2f977f77c8b612e26107 100644
--- a/tracing/tracing/metrics/system_health/loading_metric.html
+++ b/tracing/tracing/metrics/system_health/loading_metric.html
@@ -54,12 +54,14 @@ tr.exportTo('tr.metrics.sh', function() {
function NavigationStartFinder(rendererHelper) {
this.navigationStartsForFrameId_ = {};
for (var ev of rendererHelper.mainThread.sliceGroup.childEvents()) {
- if (!hasCategoryAndName(ev, 'blink.user_timing', 'navigationStart'))
+ if (!hasCategoryAndName(ev, 'blink.user_timing', 'navigationStart')) {
continue;
+ }
var frameIdRef = ev.args['frame'];
var list = this.navigationStartsForFrameId_[frameIdRef];
- if (list === undefined)
+ if (list === undefined) {
this.navigationStartsForFrameId_[frameIdRef] = list = [];
+ }
list.unshift(ev);
}
}
@@ -71,8 +73,9 @@ tr.exportTo('tr.metrics.sh', function() {
var eventBeforeTimestamp;
for (var ev of list) {
if (ev.start > ts) continue;
- if (eventBeforeTimestamp === undefined)
+ if (eventBeforeTimestamp === undefined) {
eventBeforeTimestamp = ev;
+ }
}
if (eventBeforeTimestamp === undefined) return undefined;
return eventBeforeTimestamp;
@@ -130,14 +133,16 @@ tr.exportTo('tr.metrics.sh', function() {
function findFirstMeaningfulPaintCandidates(rendererHelper) {
var candidatesForFrameId = {};
for (var ev of rendererHelper.process.getDescendantEvents()) {
- if (!hasCategoryAndName(ev, 'loading', 'firstMeaningfulPaintCandidate'))
+ if (!hasCategoryAndName(ev, 'loading', 'firstMeaningfulPaintCandidate')) {
continue;
+ }
if (rendererHelper.isTelemetryInternalEvent(ev)) continue;
var frameIdRef = ev.args['frame'];
if (frameIdRef === undefined) continue;
var list = candidatesForFrameId[frameIdRef];
- if (list === undefined)
+ if (list === undefined) {
candidatesForFrameId[frameIdRef] = list = [];
+ }
list.push(ev);
}
return candidatesForFrameId;
@@ -410,8 +415,9 @@ tr.exportTo('tr.metrics.sh', function() {
}
function addSamplesToHistogram(samples, histogram) {
- for (var sample of samples)
+ for (var sample of samples) {
histogram.addSample(sample.value, sample.diagnostics);
+ }
}
function loadingMetric(histograms, model) {

Powered by Google App Engine
This is Rietveld 408576698