MCPcopy Create free account
hub / github.com/feiyu563/PrometheusAlert / garbageCollect

Function garbageCollect

static/plugins/chart.js/Chart.bundle.js:11210–11222  ·  view source on GitHub ↗
(caches, length)

Source from the content-addressed store, hash-verified

11208}
11209
11210function garbageCollect(caches, length) {
11211 helpers$1.each(caches, function(cache) {
11212 var gc = cache.gc;
11213 var gcLen = gc.length / 2;
11214 var i;
11215 if (gcLen > length) {
11216 for (i = 0; i < gcLen; ++i) {
11217 delete cache.data[gc[i]];
11218 }
11219 gc.splice(0, gcLen);
11220 }
11221 });
11222}
11223
11224/**
11225 * Returns {width, height, offset} objects for the first, last, widest, highest tick

Callers 1

computeLabelSizesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected