github
13 of 238 branches covered (5.46%)
Branch coverage included in aggregate %.
0 of 472 new or added lines in 41 files covered. (0.0%)
19728 existing lines in 193 files now uncovered.91 of 28170 relevant lines covered (0.32%)
0.02 hits per line
UNCOV
1
|
import {Stats} from '@probe.gl/stats'; |
|
UNCOV
2
|
|
× |
UNCOV
3
|
/**
|
× |
UNCOV
4
|
* Helper class managing a collection of probe.gl stats objects |
× |
UNCOV
5
|
*/ |
× |
UNCOV
6
|
export class StatsManager { |
× |
UNCOV
7
|
stats = new Map();
|
× |
UNCOV
8
|
|
× |
UNCOV
9
|
getStats(name: string): Stats {
|
× |
UNCOV
10
|
return this.get(name); |
× |
UNCOV
11
|
} |
× |
UNCOV
12
|
|
× |
UNCOV
13
|
get(name: string): Stats {
|
× |
UNCOV
14
|
if (!this.stats.has(name)) { |
× |
UNCOV
15
|
this.stats.set(name, new Stats({id: name})); |
× |
UNCOV
16
|
} |
× |
UNCOV
17
|
|
× |
UNCOV
18
|
return this.stats.get(name); |
× |
UNCOV
19
|
} |
× |
UNCOV
20
|
} |
× |
UNCOV
21
|
|
× |
UNCOV
22
|
/** Global stats for all luma.gl devices */
|
× |
UNCOV
23
|
export const lumaStats: StatsManager = new StatsManager(); |
× |