* Processes a line of V8 profiler event log. * * @param {string} line A line of log.
(line)
| 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. |
no test coverage detected