Opens a section and returns a token for `end()`.
(kind: SpanKind, fileId: number | undefined)
| 308 | |
| 309 | /** Opens a section and returns a token for `end()`. */ |
| 310 | private begin(kind: SpanKind, fileId: number | undefined): number { |
| 311 | this.openKind.push(kind); |
| 312 | this.openStart.push(nowMicros()); |
| 313 | this.openFile.push(fileId); |
| 314 | this.openChildUs.push(0); |
| 315 | if (!AWAITING_KINDS[kind]) { |
| 316 | this.openNonAwaiting++; |
| 317 | } |
| 318 | return this.openKind.length; |
| 319 | } |
| 320 | |
| 321 | /** Ends the section of `token`, and any section left open inside it. */ |
| 322 | private end(token: number): void { |
no test coverage detected