* Processes a portion of V8 profiler event log. * * @param {string} chunk A portion of log.
(chunk)
| 135 | * @param {string} chunk A portion of log. |
| 136 | */ |
| 137 | async processLogChunk(chunk) { |
| 138 | let end = chunk.length; |
| 139 | let current = 0; |
| 140 | // Kept for debugging in case of parsing errors. |
| 141 | let lineNumber = 0; |
| 142 | while (current < end) { |
| 143 | const next = chunk.indexOf("\n", current); |
| 144 | if (next === -1) break; |
| 145 | lineNumber++; |
| 146 | const line = chunk.substring(current, next); |
| 147 | current = next + 1; |
| 148 | await this.processLogLine(line); |
| 149 | } |
| 150 | } |
| 151 | |
| 152 | /** |
| 153 | * Processes a line of V8 profiler event log. |
no test coverage detected