fixing tracking metrics
Summary: - fixing dropped frames calculation - fixing plugin activation time Reviewed By: passy Differential Revision: D9301759 fbshipit-source-id: 872e4d2edcafdbc67668f3d0b713dfbf55f068f5
This commit is contained in:
committed by
Facebook Github Bot
parent
656044ce69
commit
eb316be4e4
@@ -18,8 +18,9 @@ export default (store: Store, logger: Logger) => {
|
||||
) {
|
||||
const now = performance.now();
|
||||
requestAnimationFrame(() => droppedFrameDetection(now, isWindowFocused));
|
||||
if (isWindowFocused()) {
|
||||
droppedFrames += Math.max(0, Math.round(now - past / (1000 / 60) - 1));
|
||||
const dropped = Math.round((now - past) / (1000 / 60) - 1);
|
||||
if (dropped > 0 && isWindowFocused()) {
|
||||
droppedFrames += dropped;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user