add CPU status

Summary: ^

Reviewed By: passy

Differential Revision: D21952136

fbshipit-source-id: b33de0b9da0cf0f77730599c99003362bac0d159
This commit is contained in:
Michel Weststrate
2020-06-09 07:27:09 -07:00
committed by Facebook GitHub Bot
parent 21a926232e
commit 17223f5a99

View File

@@ -26,6 +26,7 @@ import {
import produce from 'immer';
import {BaseDevice} from 'flipper';
import {deconstructClientId} from '../utils/clientUtils';
import {getCPUUsage} from 'process';
const TIME_SPENT_EVENT = 'time-spent';
@@ -196,6 +197,7 @@ export default (store: Store, logger: Logger) => {
sdkVersion,
isForeground: state.application.windowIsFocused,
usedJSHeapSize: (window.performance as any).memory.usedJSHeapSize,
cpuLoad: getCPUUsage().percentCPUUsage,
};
// reset dropped frames counter