MCPcopy Index your code
hub / github.com/nodejs/node / processLogChunk

Method processLogChunk

deps/v8/tools/logreader.mjs:137–150  ·  view source on GitHub ↗

* Processes a portion of V8 profiler event log. * * @param {string} chunk A portion of log.

(chunk)

Source from the content-addressed store, hash-verified

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.

Callers 3

processLogFileInTestMethod · 0.80
processStringMethod · 0.80
processLogFileInTestMethod · 0.80

Calls 2

processLogLineMethod · 0.95
indexOfMethod · 0.45

Tested by

no test coverage detected