()
| 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(','); |
no outgoing calls
no test coverage detected