github
506 of 566 branches covered (89.4%)
Branch coverage included in aggregate %.
110 of 133 new or added lines in 11 files covered. (82.71%)
2232 of 2352 relevant lines covered (94.9%)
405.91 hits per line
1 |
import Measurement from './measurement/index.js' |
|
2 |
|
31✔ |
|
const bus = global.globalBus || (() => { |
|
NEW
|
throw new TypeError('Missing GlobalBus() instance on: global.globalBus') |
× |
NEW
|
})() |
× |
|
|
31✔ |
|
const metric = name => { |
|
8 |
const record = ({ name, value }) => |
|
9 |
bus.emit(new Measurement({ name, value }))
|
6,229✔ |
10 |
|
6,271✔ |
11 |
return {
|
6,271✔ |
12 |
record: value => record({ name, value }),
|
|
13 |
stop: () => bus.stop()
|
|
14 |
} |
6,271✔ |
15 |
} |
6,271✔ |
16 |
|
31✔ |
|
export { metric }
|
31✔ |