From d30e726fc25556336c5d4f941a5b9fe5136afff5 Mon Sep 17 00:00:00 2001 From: "wupoli3@huawei.com" Date: Thu, 19 Oct 2023 11:08:25 +0800 Subject: [PATCH 1/4] =?UTF-8?q?eventTypeID=20=E7=81=AB=E7=84=B0=E5=9B=BE?= =?UTF-8?q?=E9=87=8D=E7=BB=98=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wupoli3@huawei.com --- ide/src/trace/bean/BoxSelection.ts | 1 + .../component/trace/sheet/TabPaneFilter.ts | 2 +- .../trace/sheet/hiperf/TabPerfProfile.ts | 48 ++++++------------- 3 files changed, 17 insertions(+), 34 deletions(-) diff --git a/ide/src/trace/bean/BoxSelection.ts b/ide/src/trace/bean/BoxSelection.ts index 0e18d1c56..701d1b7dc 100644 --- a/ide/src/trace/bean/BoxSelection.ts +++ b/ide/src/trace/bean/BoxSelection.ts @@ -40,6 +40,7 @@ export class SelectionParam { isCurrentPane: boolean = false; startup: boolean = false; staticInit: boolean = false; + eventTypeId: string = ''; cpus: Array = []; cpuStateFilterIds: Array = []; diff --git a/ide/src/trace/component/trace/sheet/TabPaneFilter.ts b/ide/src/trace/component/trace/sheet/TabPaneFilter.ts index 3dda102f6..24f94022b 100644 --- a/ide/src/trace/component/trace/sheet/TabPaneFilter.ts +++ b/ide/src/trace/component/trace/sheet/TabPaneFilter.ts @@ -452,7 +452,7 @@ export class TabPaneFilter extends BaseElement { radioList![idx].checked = true; if(this.getCallTransfer) { this.getCallTransfer({ - value: radioList![idx].value + eventTypeId: radioList![idx].value }) } }) diff --git a/ide/src/trace/component/trace/sheet/hiperf/TabPerfProfile.ts b/ide/src/trace/component/trace/sheet/hiperf/TabPerfProfile.ts index d2bd34852..e9b57656e 100644 --- a/ide/src/trace/component/trace/sheet/hiperf/TabPerfProfile.ts +++ b/ide/src/trace/component/trace/sheet/hiperf/TabPerfProfile.ts @@ -75,6 +75,14 @@ export class TabpanePerfProfile extends BaseElement { this.perfProfilerFilter!.refreshTreeTransfer(); this.perfProfileProgressEL!.loading = true; this.perfProfileLoadingPage.style.visibility = 'visible'; + this.getDataByWorkAndUpDateCanvas(perfProfilerSelection) + this.perfProfilerFilter!.getCallTransferData((data: {eventTypeId: string}) => { + perfProfilerSelection.eventTypeId = data.eventTypeId !== 'count' ? data.eventTypeId : ''; + this.getDataByWorkAndUpDateCanvas(perfProfilerSelection) + }) + } + + getDataByWorkAndUpDateCanvas(perfProfilerSelection: SelectionParam) { const initWidth = this.clientWidth; this.getDataByWorker( [ @@ -90,44 +98,18 @@ export class TabpanePerfProfile extends BaseElement { (results: any[]) => { this.setPerfProfilerLeftTableData(results); this.perfProfilerList!.recycleDataSource = []; - this.perfProfileFrameChart!.mode = ChartMode.Count; + if(perfProfilerSelection.eventTypeId && perfProfilerSelection.eventTypeId !== 'count') { + this.perfProfileFrameChart!.mode = ChartMode.EventCount; + }else{ + this.perfProfileFrameChart!.mode = ChartMode.Count; + } + this.perfProfileFrameChart?.updateCanvas(true, initWidth); this.perfProfileFrameChart!.data = this.perfProfilerDataSource; this.currentPerfProfilerDataSource = this.perfProfilerDataSource; this.switchFlameChart(); this.perfProfilerFilter.icon = 'block'; - } - ); - - this.perfProfilerFilter!.getCallTransferData((data: any) => { - perfProfilerSelection.eventTypeId = data.value !== 'count' ? data.value : undefined; - this.getDataByWorker( - [ - { - funcName: 'setSearchValue', - funcArgs: [''], - }, - { - funcName: 'getCurrentDataFromDb', - funcArgs: [perfProfilerSelection], - }, - ], - (results: any[]) => { - this.setPerfProfilerLeftTableData(results); - this.perfProfilerList!.recycleDataSource = []; - if(data.value !== 'count') { - this.perfProfileFrameChart!.mode = ChartMode.EventCount; - }else{ - this.perfProfileFrameChart!.mode = ChartMode.Count; - } - - this.perfProfileFrameChart?.updateCanvas(true, initWidth); - this.perfProfileFrameChart!.data = this.perfProfilerDataSource; - this.currentPerfProfilerDataSource = this.perfProfilerDataSource; - this.switchFlameChart(); - this.perfProfilerFilter.icon = 'block'; - }) - }) + }) } getParentTree( -- Gitee From a1ab3150d958ec11c9b5ad7fc7be28c87e000edb Mon Sep 17 00:00:00 2001 From: "wupoli3@huawei.com" Date: Thu, 19 Oct 2023 11:12:27 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=86=B2=E7=AA=81?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wupoli3@huawei.com --- ide/src/trace/bean/BoxSelection.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/ide/src/trace/bean/BoxSelection.ts b/ide/src/trace/bean/BoxSelection.ts index 61d5efba7..97df6ce2c 100644 --- a/ide/src/trace/bean/BoxSelection.ts +++ b/ide/src/trace/bean/BoxSelection.ts @@ -40,12 +40,9 @@ export class SelectionParam { isCurrentPane: boolean = false; startup: boolean = false; staticInit: boolean = false; -<<<<<<< HEAD eventTypeId: string = ''; -======= ->>>>>>> 34b7181feb203cb32a2fce86334b28f0f3894c25 cpus: Array = []; cpuStateRowsId: Array = []; //新增框选cpu freq row名 -- Gitee From 63bf23376b455100dfd3604aa33e04e57bab227e Mon Sep 17 00:00:00 2001 From: "wupoli3@huawei.com" Date: Fri, 20 Oct 2023 11:38:52 +0800 Subject: [PATCH 3/4] =?UTF-8?q?eventType=E9=87=8D=E7=BB=98=E7=81=AB?= =?UTF-8?q?=E7=84=B0=E5=9B=BE=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9=E8=AF=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wupoli3@huawei.com --- .../component/trace/sheet/TabPaneFilter.ts | 24 +------------------ .../trace/sheet/hiperf/TabPerfProfile.ts | 2 +- 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/ide/src/trace/component/trace/sheet/TabPaneFilter.ts b/ide/src/trace/component/trace/sheet/TabPaneFilter.ts index 24f94022b..36570737b 100644 --- a/ide/src/trace/component/trace/sheet/TabPaneFilter.ts +++ b/ide/src/trace/component/trace/sheet/TabPaneFilter.ts @@ -58,7 +58,6 @@ export class TabPaneFilter extends BaseElement { private cutList: Array | undefined; private libraryList: Array | undefined; - private transferChecked: string | undefined; filterData(type: string, data: object = {}) { return { @@ -103,7 +102,6 @@ export class TabPaneFilter extends BaseElement { this.markButtonEL = this.shadowRoot?.querySelector('#mark'); this.iconEL = this.shadowRoot?.querySelector('#icon'); this.statisticsName = this.shadowRoot?.querySelector('.statistics-name'); - let transferEL = this.shadowRoot?.querySelector('.transfer-text'); this.iconEL!.onclick = (e) => { if (this.iconEL!.name == 'statistics') { this.iconEL!.name = 'menu'; @@ -128,10 +126,6 @@ export class TabPaneFilter extends BaseElement { } }; - transferEL!.onclick = () => { - this.getTransferList(); - } - this.markButtonEL!.onclick = (e) => { if (this.getFilter) { this.getFilter(this.filterData('mark', { mark: true })); @@ -439,16 +433,10 @@ export class TabPaneFilter extends BaseElement { initializeTreeTransfer() { let radioList = this.shadowRoot!.querySelectorAll('.radio'); let divElement = this.shadowRoot!.querySelectorAll('.tree-radio'); - - if(this.transferChecked && this.transferChecked !== 'count') { - radioList![Number(this.transferChecked)].checked = true; - } else if( this.transferChecked && this.transferChecked == 'count') { - radioList![radioList.length -1].checked = true; - } + radioList![radioList.length -1].checked = true; divElement!.forEach((divEl, idx) => { divEl.addEventListener('click', () => { - this.transferChecked = radioList![idx].value; radioList![idx].checked = true; if(this.getCallTransfer) { this.getCallTransfer({ @@ -459,16 +447,6 @@ export class TabPaneFilter extends BaseElement { }) } - refreshTreeTransfer() { - let radioList = this.shadowRoot!.querySelectorAll('.radio'); - if(this.transferChecked && this.transferChecked !== 'count') { - radioList![Number(this.transferChecked)].checked = false; - } else if( this.transferChecked && this.transferChecked == 'count') { - radioList![radioList.length -1].checked = false; - } - this.transferChecked = '' - } - initializeTreeConstraints() { let inputs = this.shadowRoot!.querySelectorAll('.constraints-input'); let check = this.shadowRoot!.querySelector('#constraints-check'); diff --git a/ide/src/trace/component/trace/sheet/hiperf/TabPerfProfile.ts b/ide/src/trace/component/trace/sheet/hiperf/TabPerfProfile.ts index e9b57656e..1a7f17f4c 100644 --- a/ide/src/trace/component/trace/sheet/hiperf/TabPerfProfile.ts +++ b/ide/src/trace/component/trace/sheet/hiperf/TabPerfProfile.ts @@ -70,9 +70,9 @@ export class TabpanePerfProfile extends BaseElement { this.perfProfilerFilter!.style.display = 'none'; } this.perfProfilerFilter!.disabledTransfer(false, 'perf'); + this.perfProfilerFilter!.getTransferList(); this.perfProfilerFilter!.initializeFilterTree(true, true, true); this.perfProfilerFilter!.filterValue = ''; - this.perfProfilerFilter!.refreshTreeTransfer(); this.perfProfileProgressEL!.loading = true; this.perfProfileLoadingPage.style.visibility = 'visible'; this.getDataByWorkAndUpDateCanvas(perfProfilerSelection) -- Gitee From b96049614acee2f895cdd291fa44260491ca7d4c Mon Sep 17 00:00:00 2001 From: "wupoli3@huawei.com" Date: Mon, 23 Oct 2023 14:43:27 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=86=B2=E7=AA=81?= =?UTF-8?q?=E8=A7=A3=E5=86=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wupoli3@huawei.com --- .../component/trace/sheet/hiperf/TabPerfProfile.ts | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/ide/src/trace/component/trace/sheet/hiperf/TabPerfProfile.ts b/ide/src/trace/component/trace/sheet/hiperf/TabPerfProfile.ts index adf909c24..db6f04e7e 100644 --- a/ide/src/trace/component/trace/sheet/hiperf/TabPerfProfile.ts +++ b/ide/src/trace/component/trace/sheet/hiperf/TabPerfProfile.ts @@ -72,11 +72,7 @@ export class TabpanePerfProfile extends BaseElement { this.perfProfilerFilter!.filterValue = ''; this.perfProfileProgressEL!.loading = true; this.perfProfileLoadingPage.style.visibility = 'visible'; - this.getDataByWorkAndUpDateCanvas(perfProfilerSelection) - this.perfProfilerFilter!.getCallTransferData((data: {eventTypeId: string}) => { - perfProfilerSelection.eventTypeId = data.eventTypeId !== 'count' ? data.eventTypeId : ''; - this.getDataByWorkAndUpDateCanvas(perfProfilerSelection) - }) + this.getDataByWorkAndUpDateCanvas(perfProfilerSelection); } getDataByWorkAndUpDateCanvas(perfProfilerSelection: SelectionParam) { @@ -84,12 +80,12 @@ export class TabpanePerfProfile extends BaseElement { this.initGetData(perfProfilerSelection, initWidth); this.perfProfilerFilter!.getCallTransferData((data: any) => { - perfProfilerSelection.eventTypeId = data.value !== 'count' ? data.value : undefined; - this.initGetData(perfProfilerSelection, initWidth, data); + perfProfilerSelection.eventTypeId = data.eventTypeId !== 'count' ? data.eventTypeId : undefined; + this.initGetData(perfProfilerSelection, initWidth); }); } - initGetData(perfProfilerSelection: SelectionParam | any, initWidth: number, data?: any): void { + initGetData(perfProfilerSelection: SelectionParam | any, initWidth: number): void { this.getDataByWorker( [ { @@ -113,7 +109,7 @@ export class TabpanePerfProfile extends BaseElement { this.perfProfileFrameChart?.updateCanvas(true, initWidth); this.perfProfileFrameChart!.data = this.perfProfilerDataSource; this.switchFlameChart(); - this.perfProfilerFilter.icon = 'block'; + this.perfProfilerFilter!.icon = 'block'; }) } -- Gitee