(tree, result, resultAnnotation)
| 89 | } |
| 90 | |
| 91 | _buildSummary(tree, result, resultAnnotation) { |
| 92 | let buildSteps = 0; |
| 93 | let totalTime = 0; |
| 94 | |
| 95 | let node; |
| 96 | let statName; |
| 97 | let statValue; |
| 98 | let nodeItr; |
| 99 | let statsItr; |
| 100 | let nextNode; |
| 101 | let nextStat; |
| 102 | |
| 103 | for (nodeItr = tree.dfsIterator(); ; ) { |
| 104 | nextNode = nodeItr.next(); |
| 105 | if (nextNode.done) { |
| 106 | break; |
| 107 | } |
| 108 | |
| 109 | node = nextNode.value; |
| 110 | if (node.label.broccoliNode && !node.label.broccoliCachedNode) { |
| 111 | ++buildSteps; |
| 112 | } |
| 113 | |
| 114 | for (statsItr = node.statsIterator(); ; ) { |
| 115 | nextStat = statsItr.next(); |
| 116 | if (nextStat.done) { |
| 117 | break; |
| 118 | } |
| 119 | |
| 120 | statName = nextStat.value[0]; |
| 121 | statValue = nextStat.value[1]; |
| 122 | |
| 123 | if (statName === 'time.self') { |
| 124 | totalTime += statValue; |
| 125 | } |
| 126 | } |
| 127 | } |
| 128 | |
| 129 | let summary = { |
| 130 | build: { |
| 131 | type: resultAnnotation.type, |
| 132 | count: this.instrumentations.build.count, |
| 133 | outputChangedFiles: null, |
| 134 | }, |
| 135 | platform: { |
| 136 | name: process.platform, |
| 137 | }, |
| 138 | output: null, |
| 139 | totalTime, |
| 140 | buildSteps, |
| 141 | }; |
| 142 | |
| 143 | _getHardwareInfo(summary.platform); |
| 144 | |
| 145 | if (result) { |
| 146 | summary.build.outputChangedFiles = result.outputChanges; |
| 147 | summary.output = result.directory; |
| 148 | } |
no test coverage detected