An instance of this class is used for invoking the instrumentation hooks on addons. The instrumentation types currently supported are: * init * build * command * shutdown @class Instrumentation @private
(options)
| 50 | @private |
| 51 | */ |
| 52 | constructor(options) { |
| 53 | this.isVizEnabled = vizEnabled; |
| 54 | this.isEnabled = instrumentationEnabled; |
| 55 | |
| 56 | this.ui = options.ui; |
| 57 | |
| 58 | // project constructor will set up bidirectional link |
| 59 | this.project = null; |
| 60 | |
| 61 | this.instrumentations = { |
| 62 | init: options.initInstrumentation, |
| 63 | build: { |
| 64 | token: null, |
| 65 | node: null, |
| 66 | count: 0, |
| 67 | }, |
| 68 | command: { |
| 69 | token: null, |
| 70 | node: null, |
| 71 | }, |
| 72 | shutdown: { |
| 73 | token: null, |
| 74 | node: null, |
| 75 | }, |
| 76 | }; |
| 77 | |
| 78 | this._heimdall = null; |
| 79 | |
| 80 | this.config = getConfig(); |
| 81 | |
| 82 | if (!options.initInstrumentation && this.isEnabled()) { |
| 83 | this.instrumentations.init = { |
| 84 | token: null, |
| 85 | node: null, |
| 86 | }; |
| 87 | this.start('init'); |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | _buildSummary(tree, result, resultAnnotation) { |
| 92 | let buildSteps = 0; |