react-native-inapp-inspector 2.3.24 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -5
- package/dist/commonjs/components/AnalyticsDetail.js +15 -12
- package/dist/commonjs/components/AnalyticsEventCard.js +11 -8
- package/dist/commonjs/components/AppHeaderLogo.js +4 -6
- package/dist/commonjs/components/ConsoleLogCard.d.ts +1 -0
- package/dist/commonjs/components/ConsoleLogCard.js +92 -80
- package/dist/commonjs/components/EndOfListFooter.d.ts +5 -1
- package/dist/commonjs/components/EndOfListFooter.js +27 -5
- package/dist/commonjs/components/Inspector/AnalyticsFilterModal.js +1 -1
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +27 -299
- package/dist/commonjs/components/Inspector/ConsoleTab.js +36 -94
- package/dist/commonjs/components/Inspector/CrashDetail.js +11 -10
- package/dist/commonjs/components/Inspector/CrashTab.js +43 -33
- package/dist/commonjs/components/Inspector/DebuggingTab.js +13 -13
- package/dist/commonjs/components/Inspector/DeviceInfoTab.js +107 -71
- package/dist/commonjs/components/Inspector/FabLauncher.js +8 -9
- package/dist/commonjs/components/Inspector/InspectorHeader.js +93 -70
- package/dist/commonjs/components/Inspector/LogDetail.js +10 -7
- package/dist/commonjs/components/Inspector/MainScreen.js +66 -30
- package/dist/commonjs/components/Inspector/MediaGalleryTab.js +1 -1
- package/dist/commonjs/components/Inspector/MediaPreviewModal.js +3 -3
- package/dist/commonjs/components/Inspector/NetworkDetail.js +29 -28
- package/dist/commonjs/components/Inspector/NetworkFilterModal.js +1 -1
- package/dist/commonjs/components/Inspector/NetworkTab.js +87 -85
- package/dist/commonjs/components/Inspector/NpmStarPrompt.js +3 -3
- package/dist/commonjs/components/Inspector/NpmUpdateToast.js +21 -22
- package/dist/commonjs/components/Inspector/PushCard.d.ts +4 -0
- package/dist/commonjs/components/Inspector/PushCard.js +89 -0
- package/dist/commonjs/components/Inspector/PushDetail.d.ts +4 -0
- package/dist/commonjs/components/Inspector/PushDetail.js +190 -0
- package/dist/commonjs/components/Inspector/PushTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/PushTab.js +45 -0
- package/dist/commonjs/components/Inspector/ReduxDetail.js +16 -13
- package/dist/commonjs/components/Inspector/ReduxTab.js +109 -106
- package/dist/commonjs/components/Inspector/SettingsPanel.js +230 -134
- package/dist/commonjs/components/Inspector/StorageTab.js +55 -51
- package/dist/commonjs/components/Inspector/TabBar.js +30 -26
- package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +2 -2
- package/dist/commonjs/components/JsonViewer.js +151 -159
- package/dist/commonjs/components/LogCard.js +34 -38
- package/dist/commonjs/components/LogSyntaxHighlighter.js +3 -3
- package/dist/commonjs/components/ModuleErrorBoundary.d.ts +24 -0
- package/dist/commonjs/components/ModuleErrorBoundary.js +33 -0
- package/dist/commonjs/components/NetworkIcons.d.ts +3 -3
- package/dist/commonjs/components/NetworkIcons.js +10 -6
- package/dist/commonjs/components/SegmentedTabs.d.ts +8 -2
- package/dist/commonjs/components/SegmentedTabs.js +11 -7
- package/dist/commonjs/components/ShareButton.d.ts +11 -0
- package/dist/commonjs/components/ShareButton.js +6 -0
- package/dist/commonjs/constants/index.js +1 -1
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/crashHandler.js +4 -4
- package/dist/commonjs/customHooks/networkLogger.js +1 -2
- package/dist/commonjs/customHooks/pushNotificationLogger.d.ts +19 -0
- package/dist/commonjs/customHooks/pushNotificationLogger.js +1 -0
- package/dist/commonjs/helpers/index.d.ts +6 -0
- package/dist/commonjs/helpers/index.js +4 -4
- package/dist/commonjs/helpers/memoryManager.d.ts +2 -2
- package/dist/commonjs/helpers/memoryManager.js +1 -1
- package/dist/commonjs/helpers/remoteConfig.js +1 -1
- package/dist/commonjs/helpers/settingsStore.d.ts +1 -0
- package/dist/commonjs/helpers/settingsStore.js +1 -1
- package/dist/commonjs/helpers/shareFormatter.d.ts +13 -0
- package/dist/commonjs/helpers/shareFormatter.js +7 -0
- package/dist/commonjs/i18n/index.d.ts +35 -0
- package/dist/commonjs/i18n/index.js +1 -1
- package/dist/commonjs/i18n/locales/ar.json +1 -0
- package/dist/commonjs/i18n/locales/de.json +1 -0
- package/dist/commonjs/i18n/locales/en.json +1 -1
- package/dist/commonjs/i18n/locales/es.json +1 -0
- package/dist/commonjs/i18n/locales/fr.json +1 -0
- package/dist/commonjs/i18n/locales/hi.json +1 -0
- package/dist/commonjs/i18n/locales/ja.json +1 -0
- package/dist/commonjs/i18n/locales/ko.json +1 -0
- package/dist/commonjs/i18n/locales/pt.json +1 -0
- package/dist/commonjs/i18n/locales/ru.json +1 -0
- package/dist/commonjs/i18n/locales/zh.json +1 -0
- package/dist/commonjs/index.d.ts +6 -5
- package/dist/commonjs/index.js +4 -4
- package/dist/commonjs/push.d.ts +4 -0
- package/dist/commonjs/push.js +1 -0
- package/dist/commonjs/styles/AppColors.d.ts +40 -0
- package/dist/commonjs/styles/AppColors.js +1 -1
- package/dist/commonjs/styles/index.js +1 -1
- package/dist/commonjs/types/enums.d.ts +30 -20
- package/dist/commonjs/types/enums.js +1 -1
- package/dist/commonjs/types/index.d.ts +10 -0
- package/dist/commonjs/types/interfaces.d.ts +63 -7
- package/dist/esm/components/AnalyticsDetail.js +84 -81
- package/dist/esm/components/AnalyticsEventCard.js +20 -17
- package/dist/esm/components/AppHeaderLogo.js +5 -7
- package/dist/esm/components/ConsoleLogCard.d.ts +1 -0
- package/dist/esm/components/ConsoleLogCard.js +98 -86
- package/dist/esm/components/EndOfListFooter.d.ts +5 -1
- package/dist/esm/components/EndOfListFooter.js +36 -14
- package/dist/esm/components/Inspector/AnalyticsFilterModal.js +14 -14
- package/dist/esm/components/Inspector/AnalyticsTab.js +44 -316
- package/dist/esm/components/Inspector/ConsoleTab.js +55 -113
- package/dist/esm/components/Inspector/CrashDetail.js +53 -52
- package/dist/esm/components/Inspector/CrashTab.js +74 -64
- package/dist/esm/components/Inspector/DebuggingTab.js +33 -33
- package/dist/esm/components/Inspector/DeviceInfoTab.js +174 -138
- package/dist/esm/components/Inspector/FabLauncher.js +41 -42
- package/dist/esm/components/Inspector/InspectorHeader.js +138 -115
- package/dist/esm/components/Inspector/LogDetail.js +24 -21
- package/dist/esm/components/Inspector/MainScreen.js +98 -62
- package/dist/esm/components/Inspector/MediaGalleryTab.js +1 -1
- package/dist/esm/components/Inspector/MediaPreviewModal.js +31 -31
- package/dist/esm/components/Inspector/NetworkDetail.js +88 -87
- package/dist/esm/components/Inspector/NetworkFilterModal.js +8 -8
- package/dist/esm/components/Inspector/NetworkTab.js +132 -130
- package/dist/esm/components/Inspector/NpmStarPrompt.js +42 -42
- package/dist/esm/components/Inspector/NpmUpdateToast.js +45 -46
- package/dist/esm/components/Inspector/PushCard.d.ts +4 -0
- package/dist/esm/components/Inspector/PushCard.js +89 -0
- package/dist/esm/components/Inspector/PushDetail.d.ts +4 -0
- package/dist/esm/components/Inspector/PushDetail.js +190 -0
- package/dist/esm/components/Inspector/PushTab.d.ts +3 -0
- package/dist/esm/components/Inspector/PushTab.js +45 -0
- package/dist/esm/components/Inspector/ReduxDetail.js +40 -37
- package/dist/esm/components/Inspector/ReduxTab.js +155 -152
- package/dist/esm/components/Inspector/SettingsPanel.js +380 -284
- package/dist/esm/components/Inspector/StorageTab.js +177 -173
- package/dist/esm/components/Inspector/TabBar.js +38 -34
- package/dist/esm/components/Inspector/UpdateAvailableModal.js +1 -1
- package/dist/esm/components/JsonViewer.js +161 -169
- package/dist/esm/components/LogCard.js +38 -42
- package/dist/esm/components/LogSyntaxHighlighter.js +1 -1
- package/dist/esm/components/ModuleErrorBoundary.d.ts +24 -0
- package/dist/esm/components/ModuleErrorBoundary.js +33 -0
- package/dist/esm/components/NetworkIcons.d.ts +3 -3
- package/dist/esm/components/NetworkIcons.js +7 -3
- package/dist/esm/components/SegmentedTabs.d.ts +8 -2
- package/dist/esm/components/SegmentedTabs.js +12 -8
- package/dist/esm/components/ShareButton.d.ts +11 -0
- package/dist/esm/components/ShareButton.js +6 -0
- package/dist/esm/constants/index.js +1 -1
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/crashHandler.js +6 -6
- package/dist/esm/customHooks/networkLogger.js +1 -2
- package/dist/esm/customHooks/pushNotificationLogger.d.ts +19 -0
- package/dist/esm/customHooks/pushNotificationLogger.js +1 -0
- package/dist/esm/helpers/index.d.ts +6 -0
- package/dist/esm/helpers/index.js +4 -4
- package/dist/esm/helpers/memoryManager.d.ts +2 -2
- package/dist/esm/helpers/memoryManager.js +1 -1
- package/dist/esm/helpers/remoteConfig.js +1 -1
- package/dist/esm/helpers/settingsStore.d.ts +1 -0
- package/dist/esm/helpers/settingsStore.js +1 -1
- package/dist/esm/helpers/shareFormatter.d.ts +13 -0
- package/dist/esm/helpers/shareFormatter.js +7 -0
- package/dist/esm/i18n/index.d.ts +35 -0
- package/dist/esm/i18n/index.js +1 -1
- package/dist/esm/i18n/locales/ar.json +1 -0
- package/dist/esm/i18n/locales/de.json +1 -0
- package/dist/esm/i18n/locales/en.json +1 -1
- package/dist/esm/i18n/locales/es.json +1 -0
- package/dist/esm/i18n/locales/fr.json +1 -0
- package/dist/esm/i18n/locales/hi.json +1 -0
- package/dist/esm/i18n/locales/ja.json +1 -0
- package/dist/esm/i18n/locales/ko.json +1 -0
- package/dist/esm/i18n/locales/pt.json +1 -0
- package/dist/esm/i18n/locales/ru.json +1 -0
- package/dist/esm/i18n/locales/zh.json +1 -0
- package/dist/esm/index.d.ts +6 -5
- package/dist/esm/index.js +7 -7
- package/dist/esm/push.d.ts +4 -0
- package/dist/esm/push.js +1 -0
- package/dist/esm/styles/AppColors.d.ts +40 -0
- package/dist/esm/styles/AppColors.js +1 -1
- package/dist/esm/styles/index.js +1 -1
- package/dist/esm/types/enums.d.ts +30 -20
- package/dist/esm/types/enums.js +1 -1
- package/dist/esm/types/index.d.ts +10 -0
- package/dist/esm/types/interfaces.d.ts +63 -7
- package/package.json +53 -24
- package/src/native/NativeInspector.ts +0 -1
- package/dist/commonjs/bundle.d.ts +0 -2
- package/dist/commonjs/bundle.js +0 -1
- package/dist/commonjs/components/BrandSquareIcon.d.ts +0 -5
- package/dist/commonjs/components/BrandSquareIcon.js +0 -112
- package/dist/commonjs/components/Inspector/BundleTab.d.ts +0 -48
- package/dist/commonjs/components/Inspector/BundleTab.js +0 -1297
- package/dist/commonjs/components/Inspector/PerformanceTab.d.ts +0 -27
- package/dist/commonjs/components/Inspector/PerformanceTab.js +0 -454
- package/dist/commonjs/customHooks/bundleAnalyzer.d.ts +0 -115
- package/dist/commonjs/customHooks/bundleAnalyzer.js +0 -1
- package/dist/commonjs/customHooks/performanceTracker.d.ts +0 -144
- package/dist/commonjs/customHooks/performanceTracker.js +0 -63
- package/dist/commonjs/performance.d.ts +0 -2
- package/dist/commonjs/performance.js +0 -1
- package/dist/esm/bundle.d.ts +0 -2
- package/dist/esm/bundle.js +0 -1
- package/dist/esm/components/BrandSquareIcon.d.ts +0 -5
- package/dist/esm/components/BrandSquareIcon.js +0 -112
- package/dist/esm/components/Inspector/BundleTab.d.ts +0 -48
- package/dist/esm/components/Inspector/BundleTab.js +0 -1297
- package/dist/esm/components/Inspector/PerformanceTab.d.ts +0 -27
- package/dist/esm/components/Inspector/PerformanceTab.js +0 -454
- package/dist/esm/customHooks/bundleAnalyzer.d.ts +0 -115
- package/dist/esm/customHooks/bundleAnalyzer.js +0 -1
- package/dist/esm/customHooks/performanceTracker.d.ts +0 -144
- package/dist/esm/customHooks/performanceTracker.js +0 -63
- package/dist/esm/performance.d.ts +0 -2
- package/dist/esm/performance.js +0 -1
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface PerformanceEvent {
|
|
3
|
-
id: string;
|
|
4
|
-
timestamp: number;
|
|
5
|
-
type: 'fps_drop' | 'slow_render' | 'transition' | 'memory' | 'network' | 'bridge' | 'touch';
|
|
6
|
-
category: 'render' | 'navigation' | 'memory' | 'io' | 'bridge';
|
|
7
|
-
fps: number;
|
|
8
|
-
durationMs: number;
|
|
9
|
-
droppedFrames?: number;
|
|
10
|
-
frameTimeMs?: number;
|
|
11
|
-
frameBudgetPct?: number;
|
|
12
|
-
bottleneckThread?: 'JS Thread' | 'UI Thread' | 'Bridge' | 'Balanced';
|
|
13
|
-
screenName?: string;
|
|
14
|
-
label: string;
|
|
15
|
-
detail: string;
|
|
16
|
-
source?: string;
|
|
17
|
-
breakdown?: {
|
|
18
|
-
jsTimeMs: number;
|
|
19
|
-
uiTimeMs: number;
|
|
20
|
-
bridgeLatencyMs?: number;
|
|
21
|
-
};
|
|
22
|
-
heapDeltaKb?: number;
|
|
23
|
-
advice?: string;
|
|
24
|
-
severity: 'optimal' | 'warning' | 'critical';
|
|
25
|
-
}
|
|
26
|
-
declare const PerformanceTab: React.MemoExoticComponent<() => React.JSX.Element>;
|
|
27
|
-
export default PerformanceTab;
|
|
@@ -1,454 +0,0 @@
|
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(r,i,g,s){s===void 0&&(s=g);var d=Object.getOwnPropertyDescriptor(i,g);(!d||("get"in d?!i.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return i[g]}}),Object.defineProperty(r,s,d)}):(function(r,i,g,s){s===void 0&&(s=g),r[s]=i[g]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(r,i){Object.defineProperty(r,"default",{enumerable:!0,value:i})}):function(r,i){r.default=i}),__importStar=this&&this.__importStar||(function(){var r=function(i){return r=Object.getOwnPropertyNames||function(g){var s=[];for(var d in g)Object.prototype.hasOwnProperty.call(g,d)&&(s[s.length]=d);return s},r(i)};return function(i){if(i&&i.__esModule)return i;var g={};if(i!=null)for(var s=r(i),d=0;d<s.length;d++)s[d]!=="default"&&__createBinding(g,i,s[d]);return __setModuleDefault(g,i),g}})(),__importDefault=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(exports,"__esModule",{value:!0});const react_1=__importStar(require("react")),react_native_1=require("react-native"),react_native_svg_1=__importStar(require("react-native-svg")),TouchableScale_1=__importDefault(require("../TouchableScale")),CopyButton_1=__importDefault(require("../CopyButton")),HighlightText_1=__importDefault(require("../HighlightText")),EndOfListFooter_1=__importDefault(require("../EndOfListFooter")),FeatureUnderDevNotice_1=__importDefault(require("./FeatureUnderDevNotice")),AppColors_1=require("../../styles/AppColors"),AppFonts_1=require("../../styles/AppFonts"),i18n_1=require("../../i18n"),helpers_1=require("../../helpers"),NetworkIcons_1=require("../NetworkIcons"),performanceTracker_1=require("../../customHooks/performanceTracker"),NativeInspector_1=require("../../native/NativeInspector"),telemetry_1=require("../../helpers/telemetry"),PerformanceTab=react_1.default.memo(()=>{const{t:r}=(0,i18n_1.useTranslation)(),[i,g]=(0,react_1.useState)(!0),[s,d]=(0,react_1.useState)(60),[W,N]=(0,react_1.useState)(57),[ae,P]=(0,react_1.useState)(60),[m,H]=(0,react_1.useState)(59),[L,j]=(0,react_1.useState)(4820),[E,O]=(0,react_1.useState)(4),[S,$]=(0,react_1.useState)(1.2),[G,q]=(0,react_1.useState)({"perf-1":!0}),J=e=>{q(t=>({...t,[e]:!t[e]}))},[h,K]=(0,react_1.useState)([60,59,60,60,58,60,59,60,60,60,57,60,59,60,60,58,60,60,59,60]),[M,U]=(0,react_1.useState)(()=>(0,performanceTracker_1.getPerformanceEvents)()),[x,Y]=(0,react_1.useState)("ALL"),[f,I]=(0,react_1.useState)("");(0,react_1.useEffect)(()=>(0,performanceTracker_1.subscribePerformanceEvents)(t=>{U(t)}),[]);const R=(0,react_1.useRef)(Date.now()),k=(0,react_1.useRef)(null),[y,X]=(0,react_1.useState)(null);(0,react_1.useEffect)(()=>{let e=!0;const t=async()=>{const a=await(0,NativeInspector_1.getNativeSystemMetrics)();e&&a&&X(a)};t();const o=setInterval(t,2e3);return()=>{e=!1,clearInterval(o)}},[]),(0,react_1.useEffect)(()=>{if((0,NativeInspector_1.isNativeModuleAvailable)())return(0,NativeInspector_1.startNativeFpsMonitoring)(),()=>{(0,NativeInspector_1.stopNativeFpsMonitoring)()}},[]),(0,react_1.useEffect)(()=>{if(!i)return;let e=!0,t=0,o=0,a=Date.now();const c=async()=>{if(!e)return;const p=Date.now(),T=p-R.current;R.current=p;const u=Math.max(0,T-16.67);if(u>o&&(o=u),t++,p-a>=1e3){const A=p-a;let l=Math.min(120,Math.max(0,Math.round(t*1e3/A)));if((0,NativeInspector_1.isNativeModuleAvailable)())try{const n=await(0,NativeInspector_1.getNativeFpsMetrics)();n&&n.fps>0&&(l=Math.round(n.fps))}catch{}if(d(l),N(n=>Math.min(n,l)),P(n=>Math.max(n,l)),j(n=>n+t),$(Number(o.toFixed(1))),l<55&&O(n=>n+1),K(n=>{const V=[...n.slice(-19),l],re=V.reduce((te,oe)=>te+oe,0);return H(Math.round(re/V.length)),V}),l<50){const n=(1e3/l).toFixed(1);(0,performanceTracker_1.logPerformanceEvent)({type:"fps_drop",category:"render",fps:l,durationMs:Number(n),label:r("performance.liveFpsDip",{fps:l}),detail:r("performance.liveFpsDipDetail",{duration:n}),source:r("performance.uiRenderThread"),breakdown:{jsTimeMs:Number((1e3/l*.65).toFixed(1)),uiTimeMs:Number((1e3/l*.35).toFixed(1))},advice:r("performance.liveFpsDipAdvice"),severity:l<30?"critical":"warning"})}t=0,o=0,a=p}k.current=requestAnimationFrame(c)};return R.current=Date.now(),k.current=requestAnimationFrame(c),()=>{e=!1,k.current&&cancelAnimationFrame(k.current)}},[i]);const F=(0,react_1.useMemo)(()=>M.filter(e=>{let t=!0;if(f&&f.trim().length>0){const a=f.trim().toLowerCase().split(/\s+/).filter(Boolean),c=[e.label||"",e.detail||"",e.source||"",e.category||"",e.severity||"",e.bottleneckThread||""].join(" ").toLowerCase();t=a.every(p=>c.includes(p))}const o=x==="ALL"?!0:x==="JANKY"?e.severity==="warning"||e.severity==="critical":x==="NAVIGATION"?e.category==="navigation":x==="RENDER"?e.category==="render":x==="MEMORY"?e.category==="memory":e.category==="io"||e.category==="bridge";return t&&o}),[M,f,x]),z=(0,react_1.useMemo)(()=>m>=58?{score:"98/100",grade:r("performance.excellent"),color:AppColors_1.AppColors.emerald600,bg:AppColors_1.AppColors.greenBg}:m>=50?{score:"84/100",grade:r("performance.good"),color:AppColors_1.AppColors.firebaseOrange,bg:AppColors_1.AppColors.amberBg}:{score:"58/100",grade:r("performance.needsOptimization"),color:AppColors_1.AppColors.errorColor,bg:AppColors_1.AppColors.errorCardBg},[m,r]),w=(0,react_1.useMemo)(()=>{const e=(0,helpers_1.getRuntimeDiagnostics)(),t={hermes:r("performance.hermesAot"),v8:r("performance.v8Jit"),jsc:r("performance.jscEngine")},o={hermes:r("performance.bytecodeCompiled"),v8:r("performance.jitEngine"),jsc:r("performance.webkitEngine")},a={fabric:r("performance.fabricJsi"),paper:r("performance.paperBridge")},c={fabric:r("performance.directCppBindings"),paper:r("performance.asyncJsonBridge")};return{jsEngineName:t[e.engineType],jsEngineSub:o[e.engineType],uiArchName:a[e.archType],uiArchSub:c[e.archType],usedHeapMb:e.usedHeapMb,totalAllocMb:e.totalAllocMb}},[r]),C=(0,react_1.useMemo)(()=>{const e=m>0?1e3/m:16.67,t=Number(Math.max(1,Math.min(e*.45,2+S)).toFixed(1)),o=Number(Math.max(1,e*.2).toFixed(1)),a=Number(Math.max(1,e*.25).toFixed(1)),c=t+o+a,p=Math.max(0,Number((16.67-c).toFixed(1))),T=Math.max(0,Math.min(100,Math.round(p/16.67*100)));return{jsTime:t,layoutTime:o,renderTime:a,freeTime:p,headroomPercent:T}},[m,S]),[v,Z]=(0,react_1.useState)(null),B=320,_=64,b=(0,react_1.useMemo)(()=>{const e=h.length>0?h:[60,60],t=B/Math.max(1,e.length-1),o=e.map((u,A)=>{const l=Math.max(0,Math.min(60,u)),n=Number((A*t).toFixed(1)),V=Number((_-l/60*(_-14)-6).toFixed(1));return{x:n,y:V,val:u}});let a=`M ${o[0].x} ${o[0].y}`;for(let u=0;u<o.length-1;u++){const A=o[u],l=o[u+1],n=Number(((A.x+l.x)/2).toFixed(1));a+=` C ${n} ${A.y}, ${n} ${l.y}, ${l.x} ${l.y}`}const c=o[o.length-1],p=o[0],T=`${a} L ${c.x} ${_} L ${p.x} ${_} Z`;return{linePath:a,areaPath:T,coords:o}},[h]),Q=(0,react_1.useMemo)(()=>{let e=0,t=0,o=0,a=0;h.forEach(p=>{p>=55?e++:p>=30?t++:p>=20?o++:a++});const c=Math.max(1,h.length);return[{key:"optimal",label:r("performance.optimalBucket"),count:e,percent:Number((e/c*100).toFixed(0)),color:AppColors_1.AppColors.emerald500,bgColor:AppColors_1.AppColors.emerald100},{key:"minorJank",label:r("performance.minorJankBucket"),count:t,percent:Number((t/c*100).toFixed(0)),color:AppColors_1.AppColors.amber500,bgColor:AppColors_1.AppColors.amber100},{key:"noticeableJank",label:r("performance.noticeableJankBucket"),count:o,percent:Number((o/c*100).toFixed(0)),color:AppColors_1.AppColors.firebaseOrange,bgColor:AppColors_1.AppColors.lightOrange},{key:"severeFreeze",label:r("performance.severeFreezeBucket"),count:a,percent:Number((a/c*100).toFixed(0)),color:AppColors_1.AppColors.errorColor,bgColor:AppColors_1.AppColors.errorCardBg}]},[h,r]),ee=()=>{(0,performanceTracker_1.clearPerformanceEvents)()},D=v!==null&&b.coords[v]?b.coords[v]:null;return<react_native_1.View style={perfStyles.container}>
|
|
2
|
-
|
|
3
|
-
<react_native_1.View style={perfStyles.headerBar}>
|
|
4
|
-
<react_native_1.View style={perfStyles.searchBox}>
|
|
5
|
-
<NetworkIcons_1.SearchIcon color={AppColors_1.AppColors.grayTextWeak}size={15}/>
|
|
6
|
-
<react_native_1.TextInput placeholder={r("performance.searchPlaceholder")}placeholderTextColor={AppColors_1.AppColors.grayTextWeak}value={f}onChangeText={I}style={perfStyles.searchInput}autoCapitalize="none"autoCorrect={!1}/>
|
|
7
|
-
{f?<TouchableScale_1.default onPress={()=>I("")}>
|
|
8
|
-
<NetworkIcons_1.CircleXIcon color={AppColors_1.AppColors.grayTextWeak}size={16}/>
|
|
9
|
-
</TouchableScale_1.default>:null}
|
|
10
|
-
</react_native_1.View>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
<TouchableScale_1.default onPress={()=>{g(e=>{const t=!e;return(0,telemetry_1.trackInspectorScreenRecord)(t?"start":"stop","performance_fps"),t})}}style={[perfStyles.recordToggleBtn,i?perfStyles.recordToggleActive:perfStyles.recordToggleInactive]}>
|
|
14
|
-
<react_native_1.View style={[perfStyles.recordingDot,{backgroundColor:i?AppColors_1.AppColors.errorColor:AppColors_1.AppColors.grayTextWeak}]}/>
|
|
15
|
-
<react_native_1.Text style={[perfStyles.recordToggleText,{color:i?AppColors_1.AppColors.errorColor:AppColors_1.AppColors.grayTextWeak}]}>
|
|
16
|
-
{r(i?"performance.recording":"performance.paused")}
|
|
17
|
-
</react_native_1.Text>
|
|
18
|
-
</TouchableScale_1.default>
|
|
19
|
-
</react_native_1.View>
|
|
20
|
-
|
|
21
|
-
<FeatureUnderDevNotice_1.default featureName="Performance & FPS Profiler"/>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
<react_native_1.View style={perfStyles.categoryScrollWrapper}>
|
|
25
|
-
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={!1}style={perfStyles.categoryScrollView}contentContainerStyle={perfStyles.categoryScroll}>
|
|
26
|
-
{[{key:"ALL",label:r("performance.catAll"),icon:e=><NetworkIcons_1.PerformanceIcon size={12}color={e}/>},{key:"JANKY",label:r("performance.catJanky"),icon:e=><NetworkIcons_1.CircleAlertIcon size={12}color={e}/>},{key:"NAVIGATION",label:r("performance.catNavigation"),icon:e=><NetworkIcons_1.MapIcon size={12}color={e}/>},{key:"RENDER",label:r("performance.catRender"),icon:e=><NetworkIcons_1.AtomIcon size={12}color={e}/>},{key:"MEMORY",label:r("performance.catMemory"),icon:e=><NetworkIcons_1.BrainIcon size={12}color={e}/>},{key:"IO",label:r("performance.catIo"),icon:e=><NetworkIcons_1.GlobeIcon size={12}color={e}/>}].map(e=>{const t=x===e.key,o=t?AppColors_1.AppColors.white:AppColors_1.AppColors.grayTextWeak;return<TouchableScale_1.default key={e.key}onPress={()=>Y(e.key)}style={[perfStyles.categoryChip,t&&perfStyles.categoryChipActive,{flexDirection:"row",alignItems:"center",gap:5}]}>
|
|
27
|
-
{e.icon(o)}
|
|
28
|
-
<react_native_1.Text style={[perfStyles.categoryChipText,t&&perfStyles.categoryChipTextActive]}>
|
|
29
|
-
{e.label}
|
|
30
|
-
</react_native_1.Text>
|
|
31
|
-
</TouchableScale_1.default>})}
|
|
32
|
-
</react_native_1.ScrollView>
|
|
33
|
-
</react_native_1.View>
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
<react_native_1.ScrollView style={perfStyles.scrollBody}contentContainerStyle={perfStyles.scrollContent}showsVerticalScrollIndicator={!1}>
|
|
37
|
-
|
|
38
|
-
<react_native_1.View style={perfStyles.heroCard}>
|
|
39
|
-
<react_native_1.View style={perfStyles.heroHeaderRow}>
|
|
40
|
-
<react_native_1.View style={{flexDirection:"row",alignItems:"center",gap:6}}>
|
|
41
|
-
<NetworkIcons_1.PerformanceIcon color={AppColors_1.AppColors.purple}size={17}/>
|
|
42
|
-
<react_native_1.View>
|
|
43
|
-
<react_native_1.Text style={perfStyles.heroTitle}>
|
|
44
|
-
{r("performance.fpsAreaChartTitle")}
|
|
45
|
-
</react_native_1.Text>
|
|
46
|
-
<react_native_1.Text style={perfStyles.heroSubTitle}>
|
|
47
|
-
{r("performance.fpsAreaChartSub")}
|
|
48
|
-
</react_native_1.Text>
|
|
49
|
-
</react_native_1.View>
|
|
50
|
-
</react_native_1.View>
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
<react_native_1.View style={[perfStyles.scorePill,{backgroundColor:z.bg}]}>
|
|
54
|
-
<react_native_1.Text style={[perfStyles.scorePillText,{color:z.color}]}>
|
|
55
|
-
{z.grade}
|
|
56
|
-
</react_native_1.Text>
|
|
57
|
-
</react_native_1.View>
|
|
58
|
-
</react_native_1.View>
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
<react_native_1.View style={perfStyles.primaryFpsRow}>
|
|
62
|
-
<react_native_1.View style={perfStyles.fpsBigNumberBox}>
|
|
63
|
-
<react_native_1.Text style={[perfStyles.fpsBigNumber,{color:s>=55?AppColors_1.AppColors.emerald600:s>=40?AppColors_1.AppColors.firebaseOrange:AppColors_1.AppColors.errorColor}]}>
|
|
64
|
-
{s}
|
|
65
|
-
</react_native_1.Text>
|
|
66
|
-
<react_native_1.Text style={perfStyles.fpsUnit}>{r("performance.fpsUnit")}</react_native_1.Text>
|
|
67
|
-
</react_native_1.View>
|
|
68
|
-
|
|
69
|
-
<react_native_1.View style={perfStyles.fpsStatsGrid}>
|
|
70
|
-
<react_native_1.View style={perfStyles.statItem}>
|
|
71
|
-
<react_native_1.Text style={perfStyles.statLabel}>
|
|
72
|
-
{r("performance.avgFrameTime")}
|
|
73
|
-
</react_native_1.Text>
|
|
74
|
-
<react_native_1.Text style={perfStyles.statValue}>{m}</react_native_1.Text>
|
|
75
|
-
</react_native_1.View>
|
|
76
|
-
<react_native_1.View style={perfStyles.statItem}>
|
|
77
|
-
<react_native_1.Text style={perfStyles.statLabel}>
|
|
78
|
-
{r("performance.peakTime")}
|
|
79
|
-
</react_native_1.Text>
|
|
80
|
-
<react_native_1.Text style={[perfStyles.statValue,W<50&&{color:AppColors_1.AppColors.firebaseOrange}]}>
|
|
81
|
-
{W}
|
|
82
|
-
</react_native_1.Text>
|
|
83
|
-
</react_native_1.View>
|
|
84
|
-
<react_native_1.View style={perfStyles.statItem}>
|
|
85
|
-
<react_native_1.Text style={perfStyles.statLabel}>
|
|
86
|
-
{r("performance.jsLag")}
|
|
87
|
-
</react_native_1.Text>
|
|
88
|
-
<react_native_1.Text style={[perfStyles.statValue,S>5&&{color:AppColors_1.AppColors.firebaseOrange}]}>
|
|
89
|
-
{S}ms
|
|
90
|
-
</react_native_1.Text>
|
|
91
|
-
</react_native_1.View>
|
|
92
|
-
<react_native_1.View style={perfStyles.statItem}>
|
|
93
|
-
<react_native_1.Text style={perfStyles.statLabel}>
|
|
94
|
-
{r("performance.jankRate")}
|
|
95
|
-
</react_native_1.Text>
|
|
96
|
-
<react_native_1.Text style={perfStyles.statValue}>
|
|
97
|
-
{L>0?`${(E/Math.max(1,L/60)*100).toFixed(0)}%`:"0%"}
|
|
98
|
-
</react_native_1.Text>
|
|
99
|
-
</react_native_1.View>
|
|
100
|
-
</react_native_1.View>
|
|
101
|
-
</react_native_1.View>
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
{D&&<react_native_1.View style={perfStyles.graphScrubTooltip}>
|
|
105
|
-
<react_native_1.Text style={perfStyles.graphScrubTooltipText}>
|
|
106
|
-
{D.val} FPS •{" "}
|
|
107
|
-
{Number((1e3/Math.max(1,D.val)).toFixed(1))}
|
|
108
|
-
ms
|
|
109
|
-
</react_native_1.Text>
|
|
110
|
-
</react_native_1.View>}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
<react_native_1.View style={perfStyles.svgGraphContainer}>
|
|
114
|
-
<react_native_svg_1.default width="100%"height={_}viewBox={`0 0 ${B} ${_}`}preserveAspectRatio="none">
|
|
115
|
-
<react_native_svg_1.Defs>
|
|
116
|
-
<react_native_svg_1.LinearGradient id="fpsAreaGradient"x1="0"y1="0"x2="0"y2="1">
|
|
117
|
-
<react_native_svg_1.Stop offset="0%"stopColor={m>=55?AppColors_1.AppColors.emerald500:m>=40?AppColors_1.AppColors.amber500:AppColors_1.AppColors.errorColor}stopOpacity="0.32"/>
|
|
118
|
-
<react_native_svg_1.Stop offset="100%"stopColor={m>=55?AppColors_1.AppColors.emerald500:m>=40?AppColors_1.AppColors.amber500:AppColors_1.AppColors.errorColor}stopOpacity="0.02"/>
|
|
119
|
-
</react_native_svg_1.LinearGradient>
|
|
120
|
-
</react_native_svg_1.Defs>
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
<react_native_svg_1.Line x1="0"y1="7"x2={B}y2="7"stroke={AppColors_1.AppColors.emerald500}strokeWidth="1"strokeDasharray="4,4"opacity="0.4"/>
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
<react_native_svg_1.Line x1="0"y1={_/2}x2={B}y2={_/2}stroke={AppColors_1.AppColors.amber500}strokeWidth="0.8"strokeDasharray="3,3"opacity="0.3"/>
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
{b.areaPath?<react_native_svg_1.Path d={b.areaPath}fill="url(#fpsAreaGradient)"/>:null}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
{b.linePath?<react_native_svg_1.Path d={b.linePath}fill="none"stroke={m>=55?AppColors_1.AppColors.emerald600:m>=40?AppColors_1.AppColors.amber600:AppColors_1.AppColors.errorColor}strokeWidth="2.2"/>:null}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
{b.coords.map((e,t)=>{const o=v===t,a=e.val<50;return<react_native_svg_1.G key={t}>
|
|
136
|
-
{a&&<react_native_svg_1.Circle cx={e.x}cy={e.y}r="4"fill={AppColors_1.AppColors.errorColor}opacity="0.25"/>}
|
|
137
|
-
<react_native_svg_1.Circle cx={e.x}cy={e.y}r={o?4:a?2.5:1.8}fill={o?AppColors_1.AppColors.brandPurple:a?AppColors_1.AppColors.errorColor:AppColors_1.AppColors.emerald600}stroke={AppColors_1.AppColors.white}strokeWidth={o?1.5:.8}/>
|
|
138
|
-
</react_native_svg_1.G>})}
|
|
139
|
-
</react_native_svg_1.default>
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
<react_native_1.View style={perfStyles.svgTouchOverlay}>
|
|
143
|
-
{b.coords.map((e,t)=><react_native_1.TouchableOpacity key={t}style={perfStyles.svgTouchCol}activeOpacity={.7}onPress={()=>Z(v===t?null:t)}/>)}
|
|
144
|
-
</react_native_1.View>
|
|
145
|
-
</react_native_1.View>
|
|
146
|
-
|
|
147
|
-
<react_native_1.View style={perfStyles.sparklineFooter}>
|
|
148
|
-
<react_native_1.Text style={perfStyles.sparklineFooterText}>
|
|
149
|
-
{r("performance.realtimeWindow")}
|
|
150
|
-
</react_native_1.Text>
|
|
151
|
-
<react_native_1.Text style={perfStyles.sparklineFooterTarget}>
|
|
152
|
-
{r("performance.target60Fps",{fps:m})}
|
|
153
|
-
</react_native_1.Text>
|
|
154
|
-
</react_native_1.View>
|
|
155
|
-
</react_native_1.View>
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
<react_native_1.View style={perfStyles.budgetCard}>
|
|
159
|
-
<react_native_1.View style={perfStyles.budgetHeader}>
|
|
160
|
-
<react_native_1.View style={{flexDirection:"row",alignItems:"center",gap:6}}>
|
|
161
|
-
<NetworkIcons_1.BoltIcon color={AppColors_1.AppColors.brandPurple}size={15}/>
|
|
162
|
-
<react_native_1.View>
|
|
163
|
-
<react_native_1.Text style={perfStyles.budgetTitle}>Native Hardware & System Health</react_native_1.Text>
|
|
164
|
-
<react_native_1.Text style={perfStyles.heroSubTitle}>Live kernel metrics, resident RAM, and thermal state</react_native_1.Text>
|
|
165
|
-
</react_native_1.View>
|
|
166
|
-
</react_native_1.View>
|
|
167
|
-
{y&&<react_native_1.View style={{paddingHorizontal:7,paddingVertical:2.5,borderRadius:5,backgroundColor:y.thermalState==="nominal"?`${AppColors_1.AppColors.emerald600}18`:y.thermalState==="fair"?`${AppColors_1.AppColors.amber800Warm}18`:`${AppColors_1.AppColors.errorColor}18`}}>
|
|
168
|
-
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9.5,color:y.thermalState==="nominal"?AppColors_1.AppColors.emerald600:y.thermalState==="fair"?AppColors_1.AppColors.amber800Warm:AppColors_1.AppColors.errorColor,textTransform:"uppercase"}}>
|
|
169
|
-
{y.thermalState} THERMAL
|
|
170
|
-
</react_native_1.Text>
|
|
171
|
-
</react_native_1.View>}
|
|
172
|
-
</react_native_1.View>
|
|
173
|
-
|
|
174
|
-
<react_native_1.View style={{flexDirection:"row",flexWrap:"wrap",gap:8,marginTop:10}}>
|
|
175
|
-
<react_native_1.View style={{flex:1,minWidth:100,backgroundColor:AppColors_1.AppColors.grayBackground,padding:8,borderRadius:8,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor}}>
|
|
176
|
-
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:9.5,color:AppColors_1.AppColors.grayTextWeak}}>Resident RAM</react_native_1.Text>
|
|
177
|
-
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:13,color:AppColors_1.AppColors.brandPurple,marginTop:2}}>
|
|
178
|
-
{y?`${y.residentRamMb.toFixed(1)} MB`:"18.4 MB"}
|
|
179
|
-
</react_native_1.Text>
|
|
180
|
-
</react_native_1.View>
|
|
181
|
-
<react_native_1.View style={{flex:1,minWidth:100,backgroundColor:AppColors_1.AppColors.grayBackground,padding:8,borderRadius:8,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor}}>
|
|
182
|
-
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:9.5,color:AppColors_1.AppColors.grayTextWeak}}>Total Physical RAM</react_native_1.Text>
|
|
183
|
-
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:13,color:AppColors_1.AppColors.primaryBlack,marginTop:2}}>
|
|
184
|
-
{y?`${Math.round(y.totalPhysicalRamMb)} MB`:"3840 MB"}
|
|
185
|
-
</react_native_1.Text>
|
|
186
|
-
</react_native_1.View>
|
|
187
|
-
<react_native_1.View style={{flex:1,minWidth:100,backgroundColor:AppColors_1.AppColors.grayBackground,padding:8,borderRadius:8,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor}}>
|
|
188
|
-
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:9.5,color:AppColors_1.AppColors.grayTextWeak}}>Active CPU Cores</react_native_1.Text>
|
|
189
|
-
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:13,color:AppColors_1.AppColors.skyBlue,marginTop:2}}>
|
|
190
|
-
{y?`${y.activeCpuCores} Cores`:"6 Cores"}
|
|
191
|
-
</react_native_1.Text>
|
|
192
|
-
</react_native_1.View>
|
|
193
|
-
</react_native_1.View>
|
|
194
|
-
</react_native_1.View>
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
<react_native_1.View style={perfStyles.budgetCard}>
|
|
198
|
-
<react_native_1.View style={perfStyles.budgetHeader}>
|
|
199
|
-
<react_native_1.View>
|
|
200
|
-
<react_native_1.Text style={perfStyles.budgetTitle}>
|
|
201
|
-
{r("performance.frameLatencyDistTitle")}
|
|
202
|
-
</react_native_1.Text>
|
|
203
|
-
<react_native_1.Text style={perfStyles.heroSubTitle}>
|
|
204
|
-
{r("performance.frameLatencyDistSub")}
|
|
205
|
-
</react_native_1.Text>
|
|
206
|
-
</react_native_1.View>
|
|
207
|
-
</react_native_1.View>
|
|
208
|
-
|
|
209
|
-
<react_native_1.View style={perfStyles.histogramContainer}>
|
|
210
|
-
{Q.map(e=><react_native_1.View key={e.key}style={perfStyles.histogramRow}>
|
|
211
|
-
<react_native_1.View style={perfStyles.histogramLabelCol}>
|
|
212
|
-
<react_native_1.View style={[perfStyles.legendDot,{backgroundColor:e.color}]}/>
|
|
213
|
-
<react_native_1.Text style={perfStyles.histogramLabelText}>{e.label}</react_native_1.Text>
|
|
214
|
-
</react_native_1.View>
|
|
215
|
-
|
|
216
|
-
<react_native_1.View style={perfStyles.histogramBarCol}>
|
|
217
|
-
<react_native_1.View style={perfStyles.histogramTrack}>
|
|
218
|
-
<react_native_1.View style={[perfStyles.histogramBarFill,{width:`${Math.max(e.percent>0?4:0,e.percent)}%`,backgroundColor:e.color}]}/>
|
|
219
|
-
</react_native_1.View>
|
|
220
|
-
</react_native_1.View>
|
|
221
|
-
|
|
222
|
-
<react_native_1.View style={perfStyles.histogramStatsCol}>
|
|
223
|
-
<react_native_1.Text style={[perfStyles.histogramPercentText,{color:e.color}]}>
|
|
224
|
-
{e.percent}%
|
|
225
|
-
</react_native_1.Text>
|
|
226
|
-
<react_native_1.Text style={perfStyles.histogramCountText}>
|
|
227
|
-
({e.count})
|
|
228
|
-
</react_native_1.Text>
|
|
229
|
-
</react_native_1.View>
|
|
230
|
-
</react_native_1.View>)}
|
|
231
|
-
</react_native_1.View>
|
|
232
|
-
</react_native_1.View>
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
<react_native_1.View style={perfStyles.budgetCard}>
|
|
236
|
-
<react_native_1.View style={perfStyles.budgetHeader}>
|
|
237
|
-
<react_native_1.Text style={perfStyles.budgetTitle}>{r("performance.budgetUsage")}</react_native_1.Text>
|
|
238
|
-
<react_native_1.Text style={perfStyles.budgetHeadroom}>
|
|
239
|
-
{r("performance.budgetHeadroom",{time:C.freeTime,percent:C.headroomPercent})}
|
|
240
|
-
</react_native_1.Text>
|
|
241
|
-
</react_native_1.View>
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
<react_native_1.View style={perfStyles.budgetBarContainer}>
|
|
245
|
-
<react_native_1.View style={[perfStyles.budgetBarSegment,{flex:Math.max(.5,C.jsTime),backgroundColor:AppColors_1.AppColors.sky400}]}/>
|
|
246
|
-
<react_native_1.View style={[perfStyles.budgetBarSegment,{flex:Math.max(.5,C.layoutTime),backgroundColor:AppColors_1.AppColors.indigo500}]}/>
|
|
247
|
-
<react_native_1.View style={[perfStyles.budgetBarSegment,{flex:Math.max(.5,C.renderTime),backgroundColor:AppColors_1.AppColors.pink400}]}/>
|
|
248
|
-
<react_native_1.View style={[perfStyles.budgetBarSegment,{flex:Math.max(.5,C.freeTime),backgroundColor:AppColors_1.AppColors.emerald400}]}/>
|
|
249
|
-
</react_native_1.View>
|
|
250
|
-
|
|
251
|
-
<react_native_1.View style={perfStyles.budgetLegendGrid}>
|
|
252
|
-
<react_native_1.View style={perfStyles.legendItem}>
|
|
253
|
-
<react_native_1.View style={[perfStyles.legendDot,{backgroundColor:AppColors_1.AppColors.sky400}]}/>
|
|
254
|
-
<react_native_1.Text style={perfStyles.legendText}>
|
|
255
|
-
{r("performance.jsExec",{time:C.jsTime})}
|
|
256
|
-
</react_native_1.Text>
|
|
257
|
-
</react_native_1.View>
|
|
258
|
-
<react_native_1.View style={perfStyles.legendItem}>
|
|
259
|
-
<react_native_1.View style={[perfStyles.legendDot,{backgroundColor:AppColors_1.AppColors.indigo500}]}/>
|
|
260
|
-
<react_native_1.Text style={perfStyles.legendText}>
|
|
261
|
-
{r("performance.yogaLayoutTime",{time:C.layoutTime})}
|
|
262
|
-
</react_native_1.Text>
|
|
263
|
-
</react_native_1.View>
|
|
264
|
-
<react_native_1.View style={perfStyles.legendItem}>
|
|
265
|
-
<react_native_1.View style={[perfStyles.legendDot,{backgroundColor:AppColors_1.AppColors.pink400}]}/>
|
|
266
|
-
<react_native_1.Text style={perfStyles.legendText}>
|
|
267
|
-
{r("performance.uiRenderTime",{time:C.renderTime})}
|
|
268
|
-
</react_native_1.Text>
|
|
269
|
-
</react_native_1.View>
|
|
270
|
-
<react_native_1.View style={perfStyles.legendItem}>
|
|
271
|
-
<react_native_1.View style={[perfStyles.legendDot,{backgroundColor:AppColors_1.AppColors.emerald400}]}/>
|
|
272
|
-
<react_native_1.Text style={[perfStyles.legendText,{color:AppColors_1.AppColors.emerald600,fontFamily:AppFonts_1.AppFonts.interBold}]}>
|
|
273
|
-
{r("performance.freeTime",{time:C.freeTime})}
|
|
274
|
-
</react_native_1.Text>
|
|
275
|
-
</react_native_1.View>
|
|
276
|
-
</react_native_1.View>
|
|
277
|
-
</react_native_1.View>
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
<react_native_1.View style={perfStyles.engineSummaryGrid}>
|
|
281
|
-
<react_native_1.View style={perfStyles.engineSummaryCard}>
|
|
282
|
-
<react_native_1.Text style={perfStyles.engineSummaryLabel}>{r("performance.jsEngine")}</react_native_1.Text>
|
|
283
|
-
<react_native_1.Text style={perfStyles.engineSummaryValue}>{w.jsEngineName}</react_native_1.Text>
|
|
284
|
-
<react_native_1.Text style={perfStyles.engineSummarySub}>{w.jsEngineSub}</react_native_1.Text>
|
|
285
|
-
</react_native_1.View>
|
|
286
|
-
<react_native_1.View style={perfStyles.engineSummaryCard}>
|
|
287
|
-
<react_native_1.Text style={perfStyles.engineSummaryLabel}>{r("performance.uiRenderThread")}</react_native_1.Text>
|
|
288
|
-
<react_native_1.Text style={perfStyles.engineSummaryValue}>{w.uiArchName}</react_native_1.Text>
|
|
289
|
-
<react_native_1.Text style={perfStyles.engineSummarySub}>{w.uiArchSub}</react_native_1.Text>
|
|
290
|
-
</react_native_1.View>
|
|
291
|
-
<react_native_1.View style={perfStyles.engineSummaryCard}>
|
|
292
|
-
<react_native_1.Text style={perfStyles.engineSummaryLabel}>{r("performance.tabMemory")}</react_native_1.Text>
|
|
293
|
-
<react_native_1.Text style={perfStyles.engineSummaryValue}>{w.usedHeapMb} MB</react_native_1.Text>
|
|
294
|
-
<react_native_1.Text style={perfStyles.engineSummarySub}>
|
|
295
|
-
{r("performance.heapAllocatedSub",{allocated:w.totalAllocMb})}
|
|
296
|
-
</react_native_1.Text>
|
|
297
|
-
</react_native_1.View>
|
|
298
|
-
</react_native_1.View>
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
<react_native_1.View style={perfStyles.logsHeaderRow}>
|
|
302
|
-
<react_native_1.Text style={perfStyles.logsSectionHeading}>
|
|
303
|
-
{r("performance.recordedEvents")} ({F.length})
|
|
304
|
-
</react_native_1.Text>
|
|
305
|
-
{M.length>0&&<TouchableScale_1.default onPress={ee}>
|
|
306
|
-
<react_native_1.Text style={perfStyles.clearLink}>{r("common.clear")}</react_native_1.Text>
|
|
307
|
-
</TouchableScale_1.default>}
|
|
308
|
-
</react_native_1.View>
|
|
309
|
-
|
|
310
|
-
{F.length===0?<react_native_1.View style={perfStyles.emptyCard}>
|
|
311
|
-
<NetworkIcons_1.BoltIcon color={AppColors_1.AppColors.amber500}size={30}/>
|
|
312
|
-
<react_native_1.Text style={perfStyles.emptyTitle}>
|
|
313
|
-
{f.trim().length>0?"No Matching Events":r("performance.emptyTitle")}
|
|
314
|
-
</react_native_1.Text>
|
|
315
|
-
<react_native_1.Text style={perfStyles.emptySub}>
|
|
316
|
-
{f.trim().length>0?`No performance events match "${f}"`:r("performance.emptySubtitle")}
|
|
317
|
-
</react_native_1.Text>
|
|
318
|
-
{f.trim().length>0&&<TouchableScale_1.default onPress={()=>I("")}style={{marginTop:10,paddingHorizontal:14,paddingVertical:6,borderRadius:8,backgroundColor:AppColors_1.AppColors.grayBackground,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary}}>
|
|
319
|
-
<react_native_1.Text style={{color:AppColors_1.AppColors.brandPurple,fontSize:12,fontFamily:AppFonts_1.AppFonts.interBold}}>
|
|
320
|
-
Clear Search
|
|
321
|
-
</react_native_1.Text>
|
|
322
|
-
</TouchableScale_1.default>}
|
|
323
|
-
</react_native_1.View>:F.map(e=>{const t=e.severity==="optimal",o=e.severity==="warning",a=e.severity==="critical",c=!!G[e.id],p=t?AppColors_1.AppColors.greenBg:o?AppColors_1.AppColors.amberBg:AppColors_1.AppColors.errorCardBg,T=t?AppColors_1.AppColors.greenBorder:o?AppColors_1.AppColors.lightOrange:AppColors_1.AppColors.errorBorder,u=t?AppColors_1.AppColors.emerald600:o?AppColors_1.AppColors.amber700:AppColors_1.AppColors.errorColor;return<TouchableScale_1.default key={e.id}onPress={()=>J(e.id)}style={[perfStyles.eventCard,a&&{borderColor:AppColors_1.AppColors.errorBorder,backgroundColor:AppColors_1.AppColors.errorCardBg}]}>
|
|
324
|
-
<react_native_1.View style={perfStyles.eventTopRow}>
|
|
325
|
-
<react_native_1.View style={perfStyles.fpsBadgeGroup}>
|
|
326
|
-
<react_native_1.View style={[perfStyles.fpsBadge,{backgroundColor:p,borderColor:T}]}>
|
|
327
|
-
<react_native_1.Text style={[perfStyles.fpsBadgeText,{color:u}]}>
|
|
328
|
-
{e.fps} FPS
|
|
329
|
-
</react_native_1.Text>
|
|
330
|
-
</react_native_1.View>
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
<react_native_1.View style={[perfStyles.droppedBadge,(e.droppedFrames??Math.max(0,60-e.fps))>0?perfStyles.droppedBadgeWarning:perfStyles.droppedBadgeOptimal]}>
|
|
334
|
-
<react_native_1.Text style={[perfStyles.droppedBadgeText,(e.droppedFrames??Math.max(0,60-e.fps))>0?{color:AppColors_1.AppColors.red600}:{color:AppColors_1.AppColors.emerald600}]}>
|
|
335
|
-
{(e.droppedFrames??Math.max(0,60-e.fps))>0?r("performance.droppedFrames",{count:e.droppedFrames??Math.max(0,60-e.fps)}):r("performance.zeroDropped")}
|
|
336
|
-
</react_native_1.Text>
|
|
337
|
-
</react_native_1.View>
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
{e.bottleneckThread&&<react_native_1.View style={[perfStyles.bottleneckTag,{flexDirection:"row",alignItems:"center",gap:3}]}>
|
|
341
|
-
{e.bottleneckThread==="JS Thread"&&<NetworkIcons_1.BoltIcon size={10}color={AppColors_1.AppColors.warningIconGold}/>}
|
|
342
|
-
<react_native_1.Text style={perfStyles.bottleneckTagText}>
|
|
343
|
-
{e.bottleneckThread==="JS Thread"?r("performance.jsBound"):e.bottleneckThread==="UI Thread"?r("performance.uiBound"):r("performance.balanced")}
|
|
344
|
-
</react_native_1.Text>
|
|
345
|
-
</react_native_1.View>}
|
|
346
|
-
</react_native_1.View>
|
|
347
|
-
|
|
348
|
-
<react_native_1.View style={{flexDirection:"row",alignItems:"center",gap:6}}>
|
|
349
|
-
<CopyButton_1.default value={()=>e}label={r("common.copyJson")}/>
|
|
350
|
-
<NetworkIcons_1.ChevronIcon isExpanded={c}size={14}color={AppColors_1.AppColors.grayTextWeak}/>
|
|
351
|
-
</react_native_1.View>
|
|
352
|
-
</react_native_1.View>
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
<react_native_1.View style={{marginTop:4}}>
|
|
356
|
-
<HighlightText_1.default text={e.label}search={f}style={perfStyles.eventLabel}highlightStyle={perfStyles.searchHighlight}/>
|
|
357
|
-
<react_native_1.View style={perfStyles.eventMetaRow}>
|
|
358
|
-
<react_native_1.Text style={perfStyles.eventMeta}>
|
|
359
|
-
{r("performance.msTotal",{duration:e.durationMs,time:new Date(e.timestamp).toLocaleTimeString()})}
|
|
360
|
-
</react_native_1.Text>
|
|
361
|
-
<react_native_1.Text style={perfStyles.eventMetaDot}>•</react_native_1.Text>
|
|
362
|
-
<react_native_1.Text style={[perfStyles.frameBudgetHint,e.durationMs>16.67?{color:AppColors_1.AppColors.amber800Warm}:{color:AppColors_1.AppColors.emerald600}]}>
|
|
363
|
-
{r("performance.frameBudgetMs",{time:e.durationMs,budget:Number((e.durationMs/16.67*100).toFixed(0))})}
|
|
364
|
-
</react_native_1.Text>
|
|
365
|
-
</react_native_1.View>
|
|
366
|
-
</react_native_1.View>
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
<react_native_1.View style={perfStyles.frameBarTrack}>
|
|
370
|
-
<react_native_1.View style={[perfStyles.frameBarFill,{width:`${Math.min(100,Math.max(10,e.durationMs/33.33*100))}%`,backgroundColor:u}]}/>
|
|
371
|
-
</react_native_1.View>
|
|
372
|
-
|
|
373
|
-
<HighlightText_1.default text={e.detail}search={f}style={perfStyles.eventDetail}highlightStyle={perfStyles.searchHighlight}/>
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
{c&&<react_native_1.View style={perfStyles.expandedDetailBox}>
|
|
377
|
-
|
|
378
|
-
{(e.screenName||e.source)&&<react_native_1.View style={perfStyles.sourceRow}>
|
|
379
|
-
<react_native_1.Text style={perfStyles.sourceTag}>{r("performance.screenContext")}</react_native_1.Text>
|
|
380
|
-
<react_native_1.Text style={perfStyles.sourceText}numberOfLines={1}>
|
|
381
|
-
{e.screenName||e.source}
|
|
382
|
-
</react_native_1.Text>
|
|
383
|
-
</react_native_1.View>}
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
<react_native_1.View style={perfStyles.fpsMetricsGrid}>
|
|
387
|
-
<react_native_1.View style={perfStyles.fpsMetricItem}>
|
|
388
|
-
<react_native_1.Text style={perfStyles.fpsMetricLabel}>{r("performance.target60Fps",{fps:e.fps})}</react_native_1.Text>
|
|
389
|
-
<react_native_1.Text style={[perfStyles.fpsMetricVal,{color:u}]}>
|
|
390
|
-
{e.fps} FPS
|
|
391
|
-
</react_native_1.Text>
|
|
392
|
-
</react_native_1.View>
|
|
393
|
-
<react_native_1.View style={perfStyles.fpsMetricItem}>
|
|
394
|
-
<react_native_1.Text style={perfStyles.fpsMetricLabel}>{r("performance.frameDuration")}</react_native_1.Text>
|
|
395
|
-
<react_native_1.Text style={perfStyles.fpsMetricVal}>
|
|
396
|
-
{e.durationMs} ms
|
|
397
|
-
</react_native_1.Text>
|
|
398
|
-
</react_native_1.View>
|
|
399
|
-
<react_native_1.View style={perfStyles.fpsMetricItem}>
|
|
400
|
-
<react_native_1.Text style={perfStyles.fpsMetricLabel}>{r("performance.jankRate")}</react_native_1.Text>
|
|
401
|
-
<react_native_1.Text style={[perfStyles.fpsMetricVal,(e.droppedFrames??0)>0?{color:AppColors_1.AppColors.red600}:{color:AppColors_1.AppColors.emerald600}]}>
|
|
402
|
-
{e.droppedFrames??Math.max(0,60-e.fps)} frames
|
|
403
|
-
</react_native_1.Text>
|
|
404
|
-
</react_native_1.View>
|
|
405
|
-
<react_native_1.View style={perfStyles.fpsMetricItem}>
|
|
406
|
-
<react_native_1.Text style={perfStyles.fpsMetricLabel}>{r("performance.bottleneck")}</react_native_1.Text>
|
|
407
|
-
<react_native_1.Text style={perfStyles.fpsMetricVal}>
|
|
408
|
-
{e.bottleneckThread||r("performance.balanced")}
|
|
409
|
-
</react_native_1.Text>
|
|
410
|
-
</react_native_1.View>
|
|
411
|
-
</react_native_1.View>
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
{e.breakdown&&<react_native_1.View style={perfStyles.breakdownGrid}>
|
|
415
|
-
<react_native_1.View style={perfStyles.breakdownCol}>
|
|
416
|
-
<react_native_1.Text style={perfStyles.breakdownLabel}>{r("performance.jsThread")}</react_native_1.Text>
|
|
417
|
-
<react_native_1.Text style={perfStyles.breakdownVal}>
|
|
418
|
-
{e.breakdown.jsTimeMs} ms
|
|
419
|
-
</react_native_1.Text>
|
|
420
|
-
</react_native_1.View>
|
|
421
|
-
<react_native_1.View style={perfStyles.breakdownCol}>
|
|
422
|
-
<react_native_1.Text style={perfStyles.breakdownLabel}>{r("performance.uiThread")}</react_native_1.Text>
|
|
423
|
-
<react_native_1.Text style={perfStyles.breakdownVal}>
|
|
424
|
-
{e.breakdown.uiTimeMs} ms
|
|
425
|
-
</react_native_1.Text>
|
|
426
|
-
</react_native_1.View>
|
|
427
|
-
{e.breakdown.bridgeLatencyMs!=null&&<react_native_1.View style={perfStyles.breakdownCol}>
|
|
428
|
-
<react_native_1.Text style={perfStyles.breakdownLabel}>{r("performance.jsiLatency")}</react_native_1.Text>
|
|
429
|
-
<react_native_1.Text style={perfStyles.breakdownVal}>
|
|
430
|
-
{e.breakdown.bridgeLatencyMs} ms
|
|
431
|
-
</react_native_1.Text>
|
|
432
|
-
</react_native_1.View>}
|
|
433
|
-
{e.heapDeltaKb!=null&&<react_native_1.View style={perfStyles.breakdownCol}>
|
|
434
|
-
<react_native_1.Text style={perfStyles.breakdownLabel}>{r("performance.heapImpact")}</react_native_1.Text>
|
|
435
|
-
<react_native_1.Text style={[perfStyles.breakdownVal,{color:e.heapDeltaKb>0?AppColors_1.AppColors.amber700:AppColors_1.AppColors.emerald600}]}>
|
|
436
|
-
{e.heapDeltaKb>0?`+${e.heapDeltaKb}`:e.heapDeltaKb} KB
|
|
437
|
-
</react_native_1.Text>
|
|
438
|
-
</react_native_1.View>}
|
|
439
|
-
</react_native_1.View>}
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
{e.advice&&<react_native_1.View style={perfStyles.adviceCard}>
|
|
443
|
-
<react_native_1.View style={{flexDirection:"row",alignItems:"center",gap:5}}>
|
|
444
|
-
<NetworkIcons_1.LightbulbIcon color={AppColors_1.AppColors.purpleShade700}size={12}/>
|
|
445
|
-
<react_native_1.Text style={perfStyles.adviceHeading}>{r("performance.optimizationTip")}</react_native_1.Text>
|
|
446
|
-
</react_native_1.View>
|
|
447
|
-
<react_native_1.Text style={perfStyles.adviceBodyText}>{e.advice}</react_native_1.Text>
|
|
448
|
-
</react_native_1.View>}
|
|
449
|
-
</react_native_1.View>}
|
|
450
|
-
</TouchableScale_1.default>})}
|
|
451
|
-
|
|
452
|
-
<EndOfListFooter_1.default count={F.length}label={r("performance.recordedEvents")}/>
|
|
453
|
-
</react_native_1.ScrollView>
|
|
454
|
-
</react_native_1.View>}),perfStyles=react_native_1.StyleSheet.create({container:{flex:1,backgroundColor:AppColors_1.AppColors.grayBackground},headerBar:{flexDirection:"row",alignItems:"center",paddingHorizontal:12,paddingVertical:8,backgroundColor:AppColors_1.AppColors.white,borderBottomWidth:1,borderBottomColor:AppColors_1.AppColors.dividerColor,gap:8},searchBox:{flex:1,flexDirection:"row",alignItems:"center",backgroundColor:AppColors_1.AppColors.grayBackground,borderRadius:8,paddingHorizontal:8,height:36,gap:6,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor},searchInput:{flex:1,fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:12,color:AppColors_1.AppColors.primaryBlack,paddingVertical:0},recordToggleBtn:{flexDirection:"row",alignItems:"center",gap:5,paddingHorizontal:8,paddingVertical:6,borderRadius:7,borderWidth:1},recordToggleActive:{backgroundColor:`${AppColors_1.AppColors.errorColor}14`,borderColor:`${AppColors_1.AppColors.errorColor}30`},recordToggleInactive:{backgroundColor:AppColors_1.AppColors.graySurface,borderColor:AppColors_1.AppColors.dividerColor},recordingDot:{width:6,height:6,borderRadius:3},recordToggleText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:11},categoryScrollWrapper:{backgroundColor:AppColors_1.AppColors.white,borderBottomWidth:1,borderBottomColor:AppColors_1.AppColors.dividerColor,height:42},categoryScrollView:{flexGrow:0,height:42},categoryScroll:{flexDirection:"row",alignItems:"center",gap:6,paddingHorizontal:12,height:42},categoryChip:{flexDirection:"row",alignItems:"center",justifyContent:"center",paddingHorizontal:12,height:28,borderRadius:14,backgroundColor:AppColors_1.AppColors.grayBackground,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor},categoryChipActive:{backgroundColor:AppColors_1.AppColors.brandPurple,borderColor:AppColors_1.AppColors.brandPurple},categoryChipText:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:11,color:AppColors_1.AppColors.grayTextStrong},categoryChipTextActive:{fontFamily:AppFonts_1.AppFonts.interBold,color:AppColors_1.AppColors.white},scrollBody:{flex:1},scrollContent:{padding:12,gap:10},heroCard:{backgroundColor:AppColors_1.AppColors.white,borderRadius:12,padding:14,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor,shadowColor:AppColors_1.AppColors.black,shadowOffset:{width:0,height:1},shadowOpacity:.05,shadowRadius:3,elevation:1},heroHeaderRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:10},heroTitle:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:13,color:AppColors_1.AppColors.primaryBlack},heroSubTitle:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:9.5,color:AppColors_1.AppColors.grayTextWeak,marginTop:1},scorePill:{paddingHorizontal:8,paddingVertical:3,borderRadius:6},scorePillText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10.5},primaryFpsRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingVertical:6},fpsBigNumberBox:{flexDirection:"row",alignItems:"baseline",gap:4,minWidth:80},fpsBigNumber:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:42,lineHeight:48,letterSpacing:-1,minWidth:54},fpsUnit:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:14,color:AppColors_1.AppColors.grayTextWeak},fpsStatsGrid:{flexDirection:"row",alignItems:"center",gap:8},statItem:{alignItems:"center",minWidth:50},statLabel:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:10,color:AppColors_1.AppColors.grayTextWeak},statValue:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:13,color:AppColors_1.AppColors.primaryBlack,marginTop:2,textAlign:"center"},graphScrubTooltip:{alignSelf:"center",backgroundColor:AppColors_1.AppColors.primaryBlack,paddingHorizontal:8,paddingVertical:3,borderRadius:6,marginBottom:4},graphScrubTooltipText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10,color:AppColors_1.AppColors.white},svgGraphContainer:{width:"100%",height:64,marginTop:6,position:"relative",overflow:"hidden",borderRadius:8},svgTouchOverlay:{position:"absolute",top:0,left:0,right:0,bottom:0,flexDirection:"row"},svgTouchCol:{flex:1,height:"100%"},histogramContainer:{gap:8,marginTop:4},histogramRow:{flexDirection:"row",alignItems:"center",gap:8},histogramLabelCol:{flexDirection:"row",alignItems:"center",gap:6,width:140},histogramLabelText:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:10,color:AppColors_1.AppColors.grayTextStrong},histogramBarCol:{flex:1},histogramTrack:{height:8,backgroundColor:AppColors_1.AppColors.grayBackground,borderRadius:4,overflow:"hidden"},histogramBarFill:{height:"100%",borderRadius:4},histogramStatsCol:{flexDirection:"row",alignItems:"center",gap:4,minWidth:52,justifyContent:"flex-end"},histogramPercentText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10.5},histogramCountText:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:9.5,color:AppColors_1.AppColors.grayTextWeak},sparklineFooter:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginTop:6},sparklineFooterText:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:10,color:AppColors_1.AppColors.grayTextWeak},sparklineFooterTarget:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:10,color:AppColors_1.AppColors.emerald600},budgetCard:{backgroundColor:AppColors_1.AppColors.white,borderRadius:12,padding:12,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor,gap:8},budgetHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},budgetTitle:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:12.5,color:AppColors_1.AppColors.primaryBlack},budgetHeadroom:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:11,color:AppColors_1.AppColors.emerald600},budgetBarContainer:{flexDirection:"row",height:8,borderRadius:4,overflow:"hidden",backgroundColor:AppColors_1.AppColors.grayBackground,gap:2},budgetBarSegment:{height:"100%",borderRadius:2},budgetLegendGrid:{flexDirection:"row",flexWrap:"wrap",gap:10,marginTop:2},legendItem:{flexDirection:"row",alignItems:"center",gap:4},legendDot:{width:6,height:6,borderRadius:3},legendText:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:10,color:AppColors_1.AppColors.grayTextStrong},engineSummaryGrid:{flexDirection:"row",alignItems:"center",gap:8},engineSummaryCard:{flex:1,backgroundColor:AppColors_1.AppColors.white,borderRadius:10,padding:10,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor},engineSummaryLabel:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:10,color:AppColors_1.AppColors.grayTextWeak},engineSummaryValue:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:11.5,color:AppColors_1.AppColors.primaryBlack,marginTop:2},engineSummarySub:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:9.5,color:AppColors_1.AppColors.grayTextWeak,marginTop:1},logsHeaderRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginTop:4},logsSectionHeading:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:13,color:AppColors_1.AppColors.primaryBlack},clearLink:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:11.5,color:AppColors_1.AppColors.purple},eventCard:{backgroundColor:AppColors_1.AppColors.white,borderRadius:10,padding:10,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor,gap:6},eventTopRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},fpsBadgeGroup:{flexDirection:"row",alignItems:"center",gap:6,flexWrap:"wrap"},fpsBadge:{paddingHorizontal:6,paddingVertical:2,borderRadius:5,borderWidth:1},fpsBadgeText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10},droppedBadge:{paddingHorizontal:6,paddingVertical:2,borderRadius:5,borderWidth:1},droppedBadgeWarning:{backgroundColor:AppColors_1.AppColors.red100,borderColor:AppColors_1.AppColors.errorBorder},droppedBadgeOptimal:{backgroundColor:AppColors_1.AppColors.green100,borderColor:AppColors_1.AppColors.greenBorder},droppedBadgeText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9.5},bottleneckTag:{backgroundColor:AppColors_1.AppColors.purpleShade50,paddingHorizontal:5,paddingVertical:2,borderRadius:4,borderWidth:1,borderColor:AppColors_1.AppColors.purpleTint2},bottleneckTagText:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:9.5,color:AppColors_1.AppColors.purple},eventMetaRow:{flexDirection:"row",alignItems:"center",gap:6,marginTop:2,flexWrap:"wrap"},eventMetaDot:{fontSize:9,color:AppColors_1.AppColors.grayTextWeak},frameBudgetHint:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:10},frameBarTrack:{height:4,borderRadius:2,backgroundColor:AppColors_1.AppColors.graySurface,overflow:"hidden",marginVertical:4},frameBarFill:{height:"100%",borderRadius:2},fpsMetricsGrid:{flexDirection:"row",alignItems:"center",backgroundColor:AppColors_1.AppColors.white,borderRadius:6,padding:6,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor,justifyContent:"space-between",gap:4},fpsMetricItem:{alignItems:"center",flex:1},fpsMetricLabel:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:8.5,color:AppColors_1.AppColors.grayTextWeak,textAlign:"center"},fpsMetricVal:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10.5,color:AppColors_1.AppColors.primaryBlack,marginTop:1,textAlign:"center"},eventLabel:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:12,color:AppColors_1.AppColors.primaryBlack},eventMeta:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:10,color:AppColors_1.AppColors.grayTextWeak,marginTop:1},eventDetail:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:11,color:AppColors_1.AppColors.grayTextStrong,lineHeight:15},expandChevron:{fontSize:10,color:AppColors_1.AppColors.grayTextWeak,marginLeft:2},expandedDetailBox:{backgroundColor:AppColors_1.AppColors.grayBackground,borderRadius:8,padding:8,marginTop:4,gap:6,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor},sourceRow:{flexDirection:"row",alignItems:"center",gap:6},sourceTag:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:8.5,color:AppColors_1.AppColors.purple,backgroundColor:`${AppColors_1.AppColors.purple}14`,paddingHorizontal:4,paddingVertical:1,borderRadius:3},sourceText:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:10.5,color:AppColors_1.AppColors.grayTextStrong,flex:1},breakdownGrid:{flexDirection:"row",alignItems:"center",backgroundColor:AppColors_1.AppColors.white,borderRadius:6,padding:6,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor,justifyContent:"space-between"},breakdownCol:{alignItems:"center",flex:1},breakdownLabel:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:9,color:AppColors_1.AppColors.grayTextWeak},breakdownVal:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:11,color:AppColors_1.AppColors.primaryBlack,marginTop:1},adviceCard:{backgroundColor:AppColors_1.AppColors.purpleTintBg,borderRadius:6,padding:6,borderWidth:1,borderColor:AppColors_1.AppColors.purpleBorder},adviceHeading:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10,color:AppColors_1.AppColors.purpleShade700},adviceBodyText:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:10.5,color:AppColors_1.AppColors.purple,lineHeight:14,marginTop:1},searchHighlight:{backgroundColor:AppColors_1.AppColors.yellowHighlight,color:AppColors_1.AppColors.amber800,fontFamily:AppFonts_1.AppFonts.interBold},emptyCard:{backgroundColor:AppColors_1.AppColors.white,borderRadius:12,padding:24,alignItems:"center",justifyContent:"center",gap:8,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor},emptyTitle:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:14,color:AppColors_1.AppColors.primaryBlack},emptySub:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:11.5,color:AppColors_1.AppColors.grayTextWeak,textAlign:"center",lineHeight:16}});exports.default=PerformanceTab;
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
export type FileTypeCategory = 'image' | 'typescript' | 'javascript' | 'font' | 'json';
|
|
2
|
-
export interface HostBundleFileItem {
|
|
3
|
-
id: string;
|
|
4
|
-
name: string;
|
|
5
|
-
path: string;
|
|
6
|
-
ext: string;
|
|
7
|
-
category: FileTypeCategory;
|
|
8
|
-
sizeKb: number;
|
|
9
|
-
meta: string;
|
|
10
|
-
color: string;
|
|
11
|
-
status?: 'optimal' | 'warning' | 'info';
|
|
12
|
-
advice?: string;
|
|
13
|
-
isConsumed?: boolean;
|
|
14
|
-
previewUri?: string;
|
|
15
|
-
}
|
|
16
|
-
export interface HostBundlePackageItem {
|
|
17
|
-
id: string;
|
|
18
|
-
name: string;
|
|
19
|
-
version: string;
|
|
20
|
-
latestVersion?: string;
|
|
21
|
-
sizeKb: number;
|
|
22
|
-
percentage: number;
|
|
23
|
-
type: 'direct' | 'peer' | 'transitive';
|
|
24
|
-
isDirectDefined?: boolean;
|
|
25
|
-
parentPackageName?: string;
|
|
26
|
-
subpackages?: HostBundlePackageItem[];
|
|
27
|
-
category: 'core' | 'navigation' | 'network' | 'ui' | 'utils';
|
|
28
|
-
color: string;
|
|
29
|
-
description: string;
|
|
30
|
-
npmUrl?: string;
|
|
31
|
-
isDeprecated?: boolean;
|
|
32
|
-
deprecationReason?: string;
|
|
33
|
-
lastActive?: string;
|
|
34
|
-
}
|
|
35
|
-
export interface HostBinaryComponentItem {
|
|
36
|
-
id: string;
|
|
37
|
-
name: string;
|
|
38
|
-
category: 'js' | 'native' | 'frameworks' | 'assets' | 'meta';
|
|
39
|
-
sizeMb: number;
|
|
40
|
-
pct: number;
|
|
41
|
-
color: string;
|
|
42
|
-
description: string;
|
|
43
|
-
advice: string;
|
|
44
|
-
}
|
|
45
|
-
export interface HostBundleAnalysisResult {
|
|
46
|
-
isLive: boolean;
|
|
47
|
-
scriptURL: string;
|
|
48
|
-
totalDevBytes: number;
|
|
49
|
-
totalDevMb: number;
|
|
50
|
-
totalDevKb: number;
|
|
51
|
-
isHermes: boolean;
|
|
52
|
-
moduleCount: number;
|
|
53
|
-
packageCount: number;
|
|
54
|
-
filesCount: number;
|
|
55
|
-
splitUp: {
|
|
56
|
-
appSource: {
|
|
57
|
-
kb: number;
|
|
58
|
-
mb: number;
|
|
59
|
-
pct: number;
|
|
60
|
-
};
|
|
61
|
-
nodeModules: {
|
|
62
|
-
kb: number;
|
|
63
|
-
mb: number;
|
|
64
|
-
pct: number;
|
|
65
|
-
};
|
|
66
|
-
assetsMedia: {
|
|
67
|
-
kb: number;
|
|
68
|
-
mb: number;
|
|
69
|
-
pct: number;
|
|
70
|
-
};
|
|
71
|
-
metroDevOverhead: {
|
|
72
|
-
kb: number;
|
|
73
|
-
mb: number;
|
|
74
|
-
pct: number;
|
|
75
|
-
};
|
|
76
|
-
};
|
|
77
|
-
files: HostBundleFileItem[];
|
|
78
|
-
packages: HostBundlePackageItem[];
|
|
79
|
-
production: {
|
|
80
|
-
ios: {
|
|
81
|
-
totalInstallMb: number;
|
|
82
|
-
totalDownloadMb: number;
|
|
83
|
-
compressionRatioPct: number;
|
|
84
|
-
components: HostBinaryComponentItem[];
|
|
85
|
-
};
|
|
86
|
-
androidAab: {
|
|
87
|
-
totalInstallMb: number;
|
|
88
|
-
totalDownloadMb: number;
|
|
89
|
-
compressionRatioPct: number;
|
|
90
|
-
components: HostBinaryComponentItem[];
|
|
91
|
-
};
|
|
92
|
-
androidApk: {
|
|
93
|
-
totalInstallMb: number;
|
|
94
|
-
totalDownloadMb: number;
|
|
95
|
-
compressionRatioPct: number;
|
|
96
|
-
components: HostBinaryComponentItem[];
|
|
97
|
-
};
|
|
98
|
-
android: {
|
|
99
|
-
totalInstallMb: number;
|
|
100
|
-
totalDownloadMb: number;
|
|
101
|
-
compressionRatioPct: number;
|
|
102
|
-
components: HostBinaryComponentItem[];
|
|
103
|
-
};
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
export declare const setBundleModuleEnabled: (enabled: boolean) => void;
|
|
107
|
-
export declare const getBundleModuleEnabled: () => boolean;
|
|
108
|
-
export declare const getHostScriptURL: () => string;
|
|
109
|
-
export declare const trackRuntimeModuleExecution: () => void;
|
|
110
|
-
export declare const trackRuntimeDefine: () => void;
|
|
111
|
-
export declare const parseBundleSource: (bundleText: string, totalBytes: number, scriptURL: string, isLive?: boolean) => HostBundleAnalysisResult;
|
|
112
|
-
export declare const getInitialBundleAnalysis: () => HostBundleAnalysisResult;
|
|
113
|
-
export declare const analyzeHostAppBundle: (forceRefresh?: boolean) => Promise<HostBundleAnalysisResult>;
|
|
114
|
-
export declare const clearCachedBundleAnalysis: () => void;
|
|
115
|
-
export declare const getCachedBundleAnalysis: () => HostBundleAnalysisResult | null;
|