add debug stats
This commit is contained in:
parent
d4cd8c37de
commit
33ab8745b3
1 changed files with 11 additions and 0 deletions
|
|
@ -75,3 +75,14 @@ export const statsEnd = () => {
|
|||
stats2.end()
|
||||
statsGl.end()
|
||||
}
|
||||
|
||||
window.statsPerSec = {}
|
||||
let statsPerSec = {}
|
||||
window.addStatPerSec = (name) => {
|
||||
statsPerSec[name] ??= 0
|
||||
statsPerSec[name]++
|
||||
}
|
||||
setInterval(() => {
|
||||
window.statsPerSec = statsPerSec
|
||||
statsPerSec = {}
|
||||
}, 1000)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue