MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / formatThresholdValue

Function formatThresholdValue

tests/loadtest/tools/dashboard/app.js:1270–1281  ·  view source on GitHub ↗
(metricName, value)

Source from the content-addressed store, hash-verified

1268}
1269
1270function formatThresholdValue(metricName, value) {
1271 if (!Number.isFinite(value)) {
1272 return String(value);
1273 }
1274 if (metricName.includes("duration")) {
1275 return formatMs(value);
1276 }
1277 if (metricName.includes("failed") || metricName === "checks") {
1278 return formatPercent(value);
1279 }
1280 return formatCompact(value);
1281}
1282
1283function humanizeMetricTags(tags) {
1284 const parts = [];

Callers 1

humanizeThresholdRuleFunction · 0.85

Calls 3

formatMsFunction · 0.85
formatPercentFunction · 0.85
formatCompactFunction · 0.85

Tested by

no test coverage detected