TP-70982 | Removed analytics perf tracker

This commit is contained in:
yashmantri
2024-07-16 16:40:22 +05:30
parent e1ab3b3812
commit 3d350f367f
4 changed files with 0 additions and 20 deletions

View File

@@ -167,11 +167,6 @@ function App() {
screen_name: currentRouteName,
screen_class: currentRouteName,
});
await analytics().logEvent('screen_view', {
screen_name: currentRouteName,
screen_class: currentRouteName,
});
}}
>
<StatusBar backgroundColor={COLORS.BACKGROUND.INDIGO_DARK} />

View File

@@ -17,7 +17,6 @@ import handleBlacklistedAppsForBlockingCosmos, {
} from '@services/blacklistedApps.service';
import { addClickstreamEvent } from '@services/clickstreamEventService';
import { setBlacklistedAppsInstalledData } from '@reducers/blacklistedAppsInstalledSlice';
import perf from '@react-native-firebase/perf';
import { GLOBAL } from '@constants/Global';
import AgentIdCardFlow from '@screens/AgentIdCard';
import { IdCardBlockStatus } from '@reducers/profileSlice';
@@ -103,14 +102,11 @@ const BlockerScreen = (props: IBlockerScreen) => {
React.useEffect(() => {
const appStateChange = AppState.addEventListener('change', async (change) => {
setTimeout(async () => {
const trace = await perf().startTrace('blacklistedAppsInstalled');
handleBlacklistedAppsForBlockingCosmos().then((blacklistedAppsInstalled) =>
dispatch(
setBlacklistedAppsInstalledData({ blacklistedAppsInstalled: blacklistedAppsInstalled })
)
);
await trace.stop();
}, 3000);
});
return () => appStateChange.remove();

View File

@@ -4,7 +4,6 @@ import RNFS from 'react-native-fs';
import RNFetchBlob from 'react-native-blob-util';
import FastImage from 'react-native-fast-image';
import { logError } from '../components/utlis/errorUtils';
import perf from '@react-native-firebase/perf';
interface CachedImageProps {
highQualityUri: string;
@@ -19,8 +18,6 @@ interface CachedImageProps {
export let GlobalImageMap: { [key: string]: string } = {};
export const hydrateGlobalImageMap = async () => {
const trace = await perf().startTrace('hydrateGlobalImageMap');
RNFS.readdir(RNFS.CachesDirectoryPath)
.then(async (result) => {
// Filter only files (remove directories from the list)
@@ -31,7 +28,6 @@ export const hydrateGlobalImageMap = async () => {
GlobalImageMap[cacheFilePath] = `file://${cacheFilePath}`;
});
}
await trace.stop();
})
.catch((error) => {
console.error('Error reading directory:', error);

View File

@@ -2,7 +2,6 @@ import { useEffect, useRef } from 'react';
import firestore, { type FirebaseFirestoreTypes } from '@react-native-firebase/firestore';
import auth from '@react-native-firebase/auth';
import { setFeedbackFilterTemplate } from '@reducers/feedbackFiltersSlice';
import perf from '@react-native-firebase/perf';
import { InteractionManager } from 'react-native';
import { type RootState } from '../store/store';
import { useAppDispatch, useAppSelector } from '.';
@@ -18,7 +17,6 @@ import { setCurrentProdAPK, setForceUninstallData } from '../reducer/metadataSli
import { logError } from '../components/utlis/errorUtils';
import { type GenericFunctionArgs } from '../common/GenericTypes';
import { addClickstreamEvent } from '@services/clickstreamEventService';
import analytics from '@react-native-firebase/analytics';
import { setCsaFilters } from '@reducers/cosmosSupportSlice';
export interface CaseUpdates {
@@ -86,7 +84,6 @@ const useFirestoreUpdates = () => {
};
const handleCasesUpdate = async (querySnapshot: FirebaseFirestoreTypes.QuerySnapshot) => {
const trace = await perf().startTrace('handleCasesUpdate');
let newlyAddedCases = 0;
let deletedCases = 0;
const caseUpdates: CaseUpdates[] = [];
@@ -110,7 +107,6 @@ const useFirestoreUpdates = () => {
});
});
const isInitialLoad = casesList.length === 0;
await trace.stop();
InteractionManager.runAfterInteractions(() => {
requestAnimationFrame(() => {
InteractionManager.runAfterInteractions(() => {
@@ -129,9 +125,6 @@ const useFirestoreUpdates = () => {
addClickstreamEvent(CLICKSTREAM_EVENT_NAMES.FA_SNAPSHOT_LISTENER, {
snapshot_path: 'handleCasesUpdate',
});
await analytics().logEvent(CLICKSTREAM_EVENT_NAMES.FA_SNAPSHOT_LISTENER.name, {
snapshot_path: 'handleCasesUpdate',
});
};
const handleCollectionTemplateUpdate = (