MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / parseMetrics

Function parseMetrics

tooling/scripts/perf-runtime-repeat.mjs:213–223  ·  view source on GitHub ↗
(output, names)

Source from the content-addressed store, hash-verified

211}
212
213function parseMetrics(output, names) {
214 const metrics = new Map()
215 for (const line of output.split(/\r?\n/)) {
216 const match = /^(.+?)\s+([0-9]+(?:\.[0-9]+)?)(?:ms|MB)?$/.exec(line.trim())
217 if (!match) continue
218 const label = match[1].trim()
219 if (!names.includes(label)) continue
220 metrics.set(label, Number.parseFloat(match[2]))
221 }
222 return metrics
223}
224
225function metricValues(samples, name) {
226 return samples

Callers 1

runBenchmarkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected