Confuse about SceneInstrument caling fetchNewFrame

focus on the SceneInstrument filed _activeMeshesEvaluationTime
it is a instance of PerfCounter

PerfCounter is like a sampler collector and calculate like avg = total/sampleTimes
And increasing the sampleTimes by fetchNewFrame
fetchNewFrame also can call by endMonitoring when using default parameter

My Question is:
_activeMeshesEvaluationTime have fetchNewFrame in

  1. scene.onBeforeAnimationsObservable
  2. onAfterActiveMeshesEvaluationObservable

I think is it calling fetchNewFrame more than one time?

avg = total/sampleTimes
we just increase the sampleTimes but total not changing
maybe we should remove 1. scene.onBeforeAnimationsObservable ?

And I also find that
onBeforeActiveMeshesEvaluationObservable is only called
but onAfterActiveMeshesEvaluationObservable not called in the engine

I think it is a bug too,the engine forgot to called it
git commit hash15435c89d8dcad58b68852c6f4808b48fb8f6b
engine version 6.3.1

cc @sebavan

Looks like you are spot on with both issues, I ll try to fix it ASAP.

Will be fixed by Fix Scene performance counters by sebavan · Pull Request #13870 · BabylonJS/Babylon.js · GitHub