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:
committed by
Facebook GitHub Bot
parent
2b17ac76de
commit
c067346870
@@ -12,6 +12,7 @@ import {
|
|||||||
DynamicPerformanceStatsEvent,
|
DynamicPerformanceStatsEvent,
|
||||||
UIState,
|
UIState,
|
||||||
Id,
|
Id,
|
||||||
|
UINode,
|
||||||
} from '../types';
|
} from '../types';
|
||||||
import React, {useMemo} from 'react';
|
import React, {useMemo} from 'react';
|
||||||
import {
|
import {
|
||||||
@@ -25,6 +26,7 @@ import {
|
|||||||
|
|
||||||
export function PerfStats(props: {
|
export function PerfStats(props: {
|
||||||
uiState: UIState;
|
uiState: UIState;
|
||||||
|
nodes: Map<Id, UINode>;
|
||||||
rootId?: Id;
|
rootId?: Id;
|
||||||
events: DataSource<DynamicPerformanceStatsEvent, number>;
|
events: DataSource<DynamicPerformanceStatsEvent, number>;
|
||||||
}) {
|
}) {
|
||||||
@@ -68,6 +70,8 @@ export function PerfStats(props: {
|
|||||||
data={{
|
data={{
|
||||||
...Object.fromEntries(uiStateValues),
|
...Object.fromEntries(uiStateValues),
|
||||||
rootId: props.rootId,
|
rootId: props.rootId,
|
||||||
|
nodesCount: props.nodes.size,
|
||||||
|
rootNode: props.nodes.get(props.rootId ?? 'noroot'),
|
||||||
}}></DataInspector>
|
}}></DataInspector>
|
||||||
</DetailSidebar>
|
</DetailSidebar>
|
||||||
</Layout.Container>
|
</Layout.Container>
|
||||||
|
|||||||
@@ -50,6 +50,16 @@ export function Component() {
|
|||||||
setBottomPanelComponent(undefined);
|
setBottomPanelComponent(undefined);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (showPerfStats)
|
||||||
|
return (
|
||||||
|
<PerfStats
|
||||||
|
uiState={instance.uiState}
|
||||||
|
rootId={rootId}
|
||||||
|
nodes={nodes}
|
||||||
|
events={instance.perfEvents}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
|
||||||
if (streamState.state === 'FatalError') {
|
if (streamState.state === 'FatalError') {
|
||||||
return (
|
return (
|
||||||
<StreamInterceptorErrorView
|
<StreamInterceptorErrorView
|
||||||
@@ -78,15 +88,6 @@ export function Component() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (showPerfStats)
|
|
||||||
return (
|
|
||||||
<PerfStats
|
|
||||||
uiState={instance.uiState}
|
|
||||||
rootId={rootId}
|
|
||||||
events={instance.perfEvents}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
|
|
||||||
if (rootId == null || streamState.state === 'RetryingAfterError') {
|
if (rootId == null || streamState.state === 'RetryingAfterError') {
|
||||||
return (
|
return (
|
||||||
<Centered>
|
<Centered>
|
||||||
|
|||||||
Reference in New Issue
Block a user