Skip to content

Commit 27b089d

Browse files
committed
remove unused variables
1 parent 9bd1ecc commit 27b089d

File tree

4 files changed

+14
-34
lines changed

4 files changed

+14
-34
lines changed

frontend/packages/insights/src/App.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import './App.css';
2-
import React, {useEffect, useState} from "react";
2+
import React, {useState} from "react";
33
import 'bootstrap/dist/css/bootstrap.min.css';
4-
import {Button, Col, Container, Form, Modal, Navbar, Row, Tab, Tabs} from 'react-bootstrap';
4+
import {Col, Container, Form, Modal, Navbar, Row} from 'react-bootstrap';
55
import {TraceOnlyView} from "./TraceOnlyView";
66
import {ProfilingView} from "./ProfilingView";
77
import {DebuggingView} from "./DebuggingView";

frontend/packages/insights/src/DebuggingView.js

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,18 @@ import {
1010
Form,
1111
Nav,
1212
Navbar,
13-
Row,
14-
Tab,
15-
Tabs
13+
Row
1614
} from 'react-bootstrap';
1715
import {MLIRViewer} from "@lingodb/common/MLIRViewer";
1816
import {RelationalPlanViewer} from "@lingodb/common/RelationalPlanViewer";
19-
import {TraceViewer} from "@lingodb/common/TraceViewer";
2017
import {
2118
analyzeLayers,
22-
collectChildren, collectChildrenWithData,
19+
collectChildrenWithData,
2320
getBaseReference,
2421
goDown,
2522
goDownDirect,
26-
goUp, goUpDirect, opSameExceptLoc, opSameExceptLocAndChildren
23+
goUp, goUpDirect, opSameExceptLocAndChildren
2724
} from "@lingodb/common/MLIRLayerAnalysis";
28-
import {SubOpPlanViewer} from "@lingodb/common/SubOpPlanViewer";
29-
import {PerfSymbolTable} from "./PerfSymbolTable";
30-
import {PerfAsmViewer} from "./PerfAsmViewer";
3125
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
3226
import { dracula } from 'react-syntax-highlighter/dist/esm/styles/prism';
3327
export const DebuggingView = ({data, onClose}) => {
@@ -166,7 +160,7 @@ export const DebuggingView = ({data, onClose}) => {
166160
}
167161
})
168162
}
169-
}, [selectedOp, selectedLayer, leftDiffIndex, rightDiffIndex])
163+
}, [data,layerInfo, selectedOp, selectedLayer, leftDiffIndex, rightDiffIndex])
170164

171165
useEffect(() => {
172166
if (selectedOp && selectedLayer) {
@@ -182,7 +176,7 @@ export const DebuggingView = ({data, onClose}) => {
182176
}
183177
})
184178
}
185-
}, [selectedOp, selectedLayer])
179+
}, [data, layerInfo,relalgMLIRData, selectedOp, selectedLayer])
186180
const selectError = (index) => {
187181
console.log("select", index)
188182
let file= data.errors[index][0][0]
@@ -243,8 +237,7 @@ export const DebuggingView = ({data, onClose}) => {
243237
}
244238
</DropdownButton>
245239
<DropdownButton as={ButtonGroup} id="dropdown-basic-button" title={"File"} onSelect={selectFile}>
246-
{data.layers.map((l, index) => {
247-
if(l.index>0)
240+
{data.layers.filter((l)=>l.index>0).map((l, index) => {
248241
return <Dropdown.Item eventKey={l.index}>{l.passInfo.file}</Dropdown.Item>
249242
})
250243
}

frontend/packages/insights/src/ProfilingView.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ import {RelationalPlanViewer} from "@lingodb/common/RelationalPlanViewer";
66
import {TraceViewer} from "@lingodb/common/TraceViewer";
77
import {
88
analyzeLayers,
9-
collectChildren, collectChildrenWithData,
9+
collectChildrenWithData,
1010
getBaseReference,
1111
goDown,
1212
goDownDirect,
13-
goUp, goUpDirect, opSameExceptLoc, opSameExceptLocAndChildren
13+
goUp, goUpDirect, opSameExceptLocAndChildren
1414
} from "@lingodb/common/MLIRLayerAnalysis";
1515
import {SubOpPlanViewer} from "@lingodb/common/SubOpPlanViewer";
1616
import {PerfSymbolTable} from "./PerfSymbolTable";
@@ -208,7 +208,7 @@ export const ProfilingView = ({data, onClose}) => {
208208
}
209209
})
210210
}
211-
}, [selectedOp, selectedLayer])
211+
}, [data, layerInfo,relalgMLIRData,subopMLIRData,imperativeMLIRData,llvmMLIRData, selectedOp, selectedLayer])
212212
useEffect(() => {
213213
if (selectedOp && selectedLayer) {
214214
const displayedLayers = [{idx: leftDiffIndex, fn: setSelectedLeftOps}, {
@@ -226,7 +226,7 @@ export const ProfilingView = ({data, onClose}) => {
226226
}
227227
})
228228
}
229-
}, [selectedOp, selectedLayer, leftDiffIndex, rightDiffIndex])
229+
}, [data, layerInfo, selectedOp, selectedLayer, leftDiffIndex, rightDiffIndex])
230230
const handleSubOpSelection = (op) => {
231231
setSelectedOp(op)
232232
setSelectedLayer(subopMLIRData.index)

frontend/packages/insights/src/TraceOnlyView.js

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,7 @@
1-
import React, {useEffect, useState} from "react";
21
import 'bootstrap/dist/css/bootstrap.min.css';
3-
import {Button, CloseButton, Col, Container, Form, Nav, Navbar, Row, Tab, Tabs} from 'react-bootstrap';
4-
import {MLIRViewer} from "@lingodb/common/MLIRViewer";
5-
import {RelationalPlanViewer} from "@lingodb/common/RelationalPlanViewer";
2+
import {CloseButton, Col, Container, Form, Nav, Navbar, Row} from 'react-bootstrap';
63
import {TraceViewer} from "@lingodb/common/TraceViewer";
7-
import {
8-
analyzeLayers,
9-
collectChildren, collectChildrenWithData,
10-
getBaseReference,
11-
goDown,
12-
goDownDirect,
13-
goUp, goUpDirect, opSameExceptLoc, opSameExceptLocAndChildren
14-
} from "@lingodb/common/MLIRLayerAnalysis";
15-
import {SubOpPlanViewer} from "@lingodb/common/SubOpPlanViewer";
16-
import {PerfSymbolTable} from "./PerfSymbolTable";
17-
import {PerfAsmViewer} from "./PerfAsmViewer";
4+
185

196
export const TraceOnlyView = ({data, onClose}) => {
207

0 commit comments

Comments
 (0)