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

Unified Diff: tracing/tracing/metrics/system_health/responsiveness_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/responsiveness_metric.html
diff --git a/tracing/tracing/metrics/system_health/responsiveness_metric.html b/tracing/tracing/metrics/system_health/responsiveness_metric.html
index 89309cc771c8cc57809826b3f16cc49abdac5ace..2cdc0911cbd2994c0d64928df523f99a2a70c5b4 100644
--- a/tracing/tracing/metrics/system_health/responsiveness_metric.html
+++ b/tracing/tracing/metrics/system_health/responsiveness_metric.html
@@ -29,9 +29,10 @@ tr.exportTo('tr.metrics.sh', function() {
function computeAnimationThroughput(animationExpectation) {
if (animationExpectation.frameEvents === undefined ||
- animationExpectation.frameEvents.length === 0)
+ animationExpectation.frameEvents.length === 0) {
throw new Error('Animation missing frameEvents ' +
animationExpectation.stableId);
+ }
var durationInS = tr.b.convertUnit(animationExpectation.duration,
tr.b.UnitPrefixScale.METRIC.MILLI,
@@ -41,9 +42,10 @@ tr.exportTo('tr.metrics.sh', function() {
function computeAnimationframeTimeDiscrepancy(animationExpectation) {
if (animationExpectation.frameEvents === undefined ||
- animationExpectation.frameEvents.length === 0)
+ animationExpectation.frameEvents.length === 0) {
throw new Error('Animation missing frameEvents ' +
animationExpectation.stableId);
+ }
var frameTimestamps = animationExpectation.frameEvents;
frameTimestamps = frameTimestamps.toArray().map(function(event) {
@@ -79,8 +81,9 @@ tr.exportTo('tr.metrics.sh', function() {
model.userModel.expectations.forEach(function(ue) {
if (opt_options && opt_options.rangeOfInterest &&
!opt_options.rangeOfInterest.intersectsExplicitRangeInclusive(
- ue.start, ue.end))
+ ue.start, ue.end)) {
return;
+ }
var sampleDiagnosticMap = tr.v.d.DiagnosticMap.fromObject(
{relatedEvents: new tr.v.d.RelatedEventSet([ue])});
@@ -101,23 +104,26 @@ tr.exportTo('tr.metrics.sh', function() {
return;
}
var throughput = computeAnimationThroughput(ue);
- if (throughput === undefined)
+ if (throughput === undefined) {
throw new Error('Missing throughput for ' +
ue.stableId);
+ }
throughputNumeric.addSample(throughput, sampleDiagnosticMap);
var frameTimeDiscrepancy = computeAnimationframeTimeDiscrepancy(ue);
- if (frameTimeDiscrepancy === undefined)
+ if (frameTimeDiscrepancy === undefined) {
throw new Error('Missing frameTimeDiscrepancy for ' +
ue.stableId);
+ }
frameTimeDiscrepancyNumeric.addSample(
frameTimeDiscrepancy, sampleDiagnosticMap);
ue.associatedEvents.forEach(function(event) {
- if (!(event instanceof tr.e.cc.InputLatencyAsyncSlice))
+ if (!(event instanceof tr.e.cc.InputLatencyAsyncSlice)) {
return;
+ }
latencyNumeric.addSample(event.duration, sampleDiagnosticMap);
});
« no previous file with comments | « tracing/tracing/metrics/system_health/power_metric_test.html ('k') | tracing/tracing/metrics/system_health/utils.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698