github
507 of 564 branches covered (89.89%)
Branch coverage included in aggregate %.
97 of 103 new or added lines in 10 files covered. (94.17%)
2 existing lines in 1 file now uncovered.2228 of 2332 relevant lines covered (95.54%)
413.6 hits per line
1 |
import Measurement from './measurement/index.js' |
|
2 |
|
31✔ |
|
const bus = global.universalBus || (() => { |
|
NEW
|
throw new TypeError('Missing Bus() instance on: global.universalBus') |
× |
NEW
|
})() |
× |
|
|
31✔ |
|
const metric = name => { |
|
8 |
const record = ({ name, value }) => |
|
9 |
bus.emit(new Measurement({ name, value }))
|
6,292✔ |
10 |
|
6,334✔ |
11 |
return {
|
6,334✔ |
12 |
record: value => record({ name, value }),
|
|
13 |
stop: () => bus.stop()
|
|
14 |
} |
6,334✔ |
15 |
} |
6,334✔ |
16 |
|
31✔ |
|
export { metric }
|
31✔ |