MCPcopy Create free account
hub / github.com/TanStack/router / parseBenchmarkExtra

Function parseBenchmarkExtra

scripts/benchmarks/bundle-size/pr-report.mjs:193–212  ·  view source on GitHub ↗
(extra)

Source from the content-addressed store, hash-verified

191}
192
193function parseBenchmarkExtra(extra) {
194 if (typeof extra !== 'string') {
195 return {}
196 }
197
198 const values = {}
199 for (const part of extra.split(';')) {
200 const [key, rawValue] = part.trim().split('=')
201 const value = Number(rawValue)
202 if (key && Number.isFinite(value)) {
203 values[key] = value
204 }
205 }
206
207 return {
208 rawBytes: values.raw,
209 brotliBytes: values.brotli,
210 initialGzipBytes: values.initial_gzip,
211 }
212}
213
214function resolveBaselineFromHistory(historyEntries, baseSha) {
215 if (!historyEntries.length) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected