Skip to content

Commit 90cf0fb

Browse files
(verified) allComponentRtids retrieves data
1 parent 64476e0 commit 90cf0fb

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/app/components/PerformanceVisx.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { useTooltip, useTooltipInPortal, defaultStyles } from '@visx/tooltip';
99
import { Text } from '@visx/text';
1010
import { schemeSet3 } from 'd3-scale-chromatic';
1111
import snapshots from './snapshots';
12+
import { onHover, onHoverExit } from '../actions/actions'
1213

1314
/* NOTES
1415
Issue - Not fully compatible with recoil apps. Reference the recoil-todo-test.
@@ -112,6 +113,7 @@ const PerformanceVisx = (props: BarStackProps) => {
112113
const { width, height, snapshots, hierarchy } = props;
113114

114115
console.log('snapshots', snapshots);
116+
console.log('hierarchy', hierarchy)
115117

116118
const {
117119
tooltipOpen, tooltipLeft, tooltipTop, tooltipData, hideTooltip, showTooltip,
@@ -124,8 +126,12 @@ const PerformanceVisx = (props: BarStackProps) => {
124126
// filter and structure incoming data for VISX
125127
const data = getPerfMetrics(snapshots, getSnapshotIds(hierarchy));
126128
const keys = Object.keys(data[0]).filter(d => d !== 'snapshotId');
127-
const allComponentStates = traverse(snapshots[-1], 'getComponentType');
128-
const allComponentRtids = traverse(snapshots[-1], 'getRtids');
129+
const allComponentStates = traverse(snapshots[0], 'getComponentType');
130+
const allComponentRtids = traverse(snapshots[snapshots.length-1], 'getRtid');
131+
132+
console.log('data', data)
133+
console.log('allComponentState', allComponentStates)
134+
console.log('allComponentRtids', allComponentRtids)
129135

130136
// create array of total render times for each snapshot
131137
const totalRenderArr = data.reduce((totalRender, curSnapshot) => {

0 commit comments

Comments
 (0)