MCPcopy Create free account
hub / github.com/csskit/csskit / sampleEntries

Function sampleEntries

website/script/benchmarks.js:350–353  ·  view source on GitHub ↗

* Given a full list of entries (oldest-first), return a sampled subset * of at most MAX_POINTS for display. Coalesces same-day runs first, then * thins if still too many.

(entries)

Source from the content-addressed store, hash-verified

348 * thins if still too many.
349 */
350function sampleEntries(entries) {
351 const coalesced = coalesceByDay(entries);
352 return thinEvenly(coalesced, MAX_POINTS);
353}
354
355/**
356 * Filter entries to a timestamp window [minMs, maxMs], then resample.

Callers 4

createTimeChartFunction · 0.85
createCompressionChartFunction · 0.85
createThroughputChartFunction · 0.85

Calls 2

coalesceByDayFunction · 0.85
thinEvenlyFunction · 0.85

Tested by

no test coverage detected