probe.gl icon indicating copy to clipboard operation
probe.gl copied to clipboard

Allow Stats class to track a time window.

Open tsherif opened this issue 5 years ago • 6 comments

Deck usage requires gathering measurements that only become visible after a certain number of measurements. The Stats object should support this usage. I think the simplest way to do this would that the Stats object should have a windowSize property. Calls to stat updates like incrementCount, addTime, etc. should only update private members _count and _time. count and time properties would only be updated when _count % windowSize === 0.

@Pessimistress this should support the usage you need for Deck without _onMetrics.

tsherif avatar Apr 09 '19 18:04 tsherif