MCPcopy
hub / github.com/prometheus/client_js / getRandomLabels

Function getRandomLabels

example/histogram-large-memory.js:11–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9 const labelNames = Array(10).map((_, idx) => `label_${idx}`);
10
11 const getRandomLabels = () =>
12 labelNames.reduce((acc, label) => {
13 return { ...acc, [label]: `value_${Math.random()}` };
14 }, {});
15
16 for (let i = 0; i < 100000; i++) {
17 const h = new Histogram({

Callers 1

runFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected