(label)
| 75 | this.current_children = this.timings = []; |
| 76 | } |
| 77 | start(label) { |
| 78 | const timing = { |
| 79 | label, |
| 80 | start: now(), |
| 81 | end: null, |
| 82 | children: [] |
| 83 | }; |
| 84 | this.current_children.push(timing); |
| 85 | this.stack.push(timing); |
| 86 | this.current_timing = timing; |
| 87 | this.current_children = timing.children; |
| 88 | } |
| 89 | stop(label) { |
| 90 | if (label !== this.current_timing.label) { |
| 91 | throw new Error(`Mismatched timing labels (expected ${this.current_timing.label}, got ${label})`); |