Remove 'process' usage
Summary: Removed process, adbkit and electron usages that were still remaining. Verified changes by disabling the built-in module stubbing (will be cleaned up further later in this stack). Reviewed By: aigoncharov Differential Revision: D33019083 fbshipit-source-id: 8bfce31f4b5ed349cb4fd86d34c9b41b9b8b8360
This commit is contained in:
committed by
Facebook GitHub Bot
parent
3ef1923b29
commit
ac9080abac
@@ -104,6 +104,7 @@ export interface RenderHost {
|
||||
// given the requested icon and proposed public url of the icon, rewrite it to a local icon if needed
|
||||
getLocalIconUrl?(icon: Icon, publicUrl: string): string;
|
||||
unloadModule?(path: string): void;
|
||||
getPercentCPUUsage?(): number;
|
||||
}
|
||||
|
||||
export function getRenderHostInstance(): RenderHost {
|
||||
|
||||
@@ -24,7 +24,6 @@ import {
|
||||
import produce from 'immer';
|
||||
import BaseDevice from '../devices/BaseDevice';
|
||||
import {deconstructClientId} from 'flipper-common';
|
||||
import {getCPUUsage} from 'process';
|
||||
import {sideEffect} from '../utils/sideEffect';
|
||||
import {getSelectionInfo} from '../utils/info';
|
||||
import type {SelectionInfo} from '../utils/info';
|
||||
@@ -239,7 +238,7 @@ export default (store: Store, logger: Logger) => {
|
||||
sdkVersion,
|
||||
isForeground: state.application.windowIsFocused,
|
||||
usedJSHeapSize: (window.performance as any).memory.usedJSHeapSize,
|
||||
cpuLoad: getCPUUsage().percentCPUUsage,
|
||||
cpuLoad: renderHost.getPercentCPUUsage?.() ?? 0,
|
||||
};
|
||||
|
||||
// reset dropped frames counter
|
||||
|
||||
Reference in New Issue
Block a user