| 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,
|
|
|