(timestamp)
| 180 | } |
| 181 | |
| 182 | getStackAt(timestamp) { |
| 183 | const stack = []; |
| 184 | const events = this.getEventsUntil(timestamp); |
| 185 | |
| 186 | for (const event of events) { |
| 187 | if (event.type === "call") { |
| 188 | stack.push({ |
| 189 | func: event.functionName, |
| 190 | line: event.lineno, |
| 191 | args: event.args, |
| 192 | }); |
| 193 | } else if (event.type === "return") { |
| 194 | stack.pop(); |
| 195 | } else if (event.type === "line") { |
| 196 | if (stack.length > 0) { |
| 197 | stack[stack.length - 1].line = event.lineno; |
| 198 | } |
| 199 | } |
| 200 | } |
| 201 | return stack; |
| 202 | } |
| 203 | |
| 204 | getNextEvent(timestamp) { |
| 205 | return this.events.find((e) => e.timestamp > timestamp); |
no test coverage detected