react-native-inapp-inspector 2.5.10 → 2.5.12

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.
Files changed (134) hide show
  1. package/README.ar.md +0 -8
  2. package/README.de.md +0 -8
  3. package/README.es.md +0 -8
  4. package/README.fr.md +0 -8
  5. package/README.hi.md +0 -8
  6. package/README.ja.md +0 -8
  7. package/README.ko.md +0 -8
  8. package/README.md +54 -26
  9. package/README.pt-BR.md +0 -8
  10. package/README.ru.md +0 -8
  11. package/README.zh-CN.md +0 -8
  12. package/dist/commonjs/components/ConsoleLogCard.js +32 -26
  13. package/dist/commonjs/components/ErrorBoundary.js +1 -1
  14. package/dist/commonjs/components/Inspector/ConsoleTab.js +19 -14
  15. package/dist/commonjs/components/Inspector/FloatingCaptureWidget.js +4 -4
  16. package/dist/commonjs/components/Inspector/InspectorHeader.js +73 -65
  17. package/dist/commonjs/components/Inspector/MainScreen.js +9 -6
  18. package/dist/commonjs/components/Inspector/MediaGalleryTab.js +187 -90
  19. package/dist/commonjs/components/Inspector/NetworkDetail.js +11 -8
  20. package/dist/commonjs/components/Inspector/NetworkTab.js +33 -31
  21. package/dist/commonjs/components/Inspector/PerformanceTab.d.ts +2 -0
  22. package/dist/commonjs/components/Inspector/PerformanceTab.js +652 -0
  23. package/dist/commonjs/components/Inspector/SettingsPanel.js +346 -245
  24. package/dist/commonjs/components/Inspector/TabBar.js +17 -16
  25. package/dist/commonjs/components/LogCard.js +11 -8
  26. package/dist/commonjs/components/ModuleErrorBoundary.js +1 -1
  27. package/dist/commonjs/components/NetworkIcons.d.ts +9 -0
  28. package/dist/commonjs/components/NetworkIcons.js +51 -6
  29. package/dist/commonjs/constants/index.d.ts +1 -0
  30. package/dist/commonjs/constants/index.js +1 -1
  31. package/dist/commonjs/constants/version.d.ts +1 -1
  32. package/dist/commonjs/constants/version.js +1 -1
  33. package/dist/commonjs/customHooks/crashHandler.d.ts +9 -1
  34. package/dist/commonjs/customHooks/crashHandler.js +4 -4
  35. package/dist/commonjs/helpers/index.d.ts +3 -0
  36. package/dist/commonjs/helpers/index.js +8 -6
  37. package/dist/commonjs/helpers/performanceSampler.d.ts +88 -0
  38. package/dist/commonjs/helpers/performanceSampler.js +1 -0
  39. package/dist/commonjs/helpers/remoteConfig.d.ts +6 -0
  40. package/dist/commonjs/helpers/remoteConfig.js +1 -1
  41. package/dist/commonjs/helpers/telemetry.js +1 -1
  42. package/dist/commonjs/i18n/locales/ar.json +1 -1
  43. package/dist/commonjs/i18n/locales/bn.json +1 -1
  44. package/dist/commonjs/i18n/locales/de.json +1 -1
  45. package/dist/commonjs/i18n/locales/en.json +1 -1
  46. package/dist/commonjs/i18n/locales/es.json +1 -1
  47. package/dist/commonjs/i18n/locales/fr.json +1 -1
  48. package/dist/commonjs/i18n/locales/gu.json +1 -1
  49. package/dist/commonjs/i18n/locales/hi.json +1 -1
  50. package/dist/commonjs/i18n/locales/id.json +1 -1
  51. package/dist/commonjs/i18n/locales/it.json +1 -1
  52. package/dist/commonjs/i18n/locales/ja.json +1 -1
  53. package/dist/commonjs/i18n/locales/kn.json +1 -1
  54. package/dist/commonjs/i18n/locales/ko.json +1 -1
  55. package/dist/commonjs/i18n/locales/ml.json +1 -1
  56. package/dist/commonjs/i18n/locales/mr.json +1 -1
  57. package/dist/commonjs/i18n/locales/nl.json +1 -1
  58. package/dist/commonjs/i18n/locales/pa.json +1 -1
  59. package/dist/commonjs/i18n/locales/pl.json +1 -1
  60. package/dist/commonjs/i18n/locales/pt.json +1 -1
  61. package/dist/commonjs/i18n/locales/ru.json +1 -1
  62. package/dist/commonjs/i18n/locales/ta.json +1 -1
  63. package/dist/commonjs/i18n/locales/te.json +1 -1
  64. package/dist/commonjs/i18n/locales/tr.json +1 -1
  65. package/dist/commonjs/i18n/locales/vi.json +1 -1
  66. package/dist/commonjs/i18n/locales/zh.json +1 -1
  67. package/dist/commonjs/index.d.ts +4 -2
  68. package/dist/commonjs/index.js +3 -3
  69. package/dist/commonjs/styles/index.js +1 -1
  70. package/dist/commonjs/types/enums.d.ts +1 -0
  71. package/dist/commonjs/types/enums.js +1 -1
  72. package/dist/commonjs/types/interfaces.d.ts +28 -0
  73. package/dist/esm/components/ConsoleLogCard.js +67 -61
  74. package/dist/esm/components/ErrorBoundary.js +10 -10
  75. package/dist/esm/components/Inspector/ConsoleTab.js +33 -28
  76. package/dist/esm/components/Inspector/FloatingCaptureWidget.js +22 -22
  77. package/dist/esm/components/Inspector/InspectorHeader.js +194 -186
  78. package/dist/esm/components/Inspector/MainScreen.js +61 -58
  79. package/dist/esm/components/Inspector/MediaGalleryTab.js +254 -157
  80. package/dist/esm/components/Inspector/NetworkDetail.js +62 -59
  81. package/dist/esm/components/Inspector/NetworkTab.js +39 -37
  82. package/dist/esm/components/Inspector/PerformanceTab.d.ts +2 -0
  83. package/dist/esm/components/Inspector/PerformanceTab.js +652 -0
  84. package/dist/esm/components/Inspector/SettingsPanel.js +407 -306
  85. package/dist/esm/components/Inspector/TabBar.js +4 -3
  86. package/dist/esm/components/LogCard.js +37 -34
  87. package/dist/esm/components/ModuleErrorBoundary.js +1 -1
  88. package/dist/esm/components/NetworkIcons.d.ts +9 -0
  89. package/dist/esm/components/NetworkIcons.js +48 -3
  90. package/dist/esm/constants/index.d.ts +1 -0
  91. package/dist/esm/constants/index.js +1 -1
  92. package/dist/esm/constants/version.d.ts +1 -1
  93. package/dist/esm/constants/version.js +1 -1
  94. package/dist/esm/customHooks/crashHandler.d.ts +9 -1
  95. package/dist/esm/customHooks/crashHandler.js +6 -6
  96. package/dist/esm/helpers/index.d.ts +3 -0
  97. package/dist/esm/helpers/index.js +8 -6
  98. package/dist/esm/helpers/performanceSampler.d.ts +88 -0
  99. package/dist/esm/helpers/performanceSampler.js +1 -0
  100. package/dist/esm/helpers/remoteConfig.d.ts +6 -0
  101. package/dist/esm/helpers/remoteConfig.js +1 -1
  102. package/dist/esm/helpers/telemetry.js +1 -1
  103. package/dist/esm/i18n/locales/ar.json +1 -1
  104. package/dist/esm/i18n/locales/bn.json +1 -1
  105. package/dist/esm/i18n/locales/de.json +1 -1
  106. package/dist/esm/i18n/locales/en.json +1 -1
  107. package/dist/esm/i18n/locales/es.json +1 -1
  108. package/dist/esm/i18n/locales/fr.json +1 -1
  109. package/dist/esm/i18n/locales/gu.json +1 -1
  110. package/dist/esm/i18n/locales/hi.json +1 -1
  111. package/dist/esm/i18n/locales/id.json +1 -1
  112. package/dist/esm/i18n/locales/it.json +1 -1
  113. package/dist/esm/i18n/locales/ja.json +1 -1
  114. package/dist/esm/i18n/locales/kn.json +1 -1
  115. package/dist/esm/i18n/locales/ko.json +1 -1
  116. package/dist/esm/i18n/locales/ml.json +1 -1
  117. package/dist/esm/i18n/locales/mr.json +1 -1
  118. package/dist/esm/i18n/locales/nl.json +1 -1
  119. package/dist/esm/i18n/locales/pa.json +1 -1
  120. package/dist/esm/i18n/locales/pl.json +1 -1
  121. package/dist/esm/i18n/locales/pt.json +1 -1
  122. package/dist/esm/i18n/locales/ru.json +1 -1
  123. package/dist/esm/i18n/locales/ta.json +1 -1
  124. package/dist/esm/i18n/locales/te.json +1 -1
  125. package/dist/esm/i18n/locales/tr.json +1 -1
  126. package/dist/esm/i18n/locales/vi.json +1 -1
  127. package/dist/esm/i18n/locales/zh.json +1 -1
  128. package/dist/esm/index.d.ts +4 -2
  129. package/dist/esm/index.js +8 -8
  130. package/dist/esm/styles/index.js +1 -1
  131. package/dist/esm/types/enums.d.ts +1 -0
  132. package/dist/esm/types/enums.js +1 -1
  133. package/dist/esm/types/interfaces.d.ts +28 -0
  134. package/package.json +24 -1
@@ -0,0 +1,652 @@
1
+ import{useState as _,useMemo as Y}from"react";import{Dimensions as De,ScrollView as Te,Share as Re,StyleSheet as ve,Text as T,TouchableOpacity as P,View as S}from"react-native";import Pe,{Line as Se,Path as Le,Rect as $e}from"react-native-svg";import{AppColors as t}from"../../styles/AppColors";import{AppFonts as k}from"../../styles/AppFonts";import L from"../TouchableScale";import{SpeedometerIcon as K,CpuChipIcon as X,PulseGraphIcon as H,FlameIcon as I,MemoryRamIcon as Ce,ShareIcon as He,CopyIcon as Ie,ResetIcon as Ae,CheckIcon as We}from"../NetworkIcons";import{usePerformanceMonitor as Je}from"../../helpers/performanceSampler";import{triggerNativeHaptic as B}from"../../native/NativeInspector";import{copyToClipboard as Ee}from"../../helpers";import{showToast as $}from"../../helpers/toast";import{useTranslation as Ge}from"../../i18n";const{width:Ne}=De.get("window"),A=Ne-56,D=110;export const PerformanceTab=()=>{const{t:C}=Ge(),r=Je(!0),[F,j]=_("overview"),[W,ke]=_("all"),[G,Ve]=_(null),Q=Y(()=>{const V=r.frameHistory;if(V.length<2)return"";const M=Math.max(40,...V),R=A/(V.length-1);let z="";return V.forEach((Z,E)=>{const O=E*R,U=D-Math.min(Z,M)/M*(D-16)-8;E===0?z+=`M ${O.toFixed(1)} ${U.toFixed(1)}`:z+=` L ${O.toFixed(1)} ${U.toFixed(1)}`}),z},[r.frameHistory]),q=Y(()=>W==="all"?r.recentJanks:r.recentJanks.filter(V=>V.severity===W),[r.recentJanks,W]),Fe=async()=>{try{B("light");const V={title:"React Native In-App Inspector Performance Diagnostic Report",algorithm:"New Relic Apdex & Datadog RUM Mobile Vitals",generatedAt:new Date().toISOString(),sessionDurationSeconds:r.sessionDurationSec,engine:r.memory.engine,displayRefreshRate:`${r.refreshRateHz}Hz`,healthScore:`${r.healthScore}/100 (${r.healthStatus})`,apdex:{score:r.apdexScore,status:r.apdexStatus,targetThresholdT:"16.6ms",satisfiedFrames:r.satisfiedCount,toleratingSlowFrames:r.toleratingCount,frustratedFrozenFrames:r.frustratedCount},percentiles:r.percentiles,datadogVitals:{slowFrames:r.toleratingCount,frozenFrames:r.frustratedCount,longTasksOver50ms:r.longTaskCount},distribution:r.distribution,metrics:{currentFps:r.fps,averageFps:r.avgFps,minimumFps:r.minFps,maximumFps:r.maxFps,currentFrameDurationMs:`${r.frameDurationMs}ms`,targetFrameDurationMs:"16.6ms",headroomRemainingMs:`${r.budgetHeadroomMs}ms`,jankFramesCount:r.jankCount,frozenFramesCount:r.frozenCount,jankRatio:`${r.jankPercent}%`,jsEventLoopLagMs:`${r.jsEventLoopLagMs}ms`,averageJsLagMs:`${r.avgJsLagMs}ms`,peakJsLagMs:`${r.peakJsLagMs}ms`},memory:{usedHeapMb:`${r.memory.usedHeapMb} MB`,totalAllocatedMb:`${r.memory.totalAllocMb} MB`,peakHeapMb:`${r.memory.peakHeapMb} MB`,gcCollections:r.memory.gcCount??"N/A",gcCpuTimeMs:r.memory.gcTimeMs??"N/A"},engineDetails:r.engineDetails,recentJankEvents:r.recentJanks},M=`## \u26A1 RN In-App Inspector Performance Report (Datadog & New Relic)
2
+ - **Health Score**: ${r.healthScore}/100 (${r.healthStatus})
3
+ - **Apdex Score**: ${r.apdexScore} (${r.apdexStatus}) [T=16.6ms]
4
+ - **Percentiles**: p50: ${r.percentiles.p50Ms}ms | p90: ${r.percentiles.p90Ms}ms | p95: ${r.percentiles.p95Ms}ms | p99: ${r.percentiles.p99Ms}ms
5
+ - **Vitals Breakdown**: ${r.satisfiedCount} Satisfied | ${r.toleratingCount} Slow | ${r.frustratedCount} Frozen | ${r.longTaskCount} Long Tasks
6
+ - **FPS**: ${r.fps} current | ${r.avgFps} avg | ${r.minFps} min | ${r.maxFps} max
7
+ - **JS Event Loop Lag**: ${r.jsEventLoopLagMs}ms (Avg: ${r.avgJsLagMs}ms, Peak: ${r.peakJsLagMs}ms)
8
+ - **Memory**: ${r.memory.usedHeapMb} MB / ${r.memory.totalAllocMb} MB (Peak: ${r.memory.peakHeapMb} MB)
9
+ - **Engine**: ${r.memory.engine}
10
+ - **Session Duration**: ${r.sessionDurationSec}s`;await Re.share({title:C("perf.title","Performance & FPS Profiler Studio"),message:`${M}
11
+
12
+ \`\`\`json
13
+ ${JSON.stringify(V,null,2)}
14
+ \`\`\``})}catch{$(C("perf.shareUnavailable","Share unavailable"))}},Me=()=>{B("light");const V=`\u26A1 Performance: ${r.healthScore}/100 (${r.healthStatus}) | Apdex: ${r.apdexScore} | ${r.fps} FPS (Avg ${r.avgFps}) | p95: ${r.percentiles.p95Ms}ms | JS Lag: ${r.jsEventLoopLagMs}ms | Datadog Vitals: ${r.satisfiedCount}S / ${r.toleratingCount}T / ${r.frustratedCount}F / ${r.longTaskCount}LT`;Ee(V,C("perf.title","Performance Summary")),$(C("perf.summaryCopied","Performance summary copied to clipboard"))},v=r.healthStatus==="EXCELLENT"?t.green600:r.healthStatus==="GOOD"?t.sky600:r.healthStatus==="FAIR"?t.amber500:t.red500,J=r.fps>=55?t.green600:r.fps>=40?t.amber500:t.red500,N=r.jsEventLoopLagMs<=4?t.green600:r.jsEventLoopLagMs<=20?t.amber500:t.red500;return<Te style={e.perfContainer}contentContainerStyle={e.perfContent}showsVerticalScrollIndicator={!1}>
15
+
16
+ <S style={e.topToolbar}>
17
+ <S style={e.engineBadgeRow}>
18
+ <S style={[e.enginePill,{backgroundColor:`${t.purple}14`,borderColor:`${t.purple}30`}]}>
19
+ <X size={12}color={t.purple}/>
20
+ <T style={[e.enginePillText,{color:t.purple}]}>
21
+ {r.memory.engine}
22
+ </T>
23
+ </S>
24
+ <S style={[e.enginePill,{backgroundColor:`${t.sky600}14`,borderColor:`${t.sky600}30`}]}>
25
+ <K size={12}color={t.sky600}/>
26
+ <T style={[e.enginePillText,{color:t.sky600}]}>
27
+ {C("perf.target60Fps","60 FPS Target")}
28
+ </T>
29
+ </S>
30
+ </S>
31
+
32
+ <S style={e.topActionsRow}>
33
+ <L onPress={()=>{B("light"),r.triggerGC(),$(C("perf.gcTriggered","Garbage collection triggered"))}}style={e.topActionBtn}accessibilityLabel={C("perf.triggerGc","GC")}>
34
+ <I size={12}color={t.amber500}/>
35
+ <T style={[e.topActionBtnText,{color:t.amber500}]}>
36
+ {C("perf.triggerGc","GC")}
37
+ </T>
38
+ </L>
39
+
40
+ <L onPress={()=>{B("light"),r.resetStats(),$(C("perf.statsReset","Performance counters reset"))}}style={e.topActionBtn}accessibilityLabel={C("perf.resetStats","Reset")}>
41
+ <Ae size={12}color={t.grayText}/>
42
+ </L>
43
+
44
+ <L onPress={Me}style={e.topActionBtn}accessibilityLabel={C("perf.copySummary","Copy")}>
45
+ <Ie size={12}color={t.grayTextStrong}/>
46
+ </L>
47
+
48
+ <L onPress={Fe}style={[e.topActionBtn,{backgroundColor:`${t.purple}14`,borderColor:`${t.purple}35`}]}accessibilityLabel={C("perf.exportReport","Export")}>
49
+ <He size={12}color={t.purple}/>
50
+ <T style={[e.topActionBtnText,{color:t.purple}]}>
51
+ {C("perf.exportReport","Export")}
52
+ </T>
53
+ </L>
54
+ </S>
55
+ </S>
56
+
57
+
58
+ <S style={e.heroScoreCard}>
59
+ <S style={e.scoreRow}>
60
+ <S style={e.scoreCircleWrapper}>
61
+ <S style={[e.scoreCircle,{borderColor:v,backgroundColor:`${v}12`}]}>
62
+ <T style={[e.scoreNumber,{color:v}]}>
63
+ {r.healthScore}
64
+ </T>
65
+ <T style={e.scoreMax}>/100</T>
66
+ </S>
67
+ </S>
68
+
69
+ <S style={e.scoreDetails}>
70
+ <S style={e.scoreHeaderRow}>
71
+ <T style={[e.scoreStatusLabel,{color:v}]}>
72
+ {r.healthStatus==="EXCELLENT"?C("perf.statusExcellent","EXCELLENT"):r.healthStatus==="GOOD"?C("perf.statusGood","GOOD"):r.healthStatus==="FAIR"?C("perf.statusFair","FAIR"):C("perf.statusPoor","POOR")}
73
+ </T>
74
+ <S style={[e.liveDotPill,{backgroundColor:`${J}18`}]}>
75
+ <S style={[e.liveDot,{backgroundColor:J}]}/>
76
+ <T style={[e.liveDotText,{color:J}]}>
77
+ {C("perf.liveApm","LIVE APM")}
78
+ </T>
79
+ </S>
80
+ </S>
81
+ <T style={e.scoreDesc}>
82
+ {r.healthScore>=88?C("perf.descExcellent","UI and JS threads are buttery smooth. Zero performance bottlenecks detected."):r.healthScore>=72?C("perf.descGood","Good performance with occasional frame drops during heavy operations."):C("perf.descPoor","Performance jank detected. JS event loop is being blocked by synchronous tasks.")}
83
+ </T>
84
+ <S style={e.sessionMetaRow}>
85
+ <T style={e.sessionDurationText}>
86
+ ⏱️ {C("perf.session","Session")}: {r.sessionDurationSec}s
87
+ </T>
88
+ <S style={[e.apdexBadge,{backgroundColor:`${v}15`}]}>
89
+ <T style={[e.apdexBadgeText,{color:v}]}>
90
+ {C("perf.apdex","Apdex")}: {r.apdexScore} ({r.apdexStatus})
91
+ </T>
92
+ </S>
93
+ </S>
94
+ </S>
95
+ </S>
96
+
97
+
98
+ <S style={e.metricGrid}>
99
+
100
+ <S style={e.metricCard}>
101
+ <S style={e.metricCardHeader}>
102
+ <K size={13}color={J}/>
103
+ <T style={e.metricCardLabel}>{C("perf.uiFps","UI FPS")}</T>
104
+ </S>
105
+ <T style={[e.metricCardValue,{color:J}]}>
106
+ {r.fps}
107
+ </T>
108
+ <T style={e.metricCardSub}>
109
+ {C("perf.avg","Avg")}: {r.avgFps} • {C("perf.min","Min")}: {r.minFps}
110
+ </T>
111
+ </S>
112
+
113
+
114
+ <S style={e.metricCard}>
115
+ <S style={e.metricCardHeader}>
116
+ <H size={13}color={t.sky600}/>
117
+ <T style={e.metricCardLabel}>{C("perf.frameTime","Frame Time")}</T>
118
+ </S>
119
+ <T style={[e.metricCardValue,{color:t.sky600}]}>
120
+ {r.frameDurationMs}
121
+ <T style={e.metricUnit}>ms</T>
122
+ </T>
123
+ <T style={e.metricCardSub}>
124
+ {C("perf.target","Target")}: 16.6ms (60fps)
125
+ </T>
126
+ </S>
127
+
128
+
129
+ <S style={e.metricCard}>
130
+ <S style={e.metricCardHeader}>
131
+ <X size={13}color={N}/>
132
+ <T style={e.metricCardLabel}>{C("perf.jsThreadLag","JS Thread Lag")}</T>
133
+ </S>
134
+ <T style={[e.metricCardValue,{color:N}]}>
135
+ {r.jsEventLoopLagMs}
136
+ <T style={e.metricUnit}>ms</T>
137
+ </T>
138
+ <T style={e.metricCardSub}>
139
+ {C("perf.peak","Peak")}: {r.peakJsLagMs}ms
140
+ </T>
141
+ </S>
142
+
143
+
144
+ <S style={e.metricCard}>
145
+ <S style={e.metricCardHeader}>
146
+ <Ce size={13}color={t.purple}/>
147
+ <T style={e.metricCardLabel}>{C("perf.jsHeap","JS Heap")}</T>
148
+ </S>
149
+ <T style={[e.metricCardValue,{color:t.purple}]}>
150
+ {r.memory.isAvailable?<>
151
+ {r.memory.usedHeapMb}
152
+ <T style={e.metricUnit}>MB</T>
153
+ </>:<T style={{fontSize:12,color:t.grayTextWeak}}>N/A</T>}
154
+ </T>
155
+ <T style={e.metricCardSub}numberOfLines={1}>
156
+ {r.memory.isAvailable?`${C("perf.peak","Peak")}: ${r.memory.peakHeapMb}MB`:C("perf.engineProtected","Engine Protected")}
157
+ </T>
158
+ </S>
159
+ </S>
160
+
161
+
162
+ <S style={e.budgetBarContainer}>
163
+ <S style={e.budgetHeaderRow}>
164
+ <T style={e.budgetLabel}>{C("perf.vsyncBudgetConsumption","16.6ms Vsync Budget Consumption")}</T>
165
+ <T style={[e.budgetPercentText,{color:r.frameDurationMs<=16.6?t.green600:t.amber500}]}>
166
+ {r.frameDurationMs}ms ({r.budgetUsedPercent}%)
167
+ </T>
168
+ </S>
169
+ <S style={e.budgetTrack}>
170
+ <S style={[e.budgetFill,{width:`${Math.min(100,r.frameDurationMs/16.6*100)}%`,backgroundColor:r.frameDurationMs<=16.6?t.green600:r.frameDurationMs<=25?t.amber500:t.red500}]}/>
171
+ </S>
172
+ <S style={e.budgetFooterRow}>
173
+ <T style={e.budgetFooterText}>
174
+ {r.budgetHeadroomMs>0?`\u26A1 +${r.budgetHeadroomMs}ms ${C("perf.budgetHeadroomAvailable","budget headroom available")}`:`\u26A0\uFE0F ${C("perf.budgetExceededBy","Budget exceeded by")} ${(r.frameDurationMs-16.6).toFixed(1)}ms`}
175
+ </T>
176
+ <T style={e.budgetTargetText}>{C("perf.budgetTarget","Budget: 16.6ms")}</T>
177
+ </S>
178
+ </S>
179
+ </S>
180
+
181
+
182
+ <Te horizontal showsHorizontalScrollIndicator={!1}contentContainerStyle={e.subTabsContent}style={e.subTabsScrollView}>
183
+ <P onPress={()=>{B("light"),j("overview")}}style={[e.subTabPill,F==="overview"&&e.subTabPillActive]}>
184
+ <K size={12}color={F==="overview"?t.purple:t.grayTextWeak}/>
185
+ <T style={[e.subTabPillText,F==="overview"&&e.subTabPillTextActive]}>
186
+ {C("perf.tabOverview","Overview & Vitals")}
187
+ </T>
188
+ </P>
189
+
190
+ <P onPress={()=>{B("light"),j("percentiles")}}style={[e.subTabPill,F==="percentiles"&&e.subTabPillActive]}>
191
+ <H size={12}color={F==="percentiles"?t.purple:t.grayTextWeak}/>
192
+ <T style={[e.subTabPillText,F==="percentiles"&&e.subTabPillTextActive]}>
193
+ {C("perf.tabPercentiles","Percentiles & Latency")}
194
+ </T>
195
+ </P>
196
+
197
+ <P onPress={()=>{B("light"),j("engine")}}style={[e.subTabPill,F==="engine"&&e.subTabPillActive]}>
198
+ <X size={12}color={F==="engine"?t.purple:t.grayTextWeak}/>
199
+ <T style={[e.subTabPillText,F==="engine"&&e.subTabPillTextActive]}>
200
+ {C("perf.tabEngine","Engine & Heap")}
201
+ </T>
202
+ </P>
203
+
204
+ <P onPress={()=>{B("light"),j("janks")}}style={[e.subTabPill,F==="janks"&&e.subTabPillActive]}>
205
+ <S style={[e.jankCountBadge,{backgroundColor:r.recentJanks.length>0?`${t.red500}25`:`${t.green600}25`}]}>
206
+ <T style={[e.jankCountBadgeText,{color:r.recentJanks.length>0?t.red500:t.green600}]}>
207
+ {r.recentJanks.length}
208
+ </T>
209
+ </S>
210
+ <T style={[e.subTabPillText,F==="janks"&&e.subTabPillTextActive]}>
211
+ {C("perf.tabJanks","Janks Log")}
212
+ </T>
213
+ </P>
214
+
215
+ <P onPress={()=>{B("light"),j("benchmark")}}style={[e.subTabPill,F==="benchmark"&&e.subTabPillActive]}>
216
+ <I size={12}color={F==="benchmark"?t.amber500:t.grayTextWeak}/>
217
+ <T style={[e.subTabPillText,F==="benchmark"&&e.subTabPillTextActive]}>
218
+ {C("perf.tabBenchmark","Stress Tests")}
219
+ </T>
220
+ </P>
221
+ </Te>
222
+
223
+
224
+ {F==="overview"&&<>
225
+
226
+ <S style={e.sectionCard}>
227
+ <S style={e.sectionHeader}>
228
+ <S style={e.sectionTitleRow}>
229
+ <H size={15}color={t.sky600}/>
230
+ <T style={e.sectionTitle}>{C("perf.distributionTitle","Frame Duration Distribution (Histogram)")}</T>
231
+ </S>
232
+ <T style={e.histogramTotalText}>
233
+ {r.distribution.totalSamples} {C("perf.framesSampled","frames sampled")}
234
+ </T>
235
+ </S>
236
+
237
+ <S style={e.histogramList}>
238
+
239
+ <S style={e.histogramRow}>
240
+ <S style={e.histogramLabelCol}>
241
+ <T style={e.histogramLabel}>≤16.6ms (60+ FPS)</T>
242
+ <T style={e.histogramSub}>{C("perf.ultraSmooth","Ultra-smooth")}</T>
243
+ </S>
244
+ <S style={e.histogramTrack}>
245
+ <S style={[e.histogramFill,{width:`${Math.min(100,r.distribution.ultraSmoothCount/Math.max(1,r.distribution.totalSamples)*100)}%`,backgroundColor:t.green600}]}/>
246
+ </S>
247
+ <T style={[e.histogramCountText,{color:t.green600}]}>
248
+ {r.distribution.ultraSmoothCount} ({Math.round(r.distribution.ultraSmoothCount/Math.max(1,r.distribution.totalSamples)*100)}%)
249
+ </T>
250
+ </S>
251
+
252
+
253
+ <S style={e.histogramRow}>
254
+ <S style={e.histogramLabelCol}>
255
+ <T style={e.histogramLabel}>16.7–24ms (40–60 FPS)</T>
256
+ <T style={e.histogramSub}>{C("perf.normalUiLayout","Normal UI Layout")}</T>
257
+ </S>
258
+ <S style={e.histogramTrack}>
259
+ <S style={[e.histogramFill,{width:`${Math.min(100,r.distribution.smoothCount/Math.max(1,r.distribution.totalSamples)*100)}%`,backgroundColor:t.sky600}]}/>
260
+ </S>
261
+ <T style={[e.histogramCountText,{color:t.sky600}]}>
262
+ {r.distribution.smoothCount} ({Math.round(r.distribution.smoothCount/Math.max(1,r.distribution.totalSamples)*100)}%)
263
+ </T>
264
+ </S>
265
+
266
+
267
+ <S style={e.histogramRow}>
268
+ <S style={e.histogramLabelCol}>
269
+ <T style={e.histogramLabel}>24.1–34ms (30–40 FPS)</T>
270
+ <T style={e.histogramSub}>{C("perf.minorVariance","Minor Variance")}</T>
271
+ </S>
272
+ <S style={e.histogramTrack}>
273
+ <S style={[e.histogramFill,{width:`${Math.min(100,r.distribution.degradedCount/Math.max(1,r.distribution.totalSamples)*100)}%`,backgroundColor:t.amber500}]}/>
274
+ </S>
275
+ <T style={[e.histogramCountText,{color:t.amber500}]}>
276
+ {r.distribution.degradedCount} ({Math.round(r.distribution.degradedCount/Math.max(1,r.distribution.totalSamples)*100)}%)
277
+ </T>
278
+ </S>
279
+
280
+
281
+ <S style={e.histogramRow}>
282
+ <S style={e.histogramLabelCol}>
283
+ <T style={e.histogramLabel}>34.1–66ms (15–30 FPS)</T>
284
+ <T style={e.histogramSub}>{C("perf.droppedFrame","Dropped Frame")}</T>
285
+ </S>
286
+ <S style={e.histogramTrack}>
287
+ <S style={[e.histogramFill,{width:`${Math.min(100,r.distribution.stutteredCount/Math.max(1,r.distribution.totalSamples)*100)}%`,backgroundColor:t.red500}]}/>
288
+ </S>
289
+ <T style={[e.histogramCountText,{color:t.red500}]}>
290
+ {r.distribution.stutteredCount} ({Math.round(r.distribution.stutteredCount/Math.max(1,r.distribution.totalSamples)*100)}%)
291
+ </T>
292
+ </S>
293
+
294
+
295
+ <S style={e.histogramRow}>
296
+ <S style={e.histogramLabelCol}>
297
+ <T style={e.histogramLabel}>&gt;66.6ms (&lt;15 FPS)</T>
298
+ <T style={e.histogramSub}>{C("perf.frozenFrame","Frozen Frame")}</T>
299
+ </S>
300
+ <S style={e.histogramTrack}>
301
+ <S style={[e.histogramFill,{width:`${Math.min(100,r.distribution.frozenCount/Math.max(1,r.distribution.totalSamples)*100)}%`,backgroundColor:"#881337"}]}/>
302
+ </S>
303
+ <T style={[e.histogramCountText,{color:"#881337"}]}>
304
+ {r.distribution.frozenCount} ({Math.round(r.distribution.frozenCount/Math.max(1,r.distribution.totalSamples)*100)}%)
305
+ </T>
306
+ </S>
307
+ </S>
308
+ </S>
309
+
310
+
311
+ <S style={e.sectionCard}>
312
+ <S style={e.sectionHeader}>
313
+ <S style={e.sectionTitleRow}>
314
+ <K size={15}color={t.purple}/>
315
+ <T style={e.sectionTitle}>{C("perf.datadogVitalsTitle","Datadog & New Relic APM Vitals")}</T>
316
+ </S>
317
+ <S style={[e.targetBadge,{backgroundColor:`${v}18`}]}>
318
+ <T style={[e.targetBadgeText,{color:v}]}>
319
+ {C("perf.apdex","Apdex")}: {r.apdexScore} ({r.apdexStatus})
320
+ </T>
321
+ </S>
322
+ </S>
323
+
324
+ <T style={e.sectionDesc}>
325
+ {C("perf.datadogVitalsDesc","Real-time Mobile APM metrics computed via official New Relic Apdex (T=16.6ms) and Datadog RUM Mobile Vitals algorithms.")}
326
+ </T>
327
+
328
+ <S style={e.datadogGrid}>
329
+ <S style={[e.datadogPill,{borderColor:`${t.green600}30`,backgroundColor:`${t.green600}10`}]}>
330
+ <T style={[e.datadogCount,{color:t.green600}]}>{r.satisfiedCount}</T>
331
+ <T style={e.datadogLabel}>{C("perf.satisfiedFrames","Satisfied (\u226416.6ms)")}</T>
332
+ </S>
333
+
334
+ <S style={[e.datadogPill,{borderColor:`${t.amber500}30`,backgroundColor:`${t.amber500}10`}]}>
335
+ <T style={[e.datadogCount,{color:t.amber500}]}>{r.toleratingCount}</T>
336
+ <T style={e.datadogLabel}>{C("perf.slowFrames","Slow Frames (17-66ms)")}</T>
337
+ </S>
338
+
339
+ <S style={[e.datadogPill,{borderColor:`${t.red500}30`,backgroundColor:`${t.red500}10`}]}>
340
+ <T style={[e.datadogCount,{color:t.red500}]}>{r.frustratedCount}</T>
341
+ <T style={e.datadogLabel}>{C("perf.frozenFrames","Frozen Frames (>66ms)")}</T>
342
+ </S>
343
+
344
+ <S style={[e.datadogPill,{borderColor:`${t.purple}30`,backgroundColor:`${t.purple}10`}]}>
345
+ <T style={[e.datadogCount,{color:t.purple}]}>{r.longTaskCount}</T>
346
+ <T style={e.datadogLabel}>{C("perf.longTasks","JS Long Tasks (>50ms)")}</T>
347
+ </S>
348
+ </S>
349
+ </S>
350
+ </>}
351
+
352
+
353
+ {F==="percentiles"&&<>
354
+
355
+ <S style={e.sectionCard}>
356
+ <S style={e.sectionHeader}>
357
+ <S style={e.sectionTitleRow}>
358
+ <H size={15}color={t.purple}/>
359
+ <T style={e.sectionTitle}>{C("perf.percentilesTitle","Latency Percentile Matrix (p50 / p90 / p95 / p99)")}</T>
360
+ </S>
361
+ <S style={e.targetBadge}>
362
+ <T style={e.targetBadgeText}>{C("perf.percentilesSubtitle","Computed from Live Frames")}</T>
363
+ </S>
364
+ </S>
365
+ <T style={e.sectionDesc}>
366
+ {C("perf.percentilesDesc","Exact mathematical distribution of frame times sampled from the active rolling window.")}
367
+ </T>
368
+
369
+ <S style={e.percentileGrid}>
370
+ <S style={e.percentileCard}>
371
+ <T style={e.percentileTag}>{C("perf.p50Label","p50 (Median)")}</T>
372
+ <T style={[e.percentileVal,{color:t.green600}]}>
373
+ {r.percentiles.p50Ms}
374
+ <T style={e.percentileUnit}>ms</T>
375
+ </T>
376
+ <T style={e.percentileSub}>{C("perf.p50Sub","50% of frames faster")}</T>
377
+ </S>
378
+
379
+ <S style={e.percentileCard}>
380
+ <T style={e.percentileTag}>{C("perf.p90Label","p90")}</T>
381
+ <T style={[e.percentileVal,{color:t.sky600}]}>
382
+ {r.percentiles.p90Ms}
383
+ <T style={e.percentileUnit}>ms</T>
384
+ </T>
385
+ <T style={e.percentileSub}>{C("perf.p90Sub","90% of frames faster")}</T>
386
+ </S>
387
+
388
+ <S style={e.percentileCard}>
389
+ <T style={e.percentileTag}>{C("perf.p95Label","p95")}</T>
390
+ <T style={[e.percentileVal,{color:r.percentiles.p95Ms<=20?t.green600:t.amber500}]}>
391
+ {r.percentiles.p95Ms}
392
+ <T style={e.percentileUnit}>ms</T>
393
+ </T>
394
+ <T style={e.percentileSub}>{C("perf.p95Sub","95% of frames faster")}</T>
395
+ </S>
396
+
397
+ <S style={e.percentileCard}>
398
+ <T style={e.percentileTag}>{C("perf.p99Label","p99 (Tail Latency)")}</T>
399
+ <T style={[e.percentileVal,{color:r.percentiles.p99Ms<=33?t.amber500:t.red500}]}>
400
+ {r.percentiles.p99Ms}
401
+ <T style={e.percentileUnit}>ms</T>
402
+ </T>
403
+ <T style={e.percentileSub}>{C("perf.p99Sub","Worst 1% outlier frames")}</T>
404
+ </S>
405
+ </S>
406
+ </S>
407
+
408
+
409
+ <S style={e.sectionCard}>
410
+ <S style={e.sectionHeader}>
411
+ <S style={e.sectionTitleRow}>
412
+ <H size={15}color={t.purple}/>
413
+ <T style={e.sectionTitle}>{C("perf.realtimeFrameTimes","Real-Time Frame Times (50 Frames)")}</T>
414
+ </S>
415
+ <S style={e.targetBadge}>
416
+ <T style={e.targetBadgeText}>{C("perf.target60FpsLabel","16.6ms Target (60fps)")}</T>
417
+ </S>
418
+ </S>
419
+
420
+ <S style={e.chartWrapper}>
421
+ <Pe width={A}height={D}style={e.chartSvg}>
422
+ <Se x1="0"y1={D-16.6/40*(D-16)-8}x2={A}y2={D-16.6/40*(D-16)-8}stroke={t.green600}strokeWidth="1"strokeDasharray="4,4"opacity={.6}/>
423
+ <Se x1="0"y1={D-33.3/40*(D-16)-8}x2={A}y2={D-33.3/40*(D-16)-8}stroke={t.red500}strokeWidth="1"strokeDasharray="3,3"opacity={.4}/>
424
+
425
+ {r.frameHistory.length>0&&r.frameHistory.map((V,M)=>{const R=Math.max(40,...r.frameHistory),z=A/Math.max(1,r.frameHistory.length),Z=Math.max(2,z-1.5),E=Math.min(V,R)/R*(D-20),O=M*z,U=D-E-4,Be=V<=18?t.green600:V<=33?t.amber500:t.red500;return<$e key={M}x={O}y={U}width={Z}height={Math.max(2,E)}rx={1}fill={Be}opacity={.75}/>})}
426
+
427
+ {Q?<Le d={Q}fill="none"stroke={t.purple}strokeWidth="2"/>:null}
428
+ </Pe>
429
+
430
+ <S style={e.chartAxisRow}>
431
+ <T style={e.chartAxisLabel}>{C("perf.past50Frames","\u2190 Past 50 Frames")}</T>
432
+ <T style={e.chartAxisLabel}>{C("perf.nowInstant","Now (Instantaneous) \u2192")}</T>
433
+ </S>
434
+ </S>
435
+
436
+ <S style={e.legendRow}>
437
+ <S style={e.legendItem}>
438
+ <S style={[e.legendDot,{backgroundColor:t.green600}]}/>
439
+ <T style={e.legendText}>{C("perf.smoothLegend","Smooth (<18ms)")}</T>
440
+ </S>
441
+ <S style={e.legendItem}>
442
+ <S style={[e.legendDot,{backgroundColor:t.amber500}]}/>
443
+ <T style={e.legendText}>{C("perf.jankLegend","Jank (18-33ms)")}</T>
444
+ </S>
445
+ <S style={e.legendItem}>
446
+ <S style={[e.legendDot,{backgroundColor:t.red500}]}/>
447
+ <T style={e.legendText}>{C("perf.frozenLegend","Frozen (>33ms)")}</T>
448
+ </S>
449
+ </S>
450
+ </S>
451
+
452
+
453
+ <S style={e.sectionCard}>
454
+ <S style={e.sectionHeader}>
455
+ <S style={e.sectionTitleRow}>
456
+ <X size={15}color={t.sky600}/>
457
+ <T style={e.sectionTitle}>{C("perf.jsResponsiveness","JS Thread Responsiveness")}</T>
458
+ </S>
459
+ <S style={[e.targetBadge,{backgroundColor:`${N}14`}]}>
460
+ <T style={[e.targetBadgeText,{color:N}]}>
461
+ {r.jsEventLoopLagMs<=2?C("perf.instantaneous","\u26A1 Instantaneous"):`${r.jsEventLoopLagMs} ${C("perf.lagUnit","ms Lag")}`}
462
+ </T>
463
+ </S>
464
+ </S>
465
+
466
+ <S style={e.lagBarsRow}>
467
+ {r.jsLagHistory.map((V,M)=>{const R=Math.min(48,Math.max(4,V*2.5)),z=V<=3?t.green600:V<=20?t.amber500:t.red500;return<S key={M}style={[e.lagBar,{height:R,backgroundColor:z}]}/>})}
468
+ </S>
469
+
470
+ <S style={e.lagInfoRow}>
471
+ <T style={e.lagInfoText}>
472
+ {C("perf.avgJsQueueLag","Average JS Queue Lag")}: <T style={e.boldText}>{r.avgJsLagMs}ms</T>
473
+ </T>
474
+ <T style={e.lagInfoText}>
475
+ {C("perf.peakLagSpike","Peak Lag Spike")}: <T style={e.boldText}>{r.peakJsLagMs}ms</T>
476
+ </T>
477
+ </S>
478
+ </S>
479
+ </>}
480
+
481
+
482
+ {F==="engine"&&<S style={e.sectionCard}>
483
+ <S style={e.sectionHeader}>
484
+ <S style={e.sectionTitleRow}>
485
+ <Ce size={15}color={t.purple}/>
486
+ <T style={e.sectionTitle}>{C("perf.engineTelemetryTitle","Engine & Runtime Telemetry")}</T>
487
+ </S>
488
+ <S style={[e.targetBadge,{backgroundColor:`${t.purple}14`}]}>
489
+ <T style={[e.targetBadgeText,{color:t.purple}]}>
490
+ {r.engineDetails.engineName}
491
+ </T>
492
+ </S>
493
+ </S>
494
+ <T style={e.sectionDesc}>
495
+ {C("perf.engineTelemetryDesc","Deep inspection of the active JavaScript Virtual Machine, memory allocations, and React Native architecture.")}
496
+ </T>
497
+
498
+ <S style={e.engineDetailsTable}>
499
+ <S style={e.engineDetailRow}>
500
+ <T style={e.engineDetailKey}>{C("perf.jsEngine","JavaScript Engine")}</T>
501
+ <T style={e.engineDetailVal}>{r.engineDetails.engineName}</T>
502
+ </S>
503
+
504
+ <S style={e.engineDetailRow}>
505
+ <T style={e.engineDetailKey}>{C("perf.architectureMode","Architecture Mode")}</T>
506
+ <S style={[e.enginePillMini,{backgroundColor:r.engineDetails.isFabric?`${t.green600}18`:`${t.sky600}18`}]}>
507
+ <T style={[e.enginePillMiniText,{color:r.engineDetails.isFabric?t.green600:t.sky600}]}>
508
+ {r.engineDetails.architectureName}
509
+ </T>
510
+ </S>
511
+ </S>
512
+
513
+ <S style={e.engineDetailRow}>
514
+ <T style={e.engineDetailKey}>{C("perf.turboModulesBridge","TurboModules Bridge")}</T>
515
+ <T style={[e.engineDetailVal,{color:r.engineDetails.isTurboModules?t.green600:t.grayTextStrong}]}>
516
+ {r.engineDetails.isTurboModules?C("perf.turboModulesEnabled","\u26A1 Enabled (JSI Direct)"):C("perf.standardBridge","Standard Bridge")}
517
+ </T>
518
+ </S>
519
+
520
+ <S style={e.engineDetailRow}>
521
+ <T style={e.engineDetailKey}>{C("perf.liveHeapSize","Live Heap Size")}</T>
522
+ <T style={e.engineDetailVal}>
523
+ {r.memory.isAvailable?`${r.memory.usedHeapMb} MB`:C("perf.engineProtected","Protected by Engine")}
524
+ </T>
525
+ </S>
526
+
527
+ <S style={e.engineDetailRow}>
528
+ <T style={e.engineDetailKey}>{C("perf.totalHeapAllocated","Total Heap Allocated")}</T>
529
+ <T style={e.engineDetailVal}>
530
+ {r.memory.isAvailable?`${r.memory.totalAllocMb} MB`:C("perf.engineProtected","Protected by Engine")}
531
+ </T>
532
+ </S>
533
+
534
+ <S style={e.engineDetailRow}>
535
+ <T style={e.engineDetailKey}>{C("perf.sessionPeakHeap","Session Peak Heap")}</T>
536
+ <T style={e.engineDetailVal}>
537
+ {r.memory.isAvailable?`${r.memory.peakHeapMb} MB`:"N/A"}
538
+ </T>
539
+ </S>
540
+
541
+ <S style={e.engineDetailRow}>
542
+ <T style={e.engineDetailKey}>{C("perf.gcCollections","GC Collections")}</T>
543
+ <T style={e.engineDetailVal}>
544
+ {r.memory.gcCount!==void 0?`${r.memory.gcCount} runs`:C("perf.nativeManaged","Native Managed")}
545
+ </T>
546
+ </S>
547
+
548
+ <S style={e.engineDetailRow}>
549
+ <T style={e.engineDetailKey}>{C("perf.gcCpuTime","GC CPU Time")}</T>
550
+ <T style={e.engineDetailVal}>
551
+ {r.memory.gcTimeMs!==void 0?`${r.memory.gcTimeMs}ms`:C("perf.nativeManaged","Native Managed")}
552
+ </T>
553
+ </S>
554
+ </S>
555
+
556
+
557
+ <L onPress={()=>{B("medium"),r.triggerGC(),$(C("perf.invokedHermesGc","Invoked Hermes GC cycle"))}}style={e.gcActionBtn}>
558
+ <I size={16}color={t.amber500}/>
559
+ <T style={e.gcActionBtnText}>{C("perf.triggerHermesGc","Trigger Hermes Garbage Collection")}</T>
560
+ </L>
561
+ </S>}
562
+
563
+
564
+ {F==="janks"&&<S style={e.sectionCard}>
565
+ <S style={e.sectionHeader}>
566
+ <S style={e.sectionTitleRow}>
567
+ <I size={15}color={t.red500}/>
568
+ <T style={e.sectionTitle}>{C("perf.jankIncidentLog","Jank & Frozen Frame Incident Log")}</T>
569
+ </S>
570
+ <T style={e.jankRatioBadge}>
571
+ {r.jankCount} {C("perf.janksCount","janks")} ({r.jankPercent}%)
572
+ </T>
573
+ </S>
574
+
575
+
576
+ <S style={e.jankFilterRow}>
577
+ {["all","moderate","severe","frozen"].map(V=><P key={V}onPress={()=>{B("light"),ke(V)}}style={[e.jankFilterChip,W===V&&e.jankFilterChipActive]}>
578
+ <T style={[e.jankFilterChipText,W===V&&e.jankFilterChipTextActive]}>
579
+ {V==="all"?C("perf.allFilter","ALL"):V==="moderate"?C("perf.moderateFilter","MODERATE"):V==="severe"?C("perf.severeFilter","SEVERE"):C("perf.frozenFilter","FROZEN")}
580
+ </T>
581
+ </P>)}
582
+ </S>
583
+
584
+ {q.length===0?<S style={e.emptyJankBox}>
585
+ <We size={22}color={t.green600}/>
586
+ <T style={e.emptyJankTitle}>{C("perf.zeroJanksDetected","Zero Janks Detected")}</T>
587
+ <T style={e.emptyJankDesc}>
588
+ {C("perf.zeroJanksDesc","All frames rendered smoothly within the target vsync budget.")}
589
+ </T>
590
+ </S>:<S style={e.janksList}>
591
+ {q.map(V=>{const M=V.severity==="frozen"?t.red500:V.severity==="severe"?t.amber500:t.sky600,R=G?.id===V.id;return<P key={V.id}onPress={()=>Ve(R?null:V)}style={[e.jankItemRow,R&&{borderColor:M}]}>
592
+ <S style={[e.jankSevBadge,{backgroundColor:`${M}18`}]}>
593
+ <T style={[e.jankSevText,{color:M}]}>
594
+ {V.severity.toUpperCase()}
595
+ </T>
596
+ </S>
597
+ <S style={e.jankDetailsCol}>
598
+ <T style={e.jankDurationText}>
599
+ {V.durationMs}ms ({V.fps} FPS)
600
+ </T>
601
+ <T style={e.jankTimeText}>{V.timeStr}</T>
602
+ </S>
603
+ <T style={e.jankTapHint}>{R?C("perf.hide","Hide"):C("perf.inspect","Inspect")}</T>
604
+ </P>})}
605
+ </S>}
606
+
607
+ {G&&<S style={e.jankInspectorBox}>
608
+ <T style={e.jankInspectorTitle}>{C("perf.incidentDiagnostics","Incident Diagnostics")}</T>
609
+ <T style={e.jankInspectorDesc}>
610
+ {C("perf.frameTime","Frame Time")}: <T style={e.boldText}>{G.durationMs}ms</T> ({C("perf.target","Target")}: 16.6ms).
611
+ {" "}{C("perf.delayedBy","Frame delayed by")} {(G.durationMs-16.6).toFixed(1)}ms {C("perf.beyondDeadline","beyond standard vsync deadline")}.
612
+ </T>
613
+ </S>}
614
+ </S>}
615
+
616
+
617
+ {F==="benchmark"&&<S style={e.sectionCard}>
618
+ <S style={e.sectionHeader}>
619
+ <S style={e.sectionTitleRow}>
620
+ <I size={15}color={t.amber500}/>
621
+ <T style={e.sectionTitle}>{C("perf.stressTitle","Interactive Stress Test & Benchmark Suite")}</T>
622
+ </S>
623
+ </S>
624
+ <T style={e.sectionDesc}>
625
+ {C("perf.stressDesc","Trigger synchronous workloads or render bursts to watch the live FPS and JS lag meters react dynamically.")}
626
+ </T>
627
+
628
+ <S style={e.stressButtonsGrid}>
629
+ <L onPress={()=>{B("medium"),r.runJsStressTest(120),$(C("perf.jsStressRan","Ran 120ms synchronous JS blocking loop"))}}style={[e.stressBtn,{backgroundColor:`${t.amber500}14`,borderColor:`${t.amber500}35`}]}>
630
+ <I size={16}color={t.amber500}/>
631
+ <S style={e.stressBtnTextBox}>
632
+ <T style={[e.stressBtnTitle,{color:t.amber500}]}>
633
+ {C("perf.jsStressTitle","JS Loop Stress (120ms)")}
634
+ </T>
635
+ <T style={e.stressBtnSub}>{C("perf.jsStressSub","Simulates heavy compute / blocking synchronous loop")}</T>
636
+ </S>
637
+ </L>
638
+
639
+ <L onPress={()=>{B("medium"),r.runRenderStressTest(),$(C("perf.renderStressRan","Fired 25 rapid re-render cycles"))}}style={[e.stressBtn,{backgroundColor:`${t.purple}14`,borderColor:`${t.purple}35`}]}>
640
+ <H size={16}color={t.purple}/>
641
+ <S style={e.stressBtnTextBox}>
642
+ <T style={[e.stressBtnTitle,{color:t.purple}]}>
643
+ {C("perf.renderStressTitle","Re-render Burst (25 frames)")}
644
+ </T>
645
+ <T style={e.stressBtnSub}>{C("perf.renderStressSub","Simulates rapid state & layout reconciliation passes")}</T>
646
+ </S>
647
+ </L>
648
+ </S>
649
+ </S>}
650
+
651
+ <S style={{height:36}}/>
652
+ </Te>};const e=ve.create({perfContainer:{flex:1,backgroundColor:t.grayBackground},perfContent:{padding:12,gap:12},topToolbar:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingBottom:4},engineBadgeRow:{flexDirection:"row",alignItems:"center",gap:6,flexShrink:1},enginePill:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:7,paddingVertical:3.5,borderRadius:6,borderWidth:1},enginePillText:{fontFamily:k.interSemiBold,fontSize:10},topActionsRow:{flexDirection:"row",alignItems:"center",gap:6},topActionBtn:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:8,paddingVertical:5,borderRadius:6,borderWidth:1,borderColor:t.grayBorderSecondary,backgroundColor:t.grayBackground},topActionBtnText:{fontFamily:k.interSemiBold,fontSize:10,color:t.grayTextStrong},heroScoreCard:{backgroundColor:t.white,borderRadius:12,padding:14,borderWidth:1,borderColor:t.grayBorderSecondary,gap:12},scoreRow:{flexDirection:"row",alignItems:"center",gap:14},scoreCircleWrapper:{alignItems:"center",justifyContent:"center"},scoreCircle:{width:64,height:64,borderRadius:32,borderWidth:3,alignItems:"center",justifyContent:"center"},scoreNumber:{fontFamily:k.interBold,fontSize:22,lineHeight:24},scoreMax:{fontFamily:k.interMedium,fontSize:8.5,color:t.grayTextWeak},scoreDetails:{flex:1,gap:3},scoreHeaderRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},scoreStatusLabel:{fontFamily:k.interBold,fontSize:15,letterSpacing:.5},liveDotPill:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:6,paddingVertical:2,borderRadius:8},liveDot:{width:6,height:6,borderRadius:3},liveDotText:{fontFamily:k.interBold,fontSize:8.5},scoreDesc:{fontFamily:k.interRegular,fontSize:11,color:t.grayTextWeak,lineHeight:15},sessionMetaRow:{flexDirection:"row",alignItems:"center",gap:8,marginTop:2},sessionDurationText:{fontFamily:k.interMedium,fontSize:10,color:t.grayTextWeak},apdexBadge:{paddingHorizontal:6,paddingVertical:1.5,borderRadius:4},apdexBadgeText:{fontFamily:k.interBold,fontSize:9},metricGrid:{flexDirection:"row",gap:6},metricCard:{flex:1,backgroundColor:t.grayBackground,borderRadius:8,padding:8,borderWidth:1,borderColor:t.grayBorderSecondary,gap:2},metricCardHeader:{flexDirection:"row",alignItems:"center",gap:3},metricCardLabel:{fontFamily:k.interMedium,fontSize:9.5,color:t.grayTextWeak},metricCardValue:{fontFamily:k.interBold,fontSize:16,lineHeight:18},metricUnit:{fontSize:10,fontFamily:k.interMedium,color:t.grayTextWeak},metricCardSub:{fontFamily:k.interRegular,fontSize:8.5,color:t.grayTextWeak},budgetBarContainer:{gap:4,backgroundColor:t.grayBackground,borderRadius:8,padding:9,borderWidth:1,borderColor:t.grayBorderSecondary},budgetHeaderRow:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},budgetLabel:{fontFamily:k.interMedium,fontSize:10,color:t.grayTextStrong},budgetPercentText:{fontFamily:k.interBold,fontSize:10},budgetTrack:{height:6,backgroundColor:t.grayBorderSecondary,borderRadius:3,overflow:"hidden"},budgetFill:{height:"100%",borderRadius:3},budgetFooterRow:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},budgetFooterText:{fontFamily:k.interRegular,fontSize:9,color:t.grayTextWeak},budgetTargetText:{fontFamily:k.interMedium,fontSize:9,color:t.grayTextWeak},subTabsScrollView:{flexGrow:0},subTabsContent:{gap:6,paddingVertical:2},subTabPill:{flexDirection:"row",alignItems:"center",gap:5,paddingHorizontal:10,paddingVertical:6,borderRadius:8,borderWidth:1,borderColor:t.grayBorderSecondary,backgroundColor:t.white},subTabPillActive:{borderColor:`${t.purple}60`,backgroundColor:`${t.purple}14`},subTabPillText:{fontFamily:k.interMedium,fontSize:11,color:t.grayTextWeak},subTabPillTextActive:{fontFamily:k.interBold,color:t.purple},jankCountBadge:{paddingHorizontal:4,paddingVertical:1,borderRadius:4},jankCountBadgeText:{fontFamily:k.interBold,fontSize:8.5},sectionCard:{backgroundColor:t.white,borderRadius:12,padding:14,borderWidth:1,borderColor:t.grayBorderSecondary,gap:10},sectionHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},sectionTitleRow:{flexDirection:"row",alignItems:"center",gap:6,flex:1},sectionTitle:{fontFamily:k.interBold,fontSize:12.5,color:t.grayTextStrong},sectionDesc:{fontFamily:k.interRegular,fontSize:10.5,color:t.grayTextWeak,lineHeight:14},targetBadge:{backgroundColor:`${t.green600}14`,paddingHorizontal:6,paddingVertical:2,borderRadius:4},targetBadgeText:{fontFamily:k.interBold,fontSize:9,color:t.green600},datadogGrid:{flexDirection:"row",flexWrap:"wrap",gap:8,marginTop:2},datadogPill:{flexBasis:"48%",flexGrow:1,paddingVertical:8,paddingHorizontal:10,borderRadius:8,borderWidth:1,gap:2},datadogCount:{fontFamily:k.interBold,fontSize:16},datadogLabel:{fontFamily:k.interRegular,fontSize:9.5,color:t.grayTextWeak},histogramTotalText:{fontFamily:k.interMedium,fontSize:9.5,color:t.grayTextWeak},histogramList:{gap:8},histogramRow:{flexDirection:"row",alignItems:"center",gap:8},histogramLabelCol:{width:110},histogramLabel:{fontFamily:k.interBold,fontSize:9.5,color:t.grayTextStrong},histogramSub:{fontFamily:k.interRegular,fontSize:8.5,color:t.grayTextWeak},histogramTrack:{flex:1,height:6,backgroundColor:t.grayBackground,borderRadius:3,overflow:"hidden"},histogramFill:{height:"100%",borderRadius:3},histogramCountText:{width:65,textAlign:"right",fontFamily:k.interBold,fontSize:9.5},percentileGrid:{flexDirection:"row",flexWrap:"wrap",gap:8},percentileCard:{flexBasis:"48%",flexGrow:1,backgroundColor:t.grayBackground,borderRadius:8,padding:10,borderWidth:1,borderColor:t.grayBorderSecondary,gap:2},percentileTag:{fontFamily:k.interSemiBold,fontSize:10,color:t.grayTextWeak},percentileVal:{fontFamily:k.interBold,fontSize:18},percentileUnit:{fontSize:11,fontFamily:k.interMedium,color:t.grayTextWeak},percentileSub:{fontFamily:k.interRegular,fontSize:9,color:t.grayTextWeak},chartWrapper:{backgroundColor:t.grayBackground,borderRadius:8,paddingVertical:6,borderWidth:1,borderColor:t.grayBorderSecondary,alignItems:"center"},chartSvg:{alignSelf:"center"},chartAxisRow:{flexDirection:"row",justifyContent:"space-between",width:A,paddingTop:4},chartAxisLabel:{fontFamily:k.interRegular,fontSize:9,color:t.grayTextWeak},legendRow:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:14,paddingTop:2},legendItem:{flexDirection:"row",alignItems:"center",gap:4},legendDot:{width:7,height:7,borderRadius:3.5},legendText:{fontFamily:k.interMedium,fontSize:10,color:t.grayTextWeak},lagBarsRow:{flexDirection:"row",alignItems:"flex-end",justifyContent:"space-between",height:52,backgroundColor:t.grayBackground,borderRadius:8,padding:6,borderWidth:1,borderColor:t.grayBorderSecondary},lagBar:{flex:1,marginHorizontal:1,borderRadius:2},lagInfoRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},lagInfoText:{fontFamily:k.interRegular,fontSize:10.5,color:t.grayTextWeak},boldText:{fontFamily:k.interBold,color:t.grayTextStrong},engineDetailsTable:{gap:8},engineDetailRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingVertical:5,borderBottomWidth:1,borderBottomColor:t.grayBorderSecondary},engineDetailKey:{fontFamily:k.interMedium,fontSize:11,color:t.grayTextWeak},engineDetailVal:{fontFamily:k.interBold,fontSize:11,color:t.grayTextStrong},enginePillMini:{paddingHorizontal:6,paddingVertical:2,borderRadius:4},enginePillMiniText:{fontFamily:k.interBold,fontSize:9.5},gcActionBtn:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:6,backgroundColor:`${t.amber500}15`,borderRadius:8,paddingVertical:10,borderWidth:1,borderColor:`${t.amber500}35`,marginTop:4},gcActionBtnText:{fontFamily:k.interBold,fontSize:11,color:t.amber500},jankFilterRow:{flexDirection:"row",gap:6},jankFilterChip:{paddingHorizontal:8,paddingVertical:3,borderRadius:6,borderWidth:1,borderColor:t.grayBorderSecondary,backgroundColor:t.grayBackground},jankFilterChipActive:{borderColor:t.purple,backgroundColor:`${t.purple}15`},jankFilterChipText:{fontFamily:k.interMedium,fontSize:9.5,color:t.grayTextWeak},jankFilterChipTextActive:{fontFamily:k.interBold,color:t.purple},emptyJankBox:{alignItems:"center",justifyContent:"center",paddingVertical:18,gap:4,backgroundColor:t.grayBackground,borderRadius:8,borderWidth:1,borderColor:t.grayBorderSecondary},emptyJankTitle:{fontFamily:k.interBold,fontSize:12,color:t.green600},emptyJankDesc:{fontFamily:k.interRegular,fontSize:10.5,color:t.grayTextWeak},janksList:{gap:6},jankItemRow:{flexDirection:"row",alignItems:"center",gap:8,backgroundColor:t.grayBackground,borderRadius:6,padding:7,borderWidth:1,borderColor:t.grayBorderSecondary},jankSevBadge:{paddingHorizontal:5,paddingVertical:2,borderRadius:4},jankSevText:{fontFamily:k.interBold,fontSize:8.5},jankDetailsCol:{flex:1},jankDurationText:{fontFamily:k.interBold,fontSize:11,color:t.grayTextStrong},jankTimeText:{fontFamily:k.interRegular,fontSize:9,color:t.grayTextWeak},jankTapHint:{fontFamily:k.interMedium,fontSize:10,color:t.purple},jankInspectorBox:{backgroundColor:t.grayBackground,borderRadius:8,padding:10,borderWidth:1,borderColor:t.grayBorderSecondary,gap:4},jankInspectorTitle:{fontFamily:k.interBold,fontSize:11,color:t.grayTextStrong},jankInspectorDesc:{fontFamily:k.interRegular,fontSize:10.5,color:t.grayTextWeak,lineHeight:14},stressButtonsGrid:{gap:8},stressBtn:{flexDirection:"row",alignItems:"center",gap:10,padding:10,borderRadius:8,borderWidth:1},stressBtnTextBox:{flex:1,gap:2},stressBtnTitle:{fontFamily:k.interBold,fontSize:11.5},stressBtnSub:{fontFamily:k.interRegular,fontSize:10,color:t.grayTextWeak},jankRatioBadge:{fontFamily:k.interMedium,fontSize:10,color:t.grayTextWeak}});