@@ -36,8 +36,6 @@ import type {FastMergeOptions, FastMergeResult} from './utils';
3636import utils from './utils' ;
3737import type { DeferredTask } from './createDeferredTask' ;
3838import createDeferredTask from './createDeferredTask' ;
39- import * as GlobalSettings from './GlobalSettings' ;
40- import decorateWithMetrics from './metrics' ;
4139import type { StorageKeyValuePair } from './storage/providers/types' ;
4240import logMessages from './logMessages' ;
4341
@@ -1906,54 +1904,6 @@ const OnyxUtils = {
19061904 isRamOnlyKey,
19071905} ;
19081906
1909- GlobalSettings . addGlobalSettingsChangeListener ( ( { enablePerformanceMetrics} ) => {
1910- if ( ! enablePerformanceMetrics ) {
1911- return ;
1912- }
1913- // We are reassigning the functions directly so that internal function calls are also decorated
1914-
1915- // @ts -expect-error Reassign
1916- initStoreValues = decorateWithMetrics ( initStoreValues , 'OnyxUtils.initStoreValues' ) ;
1917- // @ts -expect-error Complex type signature
1918- get = decorateWithMetrics ( get , 'OnyxUtils.get' ) ;
1919- // @ts -expect-error Reassign
1920- getAllKeys = decorateWithMetrics ( getAllKeys , 'OnyxUtils.getAllKeys' ) ;
1921- // @ts -expect-error Reassign
1922- getCollectionKeys = decorateWithMetrics ( getCollectionKeys , 'OnyxUtils.getCollectionKeys' ) ;
1923- // @ts -expect-error Reassign
1924- keysChanged = decorateWithMetrics ( keysChanged , 'OnyxUtils.keysChanged' ) ;
1925- // @ts -expect-error Reassign
1926- keyChanged = decorateWithMetrics ( keyChanged , 'OnyxUtils.keyChanged' ) ;
1927- // @ts -expect-error Reassign
1928- sendDataToConnection = decorateWithMetrics ( sendDataToConnection , 'OnyxUtils.sendDataToConnection' ) ;
1929- // @ts -expect-error Reassign
1930- scheduleSubscriberUpdate = decorateWithMetrics ( scheduleSubscriberUpdate , 'OnyxUtils.scheduleSubscriberUpdate' ) ;
1931- // @ts -expect-error Reassign
1932- scheduleNotifyCollectionSubscribers = decorateWithMetrics ( scheduleNotifyCollectionSubscribers , 'OnyxUtils.scheduleNotifyCollectionSubscribers' ) ;
1933- // @ts -expect-error Reassign
1934- remove = decorateWithMetrics ( remove , 'OnyxUtils.remove' ) ;
1935- // @ts -expect-error Reassign
1936- reportStorageQuota = decorateWithMetrics ( reportStorageQuota , 'OnyxUtils.reportStorageQuota' ) ;
1937- // @ts -expect-error Complex type signature
1938- retryOperation = decorateWithMetrics ( retryOperation , 'OnyxUtils.retryOperation' ) ;
1939- // @ts -expect-error Reassign
1940- broadcastUpdate = decorateWithMetrics ( broadcastUpdate , 'OnyxUtils.broadcastUpdate' ) ;
1941- // @ts -expect-error Reassign
1942- initializeWithDefaultKeyStates = decorateWithMetrics ( initializeWithDefaultKeyStates , 'OnyxUtils.initializeWithDefaultKeyStates' ) ;
1943- // @ts -expect-error Complex type signature
1944- multiGet = decorateWithMetrics ( multiGet , 'OnyxUtils.multiGet' ) ;
1945- // @ts -expect-error Reassign
1946- tupleGet = decorateWithMetrics ( tupleGet , 'OnyxUtils.tupleGet' ) ;
1947- // @ts -expect-error Reassign
1948- subscribeToKey = decorateWithMetrics ( subscribeToKey , 'OnyxUtils.subscribeToKey' ) ;
1949- // @ts -expect-error Reassign
1950- setWithRetry = decorateWithMetrics ( setWithRetry , 'OnyxUtils.setWithRetry' ) ;
1951- // @ts -expect-error Reassign
1952- multiSetWithRetry = decorateWithMetrics ( multiSetWithRetry , 'OnyxUtils.multiSetWithRetry' ) ;
1953- // @ts -expect-error Reassign
1954- setCollectionWithRetry = decorateWithMetrics ( setCollectionWithRetry , 'OnyxUtils.setCollectionWithRetry' ) ;
1955- } ) ;
1956-
19571907export type { OnyxMethod } ;
19581908export default OnyxUtils ;
19591909export { clearOnyxUtilsInternals } ;
0 commit comments