| Index: tracing/tracing/model/user_model/user_expectation.html
|
| diff --git a/tracing/tracing/model/user_model/user_expectation.html b/tracing/tracing/model/user_model/user_expectation.html
|
| index b4eb17e602906928afed31fb750aa0224cc29b6b..ede22afcbab531888c89c54d5af8671f1f12c3b9 100644
|
| --- a/tracing/tracing/model/user_model/user_expectation.html
|
| +++ b/tracing/tracing/model/user_model/user_expectation.html
|
| @@ -51,20 +51,23 @@ tr.exportTo('tr.model.um', function() {
|
|
|
| computeCompoundEvenSelectionState: function(selection) {
|
| var cess = CompoundEventSelectionState.NOT_SELECTED;
|
| - if (selection.contains(this))
|
| + if (selection.contains(this)) {
|
| cess |= CompoundEventSelectionState.EVENT_SELECTED;
|
| + }
|
|
|
| - if (this.associatedEvents.intersectionIsEmpty(selection))
|
| + if (this.associatedEvents.intersectionIsEmpty(selection)) {
|
| return cess;
|
| + }
|
|
|
| var allContained = this.associatedEvents.every(function(event) {
|
| return selection.contains(event);
|
| });
|
|
|
| - if (allContained)
|
| + if (allContained) {
|
| cess |= CompoundEventSelectionState.ALL_ASSOCIATED_EVENTS_SELECTED;
|
| - else
|
| + } else {
|
| cess |= CompoundEventSelectionState.SOME_ASSOCIATED_EVENTS_SELECTED;
|
| + }
|
| return cess;
|
| },
|
|
|
| @@ -72,8 +75,9 @@ tr.exportTo('tr.model.um', function() {
|
| get associatedSamples() {
|
| var samples = new tr.model.EventSet();
|
| this.associatedEvents.forEach(function(event) {
|
| - if (event instanceof tr.model.ThreadSlice)
|
| + if (event instanceof tr.model.ThreadSlice) {
|
| samples.addEventSet(event.overlappingSamples);
|
| + }
|
| });
|
| return samples;
|
| },
|
| @@ -97,8 +101,9 @@ tr.exportTo('tr.model.um', function() {
|
| // constructor in that prototype object!
|
| // http://javascript.info/tutorial/constructor
|
|
|
| - if (!this.typeInfo_)
|
| + if (!this.typeInfo_) {
|
| throw new Error('Unregistered UserExpectation');
|
| + }
|
|
|
| return this.typeInfo_;
|
| },
|
| @@ -116,8 +121,9 @@ tr.exportTo('tr.model.um', function() {
|
| },
|
|
|
| get title() {
|
| - if (!this.initiatorType)
|
| + if (!this.initiatorType) {
|
| return this.stageTitle;
|
| + }
|
|
|
| return this.initiatorType + ' ' + this.stageTitle;
|
| },
|
| @@ -128,8 +134,9 @@ tr.exportTo('tr.model.um', function() {
|
| get totalCpuMs() {
|
| var cpuMs = 0;
|
| this.associatedEvents.forEach(function(event) {
|
| - if (event.cpuSelfTime)
|
| + if (event.cpuSelfTime) {
|
| cpuMs += event.cpuSelfTime;
|
| + }
|
| });
|
| return cpuMs;
|
| }
|
|
|