(name, instrumentationInfo)
| 220 | } |
| 221 | |
| 222 | _writeInstrumentation(name, instrumentationInfo) { |
| 223 | if (!vizEnabled()) { |
| 224 | return; |
| 225 | } |
| 226 | |
| 227 | let filename = `instrumentation.${name}`; |
| 228 | if (name === 'build') { |
| 229 | filename += `.${this.instrumentations.build.count}`; |
| 230 | } |
| 231 | filename = `${filename}.json`; |
| 232 | fs.writeJsonSync(filename, { |
| 233 | summary: instrumentationInfo.summary, |
| 234 | // we want to change this to tree, to be consistent with the hook, but first |
| 235 | // we must update broccoli-viz |
| 236 | // see see https://github.com/ember-cli/broccoli-viz/issues/35 |
| 237 | nodes: instrumentationInfo.tree.toJSON().nodes, |
| 238 | }); |
| 239 | } |
| 240 | |
| 241 | start(name) { |
| 242 | if (!instrumentationEnabled(this.config)) { |
no test coverage detected