Skip to content

Commit 75ca9d9

Browse files
vladopajicsumanjeet0012
authored andcommitted
perf: gracefully parse ResultValue from output (libp2p#661)
1 parent 9bc3042 commit 75ca9d9

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

perf/runner/src/index.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,12 @@ function runClient(args: ArgsRunBenchmark): ResultValue[] {
208208
const combined: ResultValue[] = [];
209209

210210
for (const line of lines) {
211-
const result = JSON.parse(line) as ResultValue;
212-
combined.push(result);
211+
try {
212+
const result = JSON.parse(line) as ResultValue;
213+
combined.push(result);
214+
} catch (error) {
215+
console.error(`Could not parse ResultValue from line: ${line}`)
216+
}
213217
}
214218

215219
return combined;

0 commit comments

Comments
 (0)