Skip to content

Commit 59c5b23

Browse files
Merge branch 'staging' into master
2 parents e77a8e0 + ae91b39 commit 59c5b23

File tree

7 files changed

+608
-19
lines changed

7 files changed

+608
-19
lines changed

package-lock.json

Lines changed: 137 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,16 @@
106106
"webpack-cli": "^3.3.12"
107107
},
108108
"dependencies": {
109-
"@visx/glyph": "^1.0.0",
110-
"@visx/gradient": "^1.0.0",
111-
"@visx/group": "^1.0.0",
112-
"@visx/hierarchy": "^1.0.0",
109+
"@visx/axis": "^1.0.0",
110+
"@visx/grid": "^1.0.0",
113111
"@visx/legend": "^1.0.0",
114112
"@visx/responsive": "^1.0.0",
115113
"@visx/scale": "^1.0.0",
114+
"@visx/tooltip": "^1.0.0",
115+
"@visx/gradient": "^1.0.0",
116+
"@visx/group": "^1.0.0",
117+
"@visx/hierarchy": "^1.0.0",
118+
"@visx/glyph": "^1.0.0",
116119
"@visx/shape": "^1.0.0",
117120
"acorn": "^7.3.1",
118121
"acorn-jsx": "^5.2.0",

src/app/components/PerfView.tsx

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,30 @@ interface PerfViewProps {
3131
}
3232

3333
const PerfView = (props: PerfViewProps) => {
34+
35+
// ------------- CIRCLES ----------------------
3436
const { viewIndex, width, height, setNoRenderData } = props;
3537
let { snapshots } = props;
3638
const adjustedSize = Math.min(width, height);
3739
const svgRef = useRef(null);
40+
41+
console.log(snapshots)
42+
43+
// const performances = []
44+
// snapshot = {
45+
// component1: 10,
46+
// component2: 24,
47+
// component3: 35,
48+
// others: 32
49+
// }
50+
51+
const performances = snapshots.reduce((acc,cur)=>{
52+
const snapshot = {};
53+
while (snapshot.keys.lenght
54+
}, []
55+
// iterate snapshots array
56+
// if i.children exists
57+
//
3858

3959
let indexToDisplay: number | null = null;
4060
if (viewIndex < 0) indexToDisplay = snapshots.length - 1;
@@ -85,7 +105,7 @@ const PerfView = (props: PerfViewProps) => {
85105
}, [indexToDisplay, svgRef]);
86106

87107
useEffect(() => {
88-
// Error, no App-level component present
108+
// Error, no App-level component presentnpm r
89109
if (snapshots[indexToDisplay].children.length < 1) return;
90110

91111
// Generate tree with our data
@@ -228,6 +248,9 @@ const PerfView = (props: PerfViewProps) => {
228248
handleNoRenderData,
229249
]);
230250

251+
// ------------- CIRCLES ----------------------
252+
253+
231254
return (
232255
<div className="perf-d3-container">
233256
<svg className="perf-d3-svg" ref={svgRef} />

0 commit comments

Comments
 (0)