Add more diagnostics

Summary: node count and root node prescense will be very useful

Reviewed By: lblasa

Differential Revision: D47153394

fbshipit-source-id: 067f6f3aefa17cdfa88124956781400f53fe08d7
This commit is contained in:
Luke De Feo
2023-06-30 08:17:46 -07:00
committed by Facebook GitHub Bot
parent 2b17ac76de
commit c067346870
2 changed files with 14 additions and 9 deletions

View File

@@ -12,6 +12,7 @@ import {
DynamicPerformanceStatsEvent,
UIState,
Id,
UINode,
} from '../types';
import React, {useMemo} from 'react';
import {
@@ -25,6 +26,7 @@ import {
export function PerfStats(props: {
uiState: UIState;
nodes: Map<Id, UINode>;
rootId?: Id;
events: DataSource<DynamicPerformanceStatsEvent, number>;
}) {
@@ -68,6 +70,8 @@ export function PerfStats(props: {
data={{
...Object.fromEntries(uiStateValues),
rootId: props.rootId,
nodesCount: props.nodes.size,
rootNode: props.nodes.get(props.rootId ?? 'noroot'),
}}></DataInspector>
</DetailSidebar>
</Layout.Container>