MCPcopy Index your code
hub / github.com/scality/cloudserver / getMetrics

Function getMetrics

tests/functional/report/monitoring.js:19–29  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17 }
18
19 async function getMetrics() {
20 return new Promise(resolve => {
21 http.get({ host: conf.ipAddress, path: '/metrics', port: 8002 }, res => {
22 assert.strictEqual(res.statusCode, 200);
23
24 const body = [];
25 res.on('data', chunk => { body.push(chunk); });
26 res.on('end', () => resolve(body.join('')));
27 });
28 });
29 }
30
31 function parseMetric(metrics, name, labels) {
32 const labelsString = Object.entries(labels).map(e => `${e[0]}="${e[1]}"`).join(',');

Callers 2

routeHandlerFunction · 0.85
monitoring.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected