(file, tickIndex)
| 416 | } |
| 417 | |
| 418 | addStack(file, tickIndex) { |
| 419 | let { tm : timestamp, vm : vmState, s : stack } = file.ticks[tickIndex]; |
| 420 | |
| 421 | let i = Math.floor((timestamp - this.firstTime) / this.step); |
| 422 | if (i === this.buckets.length) i--; |
| 423 | console.assert(i >= 0 && i < this.buckets.length); |
| 424 | |
| 425 | let bucket = this.buckets[i]; |
| 426 | bucket.total++; |
| 427 | |
| 428 | let stackPos = findNextFrame(file, stack, 0, 2, this.filter); |
| 429 | let codeId = stackPos >= 0 ? stack[stackPos] : -1; |
| 430 | let code = codeId >= 0 ? file.code[codeId] : undefined; |
| 431 | let kind = resolveCodeKindAndVmState(code, vmState); |
| 432 | bucket[kind]++; |
| 433 | } |
| 434 | } |
| 435 | |
| 436 | class FunctionTimelineProcessor { |
no test coverage detected