( state: RunExecutionState, engine: ExecutionEngine, blockId: string )
| 1156 | } |
| 1157 | |
| 1158 | async function captureMemoryBeforeBlock( |
| 1159 | state: RunExecutionState, |
| 1160 | engine: ExecutionEngine, |
| 1161 | blockId: string |
| 1162 | ): Promise<void> { |
| 1163 | if (!state.showProfile || !engine.serverPort) { |
| 1164 | return |
| 1165 | } |
| 1166 | |
| 1167 | const metrics = await fetchMetrics(engine.serverPort) |
| 1168 | if (metrics) { |
| 1169 | state.memoryBefore.set(blockId, metrics.rss) |
| 1170 | } |
| 1171 | } |
| 1172 | |
| 1173 | async function recordBlockProfile( |
| 1174 | state: RunExecutionState, |
no test coverage detected