MCPcopy Index your code
hub / github.com/ember-cli/ember-cli / _writeInstrumentation

Method _writeInstrumentation

lib/models/instrumentation.js:222–239  ·  view source on GitHub ↗
(name, instrumentationInfo)

Source from the content-addressed store, hash-verified

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)) {

Callers 1

stopAndReportMethod · 0.95

Calls 2

vizEnabledFunction · 0.85
toJSONMethod · 0.80

Tested by

no test coverage detected