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

Method processLogLine

deps/v8/tools/logreader.mjs:157–180  ·  view source on GitHub ↗

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

(line)

Source from the content-addressed store, hash-verified

155 * @param {string} line A line of log.
156 */
157 async processLogLine(line) {
158 if (!this.timedRange_) {
159 await this.processLogLine_(line);
160 return;
161 }
162 if (line.startsWith("current-time")) {
163 if (this.hasSeenTimerMarker_) {
164 await this.processLog_(this.logLinesSinceLastTimerMarker_);
165 this.logLinesSinceLastTimerMarker_ = [];
166 // In pairwise mode, a "current-time" line ends the timed range.
167 if (this.pairwiseTimedRange_) {
168 this.hasSeenTimerMarker_ = false;
169 }
170 } else {
171 this.hasSeenTimerMarker_ = true;
172 }
173 } else {
174 if (this.hasSeenTimerMarker_) {
175 this.logLinesSinceLastTimerMarker_.push(line);
176 } else if (!line.startsWith("tick")) {
177 await this.processLogLine_(line);
178 }
179 }
180 }
181
182 /**
183 * Processes stack record.

Callers 6

processLogChunkMethod · 0.95
processLogFileMethod · 0.80
processLogFileMethod · 0.80
processLogFileMethod · 0.80
_processChunkMethod · 0.80
processLogFileMethod · 0.80

Calls 3

processLogLine_Method · 0.95
processLog_Method · 0.95
pushMethod · 0.45

Tested by

no test coverage detected