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/ir_coverage.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
« no previous file with comments | « tracing/tracing/model/interaction_record_test.html ('k') | tracing/tracing/model/kernel.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/model/ir_coverage.html
diff --git a/tracing/tracing/model/ir_coverage.html b/tracing/tracing/model/ir_coverage.html
index ff42f28abf3aa987a083e28ae52f84396a588939..b173db1547ca7df223c6ac10aa3e5035b9d22b2e 100644
--- a/tracing/tracing/model/ir_coverage.html
+++ b/tracing/tracing/model/ir_coverage.html
@@ -18,8 +18,7 @@ tr.exportTo('tr.model', function() {
ir.associatedEvents.forEach(function(event) {
// FlowEvents don't have parentContainers or cpuDurations, and it's
// annoying to highlight them.
- if (event instanceof tr.model.FlowEvent)
- return;
+ if (event instanceof tr.model.FlowEvent) return;
allAssociatedEvents.push(event);
});
});
@@ -32,11 +31,15 @@ tr.exportTo('tr.model', function() {
// the set of associated events.
// Only add event to the set of unassociated events if it is not in
// the set of associated events.
- for (var proc of model.getAllProcesses())
- for (var thread of tr.b.dictionaryValues(proc.threads))
- for (var event of thread.sliceGroup.getDescendantEvents())
- if (!associatedEvents.contains(event))
+ for (var proc of model.getAllProcesses()) {
+ for (var thread of tr.b.dictionaryValues(proc.threads)) {
+ for (var event of thread.sliceGroup.getDescendantEvents()) {
+ if (!associatedEvents.contains(event)) {
unassociatedEvents.push(event);
+ }
+ }
+ }
+ }
return unassociatedEvents;
}
@@ -44,8 +47,9 @@ tr.exportTo('tr.model', function() {
var cpuMs = 0;
events.forEach(function(event) {
// Add up events' cpu self time if they have any.
- if (event.cpuSelfTime)
+ if (event.cpuSelfTime) {
cpuMs += event.cpuSelfTime;
+ }
});
return cpuMs;
}
@@ -53,8 +57,7 @@ tr.exportTo('tr.model', function() {
function getIRCoverageFromModel(model) {
var associatedEvents = getAssociatedEvents(model.userModel.expectations);
- if (!associatedEvents.length)
- return undefined;
+ if (!associatedEvents.length) return undefined;
var unassociatedEvents = getUnassociatedEvents(
model, associatedEvents);
@@ -65,8 +68,9 @@ tr.exportTo('tr.model', function() {
var totalEventCount = associatedEvents.length + unassociatedEvents.length;
var totalCpuMs = associatedCpuMs + unassociatedCpuMs;
var coveredEventsCpuTimeRatio = undefined;
- if (totalCpuMs !== 0)
+ if (totalCpuMs !== 0) {
coveredEventsCpuTimeRatio = associatedCpuMs / totalCpuMs;
+ }
return {
associatedEventsCount: associatedEvents.length,
« no previous file with comments | « tracing/tracing/model/interaction_record_test.html ('k') | tracing/tracing/model/kernel.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698