Skip to content

Commit

Permalink
Add total events and snapshot size to perf stats
Browse files Browse the repository at this point in the history
Summary: this will help us understand why ios payloads as so huge

Reviewed By: lblasa

Differential Revision: D53270743

fbshipit-source-id: ad112bf945e5ab804234b26aa8c55ec3913acad7
  • Loading branch information
Luke De Feo authored and facebook-github-bot committed Jan 31, 2024
1 parent 3119401 commit 5678a00
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions desktop/plugins/public/ui-debugger/ClientTypes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ export type PerformanceStatsEvent = {
serializationMS: number;
socketMS: number;
payloadSize?: number;
snapshotSize?: number;
frameworkEventsCount?: number;
};

export type DynamicPerformanceStatsEvent = PerformanceStatsEvent & {
Expand Down
14 changes: 14 additions & 0 deletions desktop/plugins/public/ui-debugger/components/PerfStats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ const columns: DataTableColumn<DynamicPerformanceStatsEvent>[] = [
key: 'nodesCount',
title: 'Total nodes',
},
{
key: 'frameworkEventsCount',
title: 'Total events',
},
{
key: 'start',
title: 'Start',
Expand Down Expand Up @@ -169,5 +173,15 @@ const columns: DataTableColumn<DynamicPerformanceStatsEvent>[] = [
return formatSize(row.payloadSize);
},
},
{
key: 'snapshotSize',
title: 'Snapshot Size (KB)',
onRender: (row: PerformanceStatsEvent) => {
if (!row.snapshotSize) {
return 'NaN';
}
return formatSize(row.snapshotSize);
},
},
];
const knownKeys = new Set(columns.map((column) => column.key));

0 comments on commit 5678a00

Please sign in to comment.