diff --git a/ide/src/base-ui/chart/pagenation/PageNation.ts b/ide/src/base-ui/chart/pagenation/PageNation.ts index b441e8aafca9a71b0ec3def815e4dd7ae4f48c22..b5f132b64d903d8813cb0e194f5842ed5084b2a5 100644 --- a/ide/src/base-ui/chart/pagenation/PageNation.ts +++ b/ide/src/base-ui/chart/pagenation/PageNation.ts @@ -225,16 +225,7 @@ export class PageNation { }); if (totalpage <= 9) { for (let i = 0; i < totalpage; i++) { - const li = origin.cloneNode(true); - // @ts-ignore - li.innerText = i + 1; - if (i + 1 === current) { - this.setElementStyles(li, { - backgroundColor: PageNation.BtnBackColor, - color: PageNation.BtnColor, - }); - } - this.list.appendChild(li); + this.buildLi(origin, i, current); } return; } @@ -244,110 +235,61 @@ export class PageNation { } // 当前页面 大于5页 小于倒数第5页 for (let index = 0; index < 2; index++) { - const cloneLi = origin.cloneNode(true); - // @ts-ignore - cloneLi.innerText = index + 1; - if (index + 1 === current) { - this.setElementStyles(cloneLi, { - backgroundColor: PageNation.BtnBackColor, - color: PageNation.BtnColor, - }); - } - this.list.appendChild(cloneLi); + this.buildLi(origin, index, current); } - var span = document.createElement('span'); + let span = document.createElement('span'); span.innerText = '...'; this.list.appendChild(span); for (let i = current - 3; i < current + 2; i++) { - const li = origin.cloneNode(true); - // @ts-ignore - li.innerText = i + 1; - if (i + 1 === current) { - this.setElementStyles(li, { - backgroundColor: PageNation.BtnBackColor, - color: PageNation.BtnColor, - }); - } - this.list.appendChild(li); + this.buildLi(origin, i, current); } - var span = document.createElement('span'); + span = document.createElement('span'); span.innerText = '...'; this.list.appendChild(span); for (let i = totalpage - 2; i < totalpage; i++) { - const li = origin.cloneNode(true); - // @ts-ignore - li.innerText = i + 1; - if (i + 1 === current) { - this.setElementStyles(li, { - backgroundColor: PageNation.BtnBackColor, - color: PageNation.BtnColor, - }); - } - this.list.appendChild(li); + this.buildLi(origin, i, current); + } + } + + private buildLi(origin: HTMLElement, i: number, current: number) { + const li = origin.cloneNode(true); + // @ts-ignore + li.innerText = i + 1; + if (i + 1 === current) { + this.setElementStyles(li, { + backgroundColor: PageNation.BtnBackColor, + color: PageNation.BtnColor, + }); } + this.list.appendChild(li); } bindLeftList(current: number, totalpage: number, origin: HTMLElement): boolean { + let span; if (current < 5) { // 左边5个 中间 ... 右边2个 for (let index = 0; index < 5; index++) { - const li = origin.cloneNode(true); - // @ts-ignore - li.innerText = index + 1; - if (index + 1 === current) { - this.setElementStyles(li, { - backgroundColor: PageNation.BtnBackColor, - color: PageNation.BtnColor, - }); - } - this.list.appendChild(li); + this.buildLi(origin, index, current); } - var span = document.createElement('span'); + span = document.createElement('span'); span.innerText = '...'; this.list.appendChild(span); for (let index = totalpage - 2; index < totalpage; index++) { - const li = origin.cloneNode(true); - // @ts-ignore - li.innerText = index + 1; - if (index + 1 === current) { - this.setElementStyles(li, { - backgroundColor: PageNation.BtnBackColor, - color: PageNation.BtnColor, - }); - } - this.list.appendChild(li); + this.buildLi(origin, index, current); } return true; } if (current == 5) { // 左边5个 中间 ... 右边2个 for (let i = 0; i < 7; i++) { - const li = origin.cloneNode(true); - // @ts-ignore - li.innerText = i + 1; - if (i + 1 === current) { - this.setElementStyles(li, { - backgroundColor: PageNation.BtnBackColor, - color: PageNation.BtnColor, - }); - } - this.list.appendChild(li); + this.buildLi(origin, i, current); } - var span = document.createElement('span'); + span = document.createElement('span'); span.innerText = '...'; this.list.appendChild(span); for (let index = totalpage - 2; index < totalpage; index++) { - const liElement = origin.cloneNode(true); - // @ts-ignore - liElement.innerText = index + 1; - if (index + 1 === current) { - this.setElementStyles(liElement, { - backgroundColor: PageNation.BtnBackColor, - color: PageNation.BtnColor, - }); - } - this.list.appendChild(liElement); + this.buildLi(origin, index, current); } return true; } @@ -355,62 +297,26 @@ export class PageNation { if (current > totalpage - 4) { // 左边5个 中间 ... 右边2个 for (let index = 0; index < 2; index++) { - const li = origin.cloneNode(true); - // @ts-ignore - li.innerText = index + 1; - if (index + 1 === current) { - this.setElementStyles(li, { - backgroundColor: PageNation.BtnBackColor, - color: PageNation.BtnColor, - }); - } - this.list.appendChild(li); + this.buildLi(origin, index, current); } - var span = document.createElement('span'); + span = document.createElement('span'); span.innerText = '...'; this.list.appendChild(span); for (let i = totalpage - 5; i < totalpage; i++) { - const li = origin.cloneNode(true); - // @ts-ignore - li.innerText = i + 1; - if (i + 1 === current) { - this.setElementStyles(li, { - backgroundColor: PageNation.BtnBackColor, - color: PageNation.BtnColor, - }); - } - this.list.appendChild(li); + this.buildLi(origin, i, current); } return true; } if (current == totalpage - 4) { // 左边5个 中间 ... 右边2个 for (let i = 0; i < 2; i++) { - const li = origin.cloneNode(true); - // @ts-ignore - li.innerText = i + 1; - if (i + 1 === current) { - this.setElementStyles(li, { - backgroundColor: PageNation.BtnBackColor, - color: PageNation.BtnColor, - }); - } - this.list.appendChild(li); + this.buildLi(origin, i, current); } - var span = document.createElement('span'); + span = document.createElement('span'); span.innerText = '...'; this.list.appendChild(span); for (let i = totalpage - 7; i < totalpage; i++) { - const li = origin.cloneNode(true); - // @ts-ignore - li.innerText = i + 1; - if (i + 1 === current) { - this.setElementStyles(li, { - backgroundColor: PageNation.BtnBackColor, - color: PageNation.BtnColor, - }); - } - this.list.appendChild(li); + this.buildLi(origin, i, current); } return true; } diff --git a/ide/src/base-ui/table/lit-table.ts b/ide/src/base-ui/table/lit-table.ts index a7b633855465e0aec6429a0843dd4b1f1507fb28..6b8fc0bf6fda6740bf516ad77243aeec564fc2a6 100644 --- a/ide/src/base-ui/table/lit-table.ts +++ b/ide/src/base-ui/table/lit-table.ts @@ -257,7 +257,7 @@ export class LitTable extends HTMLElement {
-
+ `; } @@ -1738,25 +1738,25 @@ export class LitTable extends HTMLElement { ); } - setCurrentSelection(data: any) { + setCurrentSelection(selectionData: any) { if (this.isRecycleList) { - if (data.isSelected != undefined) { - this.currentTreeDivList.forEach((item) => { - if ((item as any).data == data) { - this.setSelectedRow(data.isSelected, [item]); + if (selectionData.isSelected != undefined) { + this.currentTreeDivList.forEach((itemEl) => { + if ((itemEl as any).data == selectionData) { + this.setSelectedRow(selectionData.isSelected, [itemEl]); } }); - this.currentRecycleList.forEach((item) => { - if ((item as any).data == data) { - this.setSelectedRow(data.isSelected, [item]); + this.currentRecycleList.forEach((recycleItem) => { + if ((recycleItem as any).data == selectionData) { + this.setSelectedRow(selectionData.isSelected, [recycleItem]); } }); } } else { - if (data.isSelected != undefined) { + if (selectionData.isSelected != undefined) { this.normalDs.forEach((item) => { - if ((item as any).data == data) { - this.setSelectedRow(data.isSelected, [item]); + if ((item as any).data == selectionData) { + this.setSelectedRow(selectionData.isSelected, [item]); } }); } @@ -1768,14 +1768,14 @@ export class LitTable extends HTMLElement { this.setMouseIn(false, this.currentTreeDivList); this.setMouseIn(false, this.currentRecycleList); if (data.isHover != undefined) { - this.currentTreeDivList.forEach((item) => { - if ((item as any).data == data) { - this.setMouseIn(data.isHover, [item]); + this.currentTreeDivList.forEach((hoverItem) => { + if ((hoverItem as any).data == data) { + this.setMouseIn(data.isHover, [hoverItem]); } }); - this.currentRecycleList.forEach((item) => { - if ((item as any).data == data) { - this.setMouseIn(data.isHover, [item]); + this.currentRecycleList.forEach((hoverItem) => { + if ((hoverItem as any).data == data) { + this.setMouseIn(data.isHover, [hoverItem]); } }); } @@ -1791,18 +1791,18 @@ export class LitTable extends HTMLElement { } } - dispatchRowClickEventIcon(rowObject: any, elements: any[]) { + dispatchRowClickEventIcon(rowData: any, elements: any[]) { this.dispatchEvent( new CustomEvent('icon-click', { detail: { - ...rowObject.data, - data: rowObject.data, + ...rowData.data, + data: rowData.data, callBack: (isSelected: boolean) => { //是否爲单选 if (isSelected) { - this.clearAllSelection(rowObject.data); + this.clearAllSelection(rowData.data); } - this.setSelectedRow(rowObject.data.isSelected, elements); + this.setSelectedRow(rowData.data.isSelected, elements); }, }, composed: true, diff --git a/ide/src/doc/md/quickstart_animation.md b/ide/src/doc/md/quickstart_animation.md new file mode 100644 index 0000000000000000000000000000000000000000..59ded268af06ec94e089c409d05c3bb330ebe877 --- /dev/null +++ b/ide/src/doc/md/quickstart_animation.md @@ -0,0 +1,58 @@ +# Animation的抓取和展示说明 +通过动效模板的指标项对图形子系统和应用做动效卡顿类问题分析。 +### Animation抓取参数的配置 +![GitHub Logo](../../figures/animation/animationconfig.jpg) +配置项说明: ++ Animation effect:动效配置项的总开关。 +### Animation展示说明 +将抓取的Animation文件导入到smartperf工具中,查看图形子系统和应用动效卡顿类问题。 +### Animation泳道图展示 +Animation的响应时延泳道图显示,泳道图的Slice会显示响应时延,如下图中的Completion delay(683.035938ms)。 +![GitHub Logo](../../figures/animation/anrsdelayrow.jpg)。 +Animation的动效曲线和帧间距的总泳道图,如图点击leashWindow40旁边的小齿轮可以切换leashWindow。 +![GitHub Logo](../../figures/animation/anrsallrow.jpg)。 +Animation的动效曲线泳道图展示,如下: +![GitHub Logo](../../figures/animation/anieffectcurv.jpg) +泳道图说明: ++ Animation Effect Curve旁边的齿轮显示的x,y,width,height,alpha是动效帧的属性值,可以切换。 ++ Animation Effect Curve泳道图红色的曲线代表的是异常判断点,也就是相邻两帧属性值相同的异常时间区间。 +Animation的帧间距泳道图展示,如下: +![GitHub Logo](../../figures/animation/framespacirow.jpg) +泳道图说明: ++ Frame spacing泳道图显示相邻两帧在时间尺度上相对于设备物理屏幕的变化间距值。 +### 动效曲线泳道图点选功能 +点选动效曲线泳道图上的属性值会出现一个空心小圆点,Frame Dynamic的Tab页会显示相关信息。 +![GitHub Logo](../../figures/animation/anieffectcurvselect.jpg) ++ Timestamp: 时间戳信息。 ++ Index: 属性索引。 ++ Value:属性值。 +### 动效曲线泳道图框选功能 +框选动效曲线泳道图,Frame Dynamic的Tab页会显示框选范围内每个点的属性值。 +![GitHub Logo](../../figures/animation/anieffectcurvdrag.jpg) ++ Timestamp: 时间戳信息。 ++ Index: 属性索引。 ++ Value:属性值。 +### 帧间距泳道图点选功能 +点选帧间距泳道图,Frame spacing的Tab页会显示这一个点的帧间距计算数据,一个点要计算两个属性的的帧间距,所以需要显示两个属性的。 +![GitHub Logo](../../figures/animation/anispacingselect.jpg) ++ Timestamp: 时间戳信息。 ++ Index: 属性索引。 ++ property:动效宽度或高度属性。 ++ Value2: 当前帧的属性值。 ++ Value1: 前一帧的属性值。 ++ Screen:存储设备的物理宽度/高度。 ++ T2(s): 当前帧的结束时间。 ++ T1(s): 前一帧的结束时间。 ++ result:帧间距。 +### 帧间距泳道图框选功能 +框选帧间距泳道图,Frame spacing的Tab页会显示框选范围内帧间距数据。 +![GitHub Logo](../../figures/animation/anispacingdrag.jpg) ++ Timestamp: 时间戳信息。 ++ Index: 属性索引。 ++ property:动效宽度或高度属性。 ++ Value2: 当前帧的属性值。 ++ Value1: 前一帧的属性值。 ++ Screen:存储设备的物理宽度/高度。 ++ T2(s): 当前帧的结束时间。 ++ T1(s): 前一帧的结束时间。 ++ result:帧间距。 \ No newline at end of file diff --git a/ide/src/doc/md/quickstart_app_startup.md b/ide/src/doc/md/quickstart_app_startup.md new file mode 100644 index 0000000000000000000000000000000000000000..c57dda80c1cb35330d844d9eccae0d1a614d0c20 --- /dev/null +++ b/ide/src/doc/md/quickstart_app_startup.md @@ -0,0 +1,54 @@ +# App startup的抓取和展示说明 +应用启动分析功能主要是提供应用启动分析模板帮助系统调优人员做应用启动慢场景问题分析,快速查找系统侧启动慢阶段和耗时长调用栈信息。 +### App startup抓取参数的配置 +![GitHub Logo](../../figures/appstartup/appstartupconfig.jpg) +配置项说明: ++ App startup:配置项的总开关。 +### App startup展示说明 +将抓取的App startup文件导入到smartperf工具中,查看应用启动各阶段耗时的情况。 +### App startup泳道图展示 +App startup的泳道图展示: +![GitHub Logo](../../figures/appstartup/appstartuprow.jpg) +应用启动包括六个阶段,分别是Process Creating(应用进程创建阶段)、Application Launching(加载应用阶段)、UI Ability Launching(加载UI Ability)、UI Ability OnForeground(应用进入前台)、First Frame - APP Phase(首帧渲染提交-应用)、First Frame - Render Phase(首帧渲染提交-Render Service)。每个阶段的Slice上都会显示出该阶段的时延。 +### App startup泳道图点选功能 +可以对启动各个阶段的Slice进行点选,点选后在最下方的弹出层中会展示点选数据的统计的tab页。 +以Process Creating的Slice点选为例: +![GitHub Logo](../../figures/appstartup/appstartupslice.jpg) ++ StartTime(Relative): 应用启动开始时间(相对时间)。 ++ StartTime(Absolute): 应用启动开始时间(绝对时间)。 ++ EndTime(Relative):应用启动的结束时间(相对时间)。 ++ EndTime(Absolute):应用启动的结束时间(绝对时间)。 ++ Duration:应用启动的持续时间。 +### App startup泳道图Tab页跳转功能 +点击各阶段的起始或者结束时间后面的跳转图标,跳转至关联Slice,并显示该Slice的详细信息。 +以Process Creating的跳转为例: +![GitHub Logo](../../figures/appstartup/appstartupjump.jpg) +跳转说明: ++ StartTime(Relative)的跳转: 跳转到H:virtual int OHOS::AAFwk::AbilityManagerService::StartAbility关键字函数。 ++ EndTime(Relative)的跳转: 跳转到H:virtual void OHOS::AppExecFwk::AppMgrServiceInner::AttachApplication关键字函数,并且调用栈要带##应用名,如##com.ohos.smartperf。 +### App startup泳道图的框选功能 +应用启动阶段泳道图框选功能主要是框选启动分析泳道图之后,统计应用各个启动阶段的耗费时长信息。 +![GitHub Logo](../../figures/appstartup/appstartupdrag.jpg) ++ Process / Startup: 应用名称和启动阶段名称。 ++ Duration:应用各阶段启动时长。 ++ %:应用各阶段启动时长的占比。 +### So初始化泳道图展示 +So初始化的泳道图展示: +![GitHub Logo](../../figures/appstartup/staticinitilizationrow.jpg) +### So初始化泳道图的点选功能 +点选So初始化的Slice,展示该so初始化信息的tab页。 +![GitHub Logo](../../figures/appstartup/staticinitilizationslice.jpg) ++ Name:So的名称。 ++ StartTime(Relative):So初始化开始时间(相对时间)。 ++ StartTime(Absolute):So初始化开始时间(绝对时间)。 ++ Duration:So初始化耗时。 +### So初始化泳道图Tab页跳转功能 +点击So初始化开始时间后面的跳转图标,跳转至关联Slice,并显示该Slice的详细信息。 +![GitHub Logo](../../figures/appstartup/staticinitilizationjump.jpg) +跳转说明: ++ StartTime(Relative)的跳转: 跳转到dlopen: system/lib64/extensionability/libinputmethod_extension_module.z.so。 +### So初始化泳道图的框选功能 +So初始化泳道图框选功能主要是框选So初始化泳道图之后,统计各个进程下各个So的初始化耗费时长信息。 +![GitHub Logo](../../figures/appstartup/staticinitilizationdrag.jpg) ++ Process / Lib: 应用名称和So名称。 ++ Duration:So的耗费时长。 \ No newline at end of file diff --git a/ide/src/doc/md/quickstart_arkts.md b/ide/src/doc/md/quickstart_arkts.md new file mode 100644 index 0000000000000000000000000000000000000000..0c70e942382b7a0aa0ac56c6013b51262f1b09b2 --- /dev/null +++ b/ide/src/doc/md/quickstart_arkts.md @@ -0,0 +1,44 @@ +# Cpuprofiler抓取和展示说明 +Cpuprofiler模板帮助ArkTs开发和测试分析虚拟机层执行开销大问题,提供Ts层耗时长函数和阶段。 +## Cpuprofiler的抓取 +#### Cpuprofiler的抓取配置参数 +打开Start Ark Ts Record总开关下面的Start cpu profiler开关抓取cpuprofiler数据。 +![GitHub Logo](../../figures/arkts/cpuprofilerconfig.jpg) +### Cpuprofiler展示说明 +将抓取的cpuprofiler文件导入到smartperf中,查看Ts层耗时长的函数和阶段。 +![GitHub Logo](../../figures/arkts/cpuprofilerrow.jpg) +### Cpuprofiler的泳道图悬浮显示 +鼠标放到泳道图的Slice上会有悬浮框显示。 +![GitHub Logo](../../figures/arkts/cpuprofilertip.jpg) ++ Name : 函数名。 ++ Self Time: 函数自身执行时间(不包含其调用者)。 ++ Total Time : 函数自身及调用者的调用时间总和。 ++ Url : 函数所在的文件名称。 +### Cpuprofiler泳道图的点选和框选功能 +点选或者框选泳道图上函数名的Slice,会显示Js Profiler Statistics,Js Profiler CallTree,Js Profiler BottomUp的Tab页信息。 +Js Profiler Statistics的Tab页显示数据的维度信息,以饼图和Table表的方式展示,如下图: +![GitHub Logo](../../figures/arkts/cpuprofilerselects.jpg) +![GitHub Logo](../../figures/arkts/cpuprofilerdrags.jpg) ++ Type : 维度名称,有九大维度(NAPI、ARKUI_ENGINE、BUTLTIN、GC、AINT、CINT、AOT、RUNTIME、OTHER)。 ++ Total : 时间。 ++ % : 时间占比。 +Js Profiler CallTree的Tab页把name,url,depth,parent相同的函数合并,构建成一个top down的树结构,以树形表格的形式显示,表格中显示函数调用关系,如下图: +![GitHub Logo](../../figures/arkts/cpuprofilerselectc.jpg) +![GitHub Logo](../../figures/arkts/cpuprofilerdragc.jpg) ++ Symbol : 函数名。 ++ Self Time: 函数自身执行时间(不包含其调用者)。 ++ Total Time : 函数自身及调用者的调用时间总和。 +Js Profiler BottomUp的Tab页把name,url,depth,parent相同的函数合并,构建成一个bottom up的树结构,以树形表格的形式显示,只不过作为根节点的是被调用者,表格中显示函数被调用关系,如下图: +![GitHub Logo](../../figures/arkts/cpuprofilerselectb.jpg) +![GitHub Logo](../../figures/arkts/cpuprofilerdragb.jpg) ++ Symbol : 函数名。 ++ Self Time: 函数自身执行时间(不包含其调用者)。 ++ Total Time : 函数自身及调用者的调用时间总和。 +### Cpuprofiler的Heaviest Stack功能 +Js Profiler CallTree的Tab页的Heaviest Stack表格显示的是选中的函数的完整的调用栈。 +![GitHub Logo](../../figures/arkts/cpuprofilerheavic.jpg) +Js Profiler BottomUp的Tab页的Heaviest Stack表格显示的是选中的函数的完整的逆序调用栈。 +![GitHub Logo](../../figures/arkts/cpuprofilerheavib.jpg) ++ Symbol : 函数名。 ++ Total Time : 函数自身及调用者的调用时间总和。 ++ % : 总时间占比。 \ No newline at end of file diff --git a/ide/src/doc/md/quickstart_memory_template.md b/ide/src/doc/md/quickstart_memory_template.md new file mode 100644 index 0000000000000000000000000000000000000000..d994f5a0c738ea70496106a5aa4f8f18079c5055 --- /dev/null +++ b/ide/src/doc/md/quickstart_memory_template.md @@ -0,0 +1,148 @@ +# 系统内存抓取和展示说明 +系统内存分析模板帮助系统内存调优人员进行进程内存拆解。 +## 系统内存的抓取 +#### 系统内存的抓取配置参数 +打开VM Tracker开关抓取内存数据。 +![GitHub Logo](../../figures/Allmemory/allmemorycofig.jpg) +### 系统内存展示说明 +将抓取的内存文件导入到smartperf中,查看进程内存的情况。 +![GitHub Logo](../../figures/Allmemory/allmemoryrow.jpg) +### 系统内存中Ability Monitor泳道图显示 +Ability Monitor泳道图分为MemoryTotal,Cached,SwapTotal,System Purgeable Total,System Purgeable Pin,DMA,Skia Gpu Memory泳道。 +![GitHub Logo](../../figures/Allmemory/abrow.jpg) +### 系统内存中Ability Monitor泳道图点选功能 +System Purgeable Total泳道图点选功能。 +![GitHub Logo](../../figures/Allmemory/purtotalselect.jpg) ++ TimeStamp:时间戳。 ++ ActivePurg:当前时间点的ActivePurg内存。 ++ InActivePurg:当前时间点的InActivePurg内存。 ++ ShmPurg:当前时间点的ShmPurg内存。 +System Purgeable Total泳道图框选功能。 +![GitHub Logo](../../figures/Allmemory/purtotaldrag.jpg) ++ Type:内存的类别。 ++ AvgSize:当前内存的平均值。 ++ MaxSize:当前内存的最大值。 ++ MinSize:当前内存的最小值。 +System Purgeable Pin泳道图点选功能。 +![GitHub Logo](../../figures/Allmemory/purpinselect.jpg) ++ TimeStamp:时间戳。 ++ PinedPurg:当前时间点的PinedPurg内存。 ++ ShmPurg:当前时间点的ShmPurg内存。 +System Purgeable Pin泳道图框选功能。 +![GitHub Logo](../../figures/Allmemory/purpindrag.jpg) ++ Type:内存的类别。 ++ AvgSize:当前内存的平均值。 ++ MaxSize:当前内存的最大值。 ++ MinSize:当前内存的最小值。 +DMA泳道图点选功能。 +![GitHub Logo](../../figures/Allmemory/dmaselect.jpg) ++ TimeStamp:时间戳。 ++ Process(pid):进程名(进程ID)。 ++ Fd:DMA内存文件描述符。 ++ Size:DMA内存大小。 ++ Ino:Ino值。 ++ ExpPid:申请者的进程号。 ++ ExpTaskComm:ExpTaskComm的值。 ++ BufName:DMA内存名。 ++ ExpName:申请者的进程名。 ++ Flag:去重标记,0表示正常,1表示进程内部重复数据,2表示进程间重复数据。 +DMA泳道图框选功能。 +![GitHub Logo](../../figures/Allmemory/dmadrag.jpg) ++ Process(pid):进程名(进程ID)。 ++ SumSize:DMA内存总量。 ++ AvgSize:DMA内存的平均值。 ++ MaxSize:DMA内存的最大值。 ++ MinSize:DMA内存的最小值。 +Skia Gpu Memory泳道图点选功能。 +![GitHub Logo](../../figures/Allmemory/sgpumemselect.jpg) ++ TimeStamp:时间戳。 ++ GpuName:Gpu名称。 ++ Process(pid):进程名(进程ID)。。 ++ Size:对应进程的Gpu的使用size。 +Skia Gpu Memory泳道图框选功能。 +![GitHub Logo](../../figures/Allmemory/sgpumemdrag.jpg) ++ GpuName:Gpu名称。 ++ Process(pid):进程名(进程ID)。 ++ SumSize:Gpu内存总量。 ++ AvgSize:Gpu内存的平均值。 ++ MaxSize:Gpu内存的最大值。 ++ MinSize:Gpu内存的最小值。 +### VM Tracker下的smaps泳道图展示 +smaps泳道图分为Dirty,Swapped,RSS,PSS,USS泳道图。 +![GitHub Logo](../../figures/Allmemory/smapsallrow.jpg) +### VM Tracker下的smaps泳道图的点选和框选功能 +点选和框选Dirty,Swapped,RSS,PSS,USS的5个泳道图中任一个显示的都是一样的内容,会显示Smaps Statistic和Smaps sample的tab页。 +Smaps Statistic的tab页展示。 +![GitHub Logo](../../figures/Allmemory/sstaaticstab.jpg) ++ Type: 将抓取到的信息根据Type归类。 ++ Path:虚拟内存块路径,类型中有多个则显示multiple。 ++ Size:在该虚拟内存块路径下内存的size总和。 ++ % of Res: 每行的Resident Size 占总Ressident Size的比例。 ++ Count:统计的类型个数。 ++ Rss: smaps节点中Rss。 ++ Pss: smaps节点中Pss。 ++ SharedClean: smaps节点中SharedClean。 ++ SharedDirty:smaps节点中Shared_Dirty。 ++ PrivateClean: smaps节点中PrivateClean。 ++ PrivateDirty:smaps节点中PrivateDirty。 ++ Swap:smaps节点中Swap。 ++ SwapPss:smaps节点中SwapPss。 +Smaps sample的tab页展示。 +![GitHub Logo](../../figures/Allmemory/ssampletab.jpg) ++ TimeStamp: 时间戳信息。 ++ Type: 将抓取到的信息根据Type归类。 ++ Path:虚拟内存块路径,类型中有多个则显示multiple。 ++ Address Range:每段虚拟内存段的开始和结束位置。 ++ Rss: smaps节点中Rss。 ++ Pss: smaps节点中Pss。 ++ SharedClean: smaps节点中SharedClean。 ++ SharedDirty:smaps节点中Shared_Dirty。 ++ PrivateClean: smaps节点中PrivateClean。 ++ PrivateDirty:smaps节点中PrivateDirty。 ++ Swap:smaps节点中Swap。 ++ SwapPss:smaps节点中SwapPss。 ++ Reside: Rss / Size 比值。 ++ Protection: 内存块的权限(读写执行执行)。 +### VM Tracker下的GPU泳道图展示 +smaps泳道图分为GL,Skia Gpu Dump Toal,Skia Gpu Dump Window,Skia Gpu Memory泳道图。 +![GitHub Logo](../../figures/Allmemory/gpurow.jpg) +Skia Gpu Memory泳道图点选功能。 +![GitHub Logo](../../figures/Allmemory/vgpumemselect.jpg) ++ TimeStamp:时间戳。 ++ GpuName:Gpu名称。 ++ Thread(tid):线程名(线程ID)。 ++ Size:对应线程的Gpu的使用size。 +Skia Gpu Memory泳道图框选功能。 +![GitHub Logo](../../figures/Allmemory/vgpumemdrag.jpg) ++ GpuName:Gpu名称。 ++ Thread(tid):线程名(线程ID)。 ++ SumSize:Gpu内存总量。 ++ AvgSize:Gpu内存的平均值。 ++ MaxSize:Gpu内存的最大值。 ++ MinSize:Gpu内存的最小值。 +Gl泳道图框选功能。 +![GitHub Logo](../../figures/Allmemory/vglrag.jpg) ++ TimeStamp:时间戳。 ++ GL_PSS:GL_PSS的大小。 +Skia Gpu Dump Toal泳道图点选功能。 +![GitHub Logo](../../figures/Allmemory/vgputotalselect.jpg) ++ Module / Category:模块/目录。 ++ Size:按照模块/目录显示size大小。 +Skia Gpu Dump Toal泳道图框选功能。 +![GitHub Logo](../../figures/Allmemory/vgputotaldrag.jpg) ++ TimeStamp:时间戳。 ++ Module / Category:模块/目录。 ++ AvgSize:对应模块/目录下size的平均值。 ++ MaxSize:对应模块/目录下size的最大值。 ++ MinSize:对应模块/目录下size的最小值。 +Skia Gpu Dump Window泳道图点选功能。 +![GitHub Logo](../../figures/Allmemory/vgpuwindowselect.jpg) ++ Window / Module / Category:窗口/模块/目录。 ++ Size:按照窗口/模块/目录显示size大小。 +Skia Gpu Dump Window泳道图框选功能。 +![GitHub Logo](../../figures/Allmemory/vgpuwindowdrag.jpg) ++ TimeStamp:时间戳。 ++ Window / Module / Category:窗口/模块/目录。 ++ AvgSize:对应窗口/模块/目录下size的平均值。 ++ MaxSize:对应窗口/模块/目录下size的最大值。 ++ MinSize:对应窗口/模块/目录下size的最小值。 \ No newline at end of file diff --git a/ide/src/doc/md/quickstart_taskpool.md b/ide/src/doc/md/quickstart_taskpool.md new file mode 100644 index 0000000000000000000000000000000000000000..c3a98c17e1480d01c1d424b11bf5cd397c729abd --- /dev/null +++ b/ide/src/doc/md/quickstart_taskpool.md @@ -0,0 +1,40 @@ +# TaskPool抓取和展示说明 +TaskPool分析模块主要展示应用程序使用taskpool时,任务的关联关系,任务调度开销和任务并发度分析情况,任务各阶段耗时情况,线程池的状态统计,队列任务数,任务是否超时。 +## TaskPool的抓取 +#### TaskPool的抓取配置参数 +打开Task pool开关抓取taskpool数据。 +![GitHub Logo](../../figures/Taskpool/taskpoolconfig.jpg) +### TaskPool展示说明 +将抓取的taskpool文件导入到smartperf中,查看任务的关联关系等信息。 +![GitHub Logo](../../figures/Taskpool/taskpoolrow.jpg) +### TaskPool的任务关联关系跟踪 +任务关联关系就是根据任务的executeId,把一个taskpool任务的各个执行的函数调用栈连接起来,用于表示一个任务从开始分发到执行,再到最后任务结束的整个过程。 +![GitHub Logo](../../figures/Taskpool/taskpoolrelation.jpg) +如上图所示,点击H:Task Perform: taskId : 2, executeId : 2的调用栈会出现红色连线,红色连线展示了executeId是2的任务的关联关系,连接的调用栈分别是: ++ H:Task Allocation: taskId : 2, executeId : 2, priority : 1, executeState : 1:任务分发。 ++ H:Task Perform: taskId : 2, executeId : 2:任务执行。 ++ H:Task PerformTask End: taskId : 2, executeId : 2, performResult : Successful:任务返回。 +### TaskPool的并发度 +点选或者框选任务状态为执行会进行任务并发度展示,如图所示并发度是3。 +![GitHub Logo](../../figures/Taskpool/taskpoolconcurrency.jpg) +### TaskPool泳道图的点选功能 +点选taskpool的Slice,展示该taskpool信息的tab页。 +![GitHub Logo](../../figures/Taskpool/taskpoolselect.jpg) ++ Name: 任务调用栈名称。 ++ StartTime: 任务调用栈开始时间。 ++ Duration:任务调用栈持续时间。 ++ depth:调用栈层级。 +### TaskPool泳道图的框选功能 +框选taskpool的泳道图,展示Frames的tab页。 +![GitHub Logo](../../figures/Taskpool/taskpooldrag.jpg) ++ Execute Id: 任务id。 ++ Task Priority: 任务优先级(HIGH,MEDIUM,LOW)。 ++ Scheduling Time(ms):调度耗时(任务执行起始时间 - 任务分发起始时间)。 ++ Execution Time(ms):执行耗时(任务执行的duration)。 ++ Return Time(ms):返回耗时(任务返回的结束时间 – 任务执行的结束时间)。 +### TaskPool的队列任务数和线程池里线程状态统计 +![GitHub Logo](../../figures/Taskpool/taskpoolnum.jpg) +如上图,H:threadNum,H:runningThreadNum,H:idleThreadNum,H:timeoutThreadNum是线程池里线程状态统计,H:taskNum是队列任务数。 +### TaskPool的任务超时退出 +在带有H:Thread Timeout Exit的调用栈的泳道图会采用黄色圆圈,中间为白色反叹号标记,代表任务超时退出。 +![GitHub Logo](../../figures/Taskpool/taskpoolexit.jpg) \ No newline at end of file diff --git a/ide/src/doc/quickstart_animation.html b/ide/src/doc/quickstart_animation.html new file mode 100644 index 0000000000000000000000000000000000000000..14b377cdfcbe978b86cc2d683d3301673a578e29 --- /dev/null +++ b/ide/src/doc/quickstart_animation.html @@ -0,0 +1,1049 @@ + + + + + quickstart_animation + + + + +
+

Animation的抓取和展示说明

+ +

通过动效模板的指标项对图形子系统和应用做动效卡顿类问题分析。

+

Animation抓取参数的配置

+ +

+ GitHub Logo
+ 配置项说明: +

+ +

Animation展示说明

+ +

将抓取的Animation文件导入到smartperf工具中,查看图形子系统和应用动效卡顿类问题。

+

Animation泳道图展示

+ +

+ Animation的响应时延泳道图显示,泳道图的Slice会显示响应时延,如下图中的Completion delay(683.035938ms)。
+ GitHub Logo
+ Animation的动效曲线和帧间距的总泳道图,如图点击leashWindow40旁边的小齿轮可以切换leashWindow。
+ GitHub Logo
+ Animation的动效曲线泳道图展示,如下:
+ GitHub Logo
+ 泳道图说明: +

+ +

+ Animation的帧间距泳道图展示,如下:
+ GitHub Logo
+ 泳道图说明: +

+ +

动效曲线泳道图点选功能

+ +

+ 点选动效曲线泳道图上的属性值会出现一个空心小圆点,Frame Dynamic的Tab页会显示相关信息。
+ GitHub Logo +

+ +

动效曲线泳道图框选功能

+ +

+ 框选动效曲线泳道图,Frame Dynamic的Tab页会显示框选范围内每个点的属性值。
+ GitHub Logo +

+ +

帧间距泳道图点选功能

+ +

+ 点选帧间距泳道图,Frame + spacing的Tab页会显示这一个点的帧间距计算数据,一个点要计算两个属性的的帧间距,所以需要显示两个属性的。
+ GitHub Logo +

+ +

帧间距泳道图框选功能

+ +

+ 框选帧间距泳道图,Frame spacing的Tab页会显示框选范围内帧间距数据。
+ GitHub Logo +

+ +
+ + + + diff --git a/ide/src/doc/quickstart_app_startup.html b/ide/src/doc/quickstart_app_startup.html new file mode 100644 index 0000000000000000000000000000000000000000..ad983ba732d10c848150320c49494a264233b110 --- /dev/null +++ b/ide/src/doc/quickstart_app_startup.html @@ -0,0 +1,1007 @@ + + + + + quickstart_app_startup + + + + + +
+

App startup的抓取和展示说明

+ +

+ 应用启动分析功能主要是提供应用启动分析模板帮助系统调优人员做应用启动慢场景问题分析,快速查找系统侧启动慢阶段和耗时长调用栈信息。 +

+

App startup抓取参数的配置

+ +

+ GitHub Logo
+ 配置项说明: +

+ +

App startup展示说明

+ +

将抓取的App startup文件导入到smartperf工具中,查看应用启动各阶段耗时的情况。

+

App startup泳道图展示

+ +

+ App startup的泳道图展示:
+ GitHub Logo
+ 应用启动包括六个阶段,分别是Process Creating(应用进程创建阶段)、Application Launching(加载应用阶段)、UI Ability + Launching(加载UI Ability)、UI Ability OnForeground(应用进入前台)、First Frame - APP + Phase(首帧渲染提交-应用)、First Frame - Render Phase(首帧渲染提交-Render + Service)。每个阶段的Slice上都会显示出该阶段的时延。 +

+

App startup泳道图点选功能

+ +

+ 可以对启动各个阶段的Slice进行点选,点选后在最下方的弹出层中会展示点选数据的统计的tab页。
+ 以Process Creating的Slice点选为例:
+ GitHub Logo +

+ +

App startup泳道图Tab页跳转功能

+ +

+ 点击各阶段的起始或者结束时间后面的跳转图标,跳转至关联Slice,并显示该Slice的详细信息。
+ 以Process Creating的跳转为例:
+ GitHub Logo
+ 跳转说明: +

+ +

App startup泳道图的框选功能

+ +

+ 应用启动阶段泳道图框选功能主要是框选启动分析泳道图之后,统计应用各个启动阶段的耗费时长信息。
+ GitHub Logo +

+ +

So初始化泳道图展示

+ +

+ So初始化的泳道图展示:
+ GitHub Logo +

+

So初始化泳道图的点选功能

+ +

+ 点选So初始化的Slice,展示该so初始化信息的tab页。
+ GitHub Logo +

+ +

So初始化泳道图Tab页跳转功能

+ +

+ 点击So初始化开始时间后面的跳转图标,跳转至关联Slice,并显示该Slice的详细信息。
+ GitHub Logo
+ 跳转说明: +

+ +

So初始化泳道图的框选功能

+ +

+ So初始化泳道图框选功能主要是框选So初始化泳道图之后,统计各个进程下各个So的初始化耗费时长信息。
+ GitHub Logo +

+ +
+ + + + diff --git a/ide/src/doc/quickstart_arkts.html b/ide/src/doc/quickstart_arkts.html new file mode 100644 index 0000000000000000000000000000000000000000..0fa3d112bc2438d447956e844c02eba5b19e23e0 --- /dev/null +++ b/ide/src/doc/quickstart_arkts.html @@ -0,0 +1,972 @@ + + + + + quickstart_arkts + + + + +
+

Cpuprofiler抓取和展示说明

+ +

Cpuprofiler模板帮助ArkTs开发和测试分析虚拟机层执行开销大问题,提供Ts层耗时长函数和阶段。

+

Cpuprofiler的抓取

+ +

Cpuprofiler的抓取配置参数

+ +

+ 打开Start Ark Ts Record总开关下面的Start cpu profiler开关抓取cpuprofiler数据。
+ GitHub Logo +

+

Cpuprofiler展示说明

+ +

+ 将抓取的cpuprofiler文件导入到smartperf中,查看Ts层耗时长的函数和阶段。
+ GitHub Logo +

+

Cpuprofiler的泳道图悬浮显示

+ +

+ 鼠标放到泳道图的Slice上会有悬浮框显示。
+ GitHub Logo +

+ +

Cpuprofiler泳道图的点选和框选功能

+ +

+ 点选或者框选泳道图上函数名的Slice,会显示Js Profiler Statistics,Js Profiler CallTree,Js Profiler + BottomUp的Tab页信息。
+ Js Profiler Statistics的Tab页显示数据的维度信息,以饼图和Table表的方式展示,如下图:
+ GitHub Logo
+ GitHub Logo +

+ +

+ Js Profiler CallTree的Tab页把name,url,depth,parent相同的函数合并,构建成一个top + down的树结构,以树形表格的形式显示,表格中显示函数调用关系,如下图:
+ GitHub Logo
+ GitHub Logo +

+ +

+ Js Profiler BottomUp的Tab页把name,url,depth,parent相同的函数合并,构建成一个bottom + up的树结构,以树形表格的形式显示,只不过作为根节点的是被调用者,表格中显示函数被调用关系,如下图:
+ GitHub Logo
+ GitHub Logo +

+ +

Cpuprofiler的Heaviest Stack功能

+ +

+ Js Profiler CallTree的Tab页的Heaviest Stack表格显示的是选中的函数的完整的调用栈。
+ GitHub Logo
+ Js Profiler BottomUp的Tab页的Heaviest Stack表格显示的是选中的函数的完整的逆序调用栈。
+ GitHub Logo +

+ +
+ + + + diff --git a/ide/src/doc/quickstart_memory_template.html b/ide/src/doc/quickstart_memory_template.html new file mode 100644 index 0000000000000000000000000000000000000000..1a30ce5e413f8b5cf8b089f5155f45e7aba9f679 --- /dev/null +++ b/ide/src/doc/quickstart_memory_template.html @@ -0,0 +1,1516 @@ + + + + + quickstart_memory_template + + + + + + +
+

系统内存抓取和展示说明

+ +

系统内存分析模板帮助系统内存调优人员进行进程内存拆解。

+

系统内存的抓取

+ +

系统内存的抓取配置参数

+ +

+ 打开VM Tracker开关抓取内存数据。
+ GitHub Logo +

+

系统内存展示说明

+ +

+ 将抓取的内存文件导入到smartperf中,查看进程内存的情况。
+ GitHub Logo +

+

系统内存中Ability Monitor泳道图显示

+ +

+ Ability Monitor泳道图分为MemoryTotal,Cached,SwapTotal,System Purgeable Total,System Purgeable Pin,DMA,Skia + Gpu Memory泳道。
+ GitHub Logo +

+

系统内存中Ability Monitor泳道图点选功能

+ +

+ System Purgeable Total泳道图点选功能。
+ GitHub Logo +

+ +

+ System Purgeable Total泳道图框选功能。
+ GitHub Logo +

+ +

+ System Purgeable Pin泳道图点选功能。
+ GitHub Logo +

+ +

+ System Purgeable Pin泳道图框选功能。
+ GitHub Logo +

+ +

+ DMA泳道图点选功能。
+ GitHub Logo +

+ +

+ DMA泳道图框选功能。
+ GitHub Logo +

+ +

+ Skia Gpu Memory泳道图点选功能。
+ GitHub Logo +

+ +

+ Skia Gpu Memory泳道图框选功能。
+ GitHub Logo +

+ +

VM Tracker下的smaps泳道图展示

+ +

+ smaps泳道图分为Dirty,Swapped,RSS,PSS,USS泳道图。
+ GitHub Logo +

+

VM Tracker下的smaps泳道图的点选和框选功能

+ +

+ 点选和框选Dirty,Swapped,RSS,PSS,USS的5个泳道图中任一个显示的都是一样的内容,会显示Smaps Statistic和Smaps + sample的tab页。
+ Smaps Statistic的tab页展示。
+ GitHub Logo +

+ +

+ Smaps sample的tab页展示。
+ GitHub Logo +

+ +

VM Tracker下的GPU泳道图展示

+ +

+ smaps泳道图分为GL,Skia Gpu Dump Toal,Skia Gpu Dump Window,Skia Gpu Memory泳道图。
+ GitHub Logo
+ Skia Gpu Memory泳道图点选功能。
+ GitHub Logo +

+ +

+ Skia Gpu Memory泳道图框选功能。
+ GitHub Logo +

+ +

+ Gl泳道图框选功能。
+ GitHub Logo +

+ +

+ Skia Gpu Dump Toal泳道图点选功能。
+ GitHub Logo +

+ +

+ Skia Gpu Dump Toal泳道图框选功能。
+ GitHub Logo +

+ +

+ Skia Gpu Dump Window泳道图点选功能。
+ GitHub Logo +

+ +

+ Skia Gpu Dump Window泳道图框选功能。
+ GitHub Logo +

+ +
+ + + + diff --git a/ide/src/doc/quickstart_taskpool.html b/ide/src/doc/quickstart_taskpool.html new file mode 100644 index 0000000000000000000000000000000000000000..3f8a298cc4e4d3b59e3fecc792a383ef3f97b734 --- /dev/null +++ b/ide/src/doc/quickstart_taskpool.html @@ -0,0 +1,950 @@ + + + + + quickstart_taskpool + + + + + +
+

TaskPool抓取和展示说明

+ +

+ TaskPool分析模块主要展示应用程序使用taskpool时,任务的关联关系,任务调度开销和任务并发度分析情况,任务各阶段耗时情况,线程池的状态统计,队列任务数,任务是否超时。 +

+

TaskPool的抓取

+ +

TaskPool的抓取配置参数

+ +

+ 打开Task pool开关抓取taskpool数据。
+ GitHub Logo +

+

TaskPool展示说明

+ +

+ 将抓取的taskpool文件导入到smartperf中,查看任务的关联关系等信息。
+ GitHub Logo +

+

TaskPool的任务关联关系跟踪

+ +

+ 任务关联关系就是根据任务的executeId,把一个taskpool任务的各个执行的函数调用栈连接起来,用于表示一个任务从开始分发到执行,再到最后任务结束的整个过程。
+ GitHub Logo
+ 如上图所示,点击H:Task Perform: taskId : 2, executeId : + 2的调用栈会出现红色连线,红色连线展示了executeId是2的任务的关联关系,连接的调用栈分别是: +

+ +

TaskPool的并发度

+ +

+ 点选或者框选任务状态为执行会进行任务并发度展示,如图所示并发度是3。
+ GitHub Logo +

+

TaskPool泳道图的点选功能

+ +

+ 点选taskpool的Slice,展示该taskpool信息的tab页。
+ GitHub Logo +

+ +

TaskPool泳道图的框选功能

+ +

+ 框选taskpool的泳道图,展示Frames的tab页。
+ GitHub Logo +

+ +

TaskPool的队列任务数和线程池里线程状态统计

+ +

+ GitHub Logo
+ 如上图,H:threadNum,H:runningThreadNum,H:idleThreadNum,H:timeoutThreadNum是线程池里线程状态统计,H:taskNum是队列任务数。 +

+

TaskPool的任务超时退出

+ +

+ 在带有H:Thread Timeout Exit的调用栈的泳道图会采用黄色圆圈,中间为白色反叹号标记,代表任务超时退出。
+ GitHub Logo +

+
+ + + + diff --git a/ide/src/figures/Allmemory/abrow.jpg b/ide/src/figures/Allmemory/abrow.jpg new file mode 100644 index 0000000000000000000000000000000000000000..29109709f1f68c90bf17c3bf96cfa7d70360ae45 Binary files /dev/null and b/ide/src/figures/Allmemory/abrow.jpg differ diff --git a/ide/src/figures/Allmemory/allmemorycofig.jpg b/ide/src/figures/Allmemory/allmemorycofig.jpg new file mode 100644 index 0000000000000000000000000000000000000000..faf529a58e9cc2659853d452f65a46752e798106 Binary files /dev/null and b/ide/src/figures/Allmemory/allmemorycofig.jpg differ diff --git a/ide/src/figures/Allmemory/allmemoryrow.jpg b/ide/src/figures/Allmemory/allmemoryrow.jpg new file mode 100644 index 0000000000000000000000000000000000000000..fcc833db6bfe7c2ea0c699829a0c0c9b0a475dd8 Binary files /dev/null and b/ide/src/figures/Allmemory/allmemoryrow.jpg differ diff --git a/ide/src/figures/Allmemory/dmadrag.jpg b/ide/src/figures/Allmemory/dmadrag.jpg new file mode 100644 index 0000000000000000000000000000000000000000..79b6e4b1db8a615a2d03b8f3a050abae7cff999d Binary files /dev/null and b/ide/src/figures/Allmemory/dmadrag.jpg differ diff --git a/ide/src/figures/Allmemory/dmaselect.jpg b/ide/src/figures/Allmemory/dmaselect.jpg new file mode 100644 index 0000000000000000000000000000000000000000..5886259d977d9662d6ee4cfff87bcf3956ee519e Binary files /dev/null and b/ide/src/figures/Allmemory/dmaselect.jpg differ diff --git a/ide/src/figures/Allmemory/gpurow.jpg b/ide/src/figures/Allmemory/gpurow.jpg new file mode 100644 index 0000000000000000000000000000000000000000..095a211bc86e6c9aadb11978dd5d40c225b0e896 Binary files /dev/null and b/ide/src/figures/Allmemory/gpurow.jpg differ diff --git a/ide/src/figures/Allmemory/purpindrag.jpg b/ide/src/figures/Allmemory/purpindrag.jpg new file mode 100644 index 0000000000000000000000000000000000000000..86bdd309fda8b509409505b04026ed58015c005e Binary files /dev/null and b/ide/src/figures/Allmemory/purpindrag.jpg differ diff --git a/ide/src/figures/Allmemory/purpinselect.jpg b/ide/src/figures/Allmemory/purpinselect.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b28d6004fb7c56e439e9de150fbf89e407abb7fd Binary files /dev/null and b/ide/src/figures/Allmemory/purpinselect.jpg differ diff --git a/ide/src/figures/Allmemory/purtotaldrag.jpg b/ide/src/figures/Allmemory/purtotaldrag.jpg new file mode 100644 index 0000000000000000000000000000000000000000..36e974cf6fb45d7bbbb55f16ddd32227f6f67f54 Binary files /dev/null and b/ide/src/figures/Allmemory/purtotaldrag.jpg differ diff --git a/ide/src/figures/Allmemory/purtotalselect.jpg b/ide/src/figures/Allmemory/purtotalselect.jpg new file mode 100644 index 0000000000000000000000000000000000000000..05066691174124fd0212af1f535a097059e988c9 Binary files /dev/null and b/ide/src/figures/Allmemory/purtotalselect.jpg differ diff --git a/ide/src/figures/Allmemory/sgpumemdrag.jpg b/ide/src/figures/Allmemory/sgpumemdrag.jpg new file mode 100644 index 0000000000000000000000000000000000000000..eda32f90e976b67eeeeea499a756bbedacbc2a56 Binary files /dev/null and b/ide/src/figures/Allmemory/sgpumemdrag.jpg differ diff --git a/ide/src/figures/Allmemory/sgpumemselect.jpg b/ide/src/figures/Allmemory/sgpumemselect.jpg new file mode 100644 index 0000000000000000000000000000000000000000..742356c9e05122954f97dc65382766092427c3ed Binary files /dev/null and b/ide/src/figures/Allmemory/sgpumemselect.jpg differ diff --git a/ide/src/figures/Allmemory/smapsallrow.jpg b/ide/src/figures/Allmemory/smapsallrow.jpg new file mode 100644 index 0000000000000000000000000000000000000000..85eec940455c59bd6bedbe9e90c98cdb63004b98 Binary files /dev/null and b/ide/src/figures/Allmemory/smapsallrow.jpg differ diff --git a/ide/src/figures/Allmemory/ssampletab.jpg b/ide/src/figures/Allmemory/ssampletab.jpg new file mode 100644 index 0000000000000000000000000000000000000000..84ce148e6cdfc00620ed7836cd74fd9afb16933d Binary files /dev/null and b/ide/src/figures/Allmemory/ssampletab.jpg differ diff --git a/ide/src/figures/Allmemory/sstaaticstab.jpg b/ide/src/figures/Allmemory/sstaaticstab.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f80e1fc88821b199374c478468bb6d8513ac21a9 Binary files /dev/null and b/ide/src/figures/Allmemory/sstaaticstab.jpg differ diff --git a/ide/src/figures/Allmemory/vglrag.jpg b/ide/src/figures/Allmemory/vglrag.jpg new file mode 100644 index 0000000000000000000000000000000000000000..fe6fd5035bf3b161722ff4195b5ec6f5fd5b2950 Binary files /dev/null and b/ide/src/figures/Allmemory/vglrag.jpg differ diff --git a/ide/src/figures/Allmemory/vgpumemdrag.jpg b/ide/src/figures/Allmemory/vgpumemdrag.jpg new file mode 100644 index 0000000000000000000000000000000000000000..a9dcd11725f10bd3aab314ed1604ba5a5810f3e0 Binary files /dev/null and b/ide/src/figures/Allmemory/vgpumemdrag.jpg differ diff --git a/ide/src/figures/Allmemory/vgpumemselect.jpg b/ide/src/figures/Allmemory/vgpumemselect.jpg new file mode 100644 index 0000000000000000000000000000000000000000..3bb350345582cb380051032146ab3a1a0fba983e Binary files /dev/null and b/ide/src/figures/Allmemory/vgpumemselect.jpg differ diff --git a/ide/src/figures/Allmemory/vgputotaldrag.jpg b/ide/src/figures/Allmemory/vgputotaldrag.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b5b0e93ceab99921bd200e98d5307be2add73ff4 Binary files /dev/null and b/ide/src/figures/Allmemory/vgputotaldrag.jpg differ diff --git a/ide/src/figures/Allmemory/vgputotalselect.jpg b/ide/src/figures/Allmemory/vgputotalselect.jpg new file mode 100644 index 0000000000000000000000000000000000000000..45f1630d99015a4bf1bccddade0ed9fad0d86e81 Binary files /dev/null and b/ide/src/figures/Allmemory/vgputotalselect.jpg differ diff --git a/ide/src/figures/Allmemory/vgpuwindowdrag.jpg b/ide/src/figures/Allmemory/vgpuwindowdrag.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e0b0ae1912ebd827bd924fb83bb46a4e3f205f64 Binary files /dev/null and b/ide/src/figures/Allmemory/vgpuwindowdrag.jpg differ diff --git a/ide/src/figures/Allmemory/vgpuwindowselect.jpg b/ide/src/figures/Allmemory/vgpuwindowselect.jpg new file mode 100644 index 0000000000000000000000000000000000000000..37578d124aa94f5dee7462f1d912b5b3e0006ac8 Binary files /dev/null and b/ide/src/figures/Allmemory/vgpuwindowselect.jpg differ diff --git a/ide/src/figures/Taskpool/taskpoolconcurrency.jpg b/ide/src/figures/Taskpool/taskpoolconcurrency.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e35e112ca1ad0cbbfde946c48d02560857207b77 Binary files /dev/null and b/ide/src/figures/Taskpool/taskpoolconcurrency.jpg differ diff --git a/ide/src/figures/Taskpool/taskpoolconfig.jpg b/ide/src/figures/Taskpool/taskpoolconfig.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c259b52a845c334b76521ed4eae91dc94e765c41 Binary files /dev/null and b/ide/src/figures/Taskpool/taskpoolconfig.jpg differ diff --git a/ide/src/figures/Taskpool/taskpooldrag.jpg b/ide/src/figures/Taskpool/taskpooldrag.jpg new file mode 100644 index 0000000000000000000000000000000000000000..75a5a9cf0bfffeeac4dd3463135962e4168037ee Binary files /dev/null and b/ide/src/figures/Taskpool/taskpooldrag.jpg differ diff --git a/ide/src/figures/Taskpool/taskpoolexit.jpg b/ide/src/figures/Taskpool/taskpoolexit.jpg new file mode 100644 index 0000000000000000000000000000000000000000..5ba6e62a4ca6bb8c38e2f52d3235f1f2d698c412 Binary files /dev/null and b/ide/src/figures/Taskpool/taskpoolexit.jpg differ diff --git a/ide/src/figures/Taskpool/taskpoolnum.jpg b/ide/src/figures/Taskpool/taskpoolnum.jpg new file mode 100644 index 0000000000000000000000000000000000000000..ba4c546ebb9295414eb6e389ae1910c02e9041ca Binary files /dev/null and b/ide/src/figures/Taskpool/taskpoolnum.jpg differ diff --git a/ide/src/figures/Taskpool/taskpoolrelation.jpg b/ide/src/figures/Taskpool/taskpoolrelation.jpg new file mode 100644 index 0000000000000000000000000000000000000000..8095ab3d030fa5c401453697269b1b4844e74b39 Binary files /dev/null and b/ide/src/figures/Taskpool/taskpoolrelation.jpg differ diff --git a/ide/src/figures/Taskpool/taskpoolrow.jpg b/ide/src/figures/Taskpool/taskpoolrow.jpg new file mode 100644 index 0000000000000000000000000000000000000000..1901acbdce6aace3e2893ba26057c13519613b84 Binary files /dev/null and b/ide/src/figures/Taskpool/taskpoolrow.jpg differ diff --git a/ide/src/figures/Taskpool/taskpoolselect.jpg b/ide/src/figures/Taskpool/taskpoolselect.jpg new file mode 100644 index 0000000000000000000000000000000000000000..7c77a7b3fd9bd754108b135f46e7d66e6f868ed3 Binary files /dev/null and b/ide/src/figures/Taskpool/taskpoolselect.jpg differ diff --git a/ide/src/figures/animation/anieffectcurv.jpg b/ide/src/figures/animation/anieffectcurv.jpg new file mode 100644 index 0000000000000000000000000000000000000000..65e504c5f173b48ff8f5c6e62f181371cd9b49b0 Binary files /dev/null and b/ide/src/figures/animation/anieffectcurv.jpg differ diff --git a/ide/src/figures/animation/anieffectcurvdrag.jpg b/ide/src/figures/animation/anieffectcurvdrag.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e19958e7b472d73544d7929ecd4652f81512f091 Binary files /dev/null and b/ide/src/figures/animation/anieffectcurvdrag.jpg differ diff --git a/ide/src/figures/animation/anieffectcurvselect.jpg b/ide/src/figures/animation/anieffectcurvselect.jpg new file mode 100644 index 0000000000000000000000000000000000000000..43c285a0da419477729b394e0c86e9466125e2b1 Binary files /dev/null and b/ide/src/figures/animation/anieffectcurvselect.jpg differ diff --git a/ide/src/figures/animation/animationconfig.jpg b/ide/src/figures/animation/animationconfig.jpg new file mode 100644 index 0000000000000000000000000000000000000000..bd01d2b01f0196bf30c858b466bcb80c900e590b Binary files /dev/null and b/ide/src/figures/animation/animationconfig.jpg differ diff --git a/ide/src/figures/animation/anispacingdrag.jpg b/ide/src/figures/animation/anispacingdrag.jpg new file mode 100644 index 0000000000000000000000000000000000000000..a8cba8008d11845cc89be83e7ac01d8979503b4d Binary files /dev/null and b/ide/src/figures/animation/anispacingdrag.jpg differ diff --git a/ide/src/figures/animation/anispacingselect.jpg b/ide/src/figures/animation/anispacingselect.jpg new file mode 100644 index 0000000000000000000000000000000000000000..630ea2df4a05cd6113e207855aeedace67c7173f Binary files /dev/null and b/ide/src/figures/animation/anispacingselect.jpg differ diff --git a/ide/src/figures/animation/anrsallrow.jpg b/ide/src/figures/animation/anrsallrow.jpg new file mode 100644 index 0000000000000000000000000000000000000000..ee6edbdf799cb21c61b1c1d66dd8b924c80435ee Binary files /dev/null and b/ide/src/figures/animation/anrsallrow.jpg differ diff --git a/ide/src/figures/animation/anrsdelayrow.jpg b/ide/src/figures/animation/anrsdelayrow.jpg new file mode 100644 index 0000000000000000000000000000000000000000..102c3cac6ae391cf403139e5b0bde7e17941cea2 Binary files /dev/null and b/ide/src/figures/animation/anrsdelayrow.jpg differ diff --git a/ide/src/figures/animation/framespacirow.jpg b/ide/src/figures/animation/framespacirow.jpg new file mode 100644 index 0000000000000000000000000000000000000000..2abdad53efaa5e530b2e80f6e7e73e301fbbf2fc Binary files /dev/null and b/ide/src/figures/animation/framespacirow.jpg differ diff --git a/ide/src/figures/appstartup/appstartupconfig.jpg b/ide/src/figures/appstartup/appstartupconfig.jpg new file mode 100644 index 0000000000000000000000000000000000000000..bbdfe9b048453b30b16d394ec405dc7403feaf2f Binary files /dev/null and b/ide/src/figures/appstartup/appstartupconfig.jpg differ diff --git a/ide/src/figures/appstartup/appstartupdrag.jpg b/ide/src/figures/appstartup/appstartupdrag.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f2685cbf994209df9cf9ef8e4b860566e5643870 Binary files /dev/null and b/ide/src/figures/appstartup/appstartupdrag.jpg differ diff --git a/ide/src/figures/appstartup/appstartupjump.jpg b/ide/src/figures/appstartup/appstartupjump.jpg new file mode 100644 index 0000000000000000000000000000000000000000..908d08f1f78f956e69d649f3c5a58a0f0f6ec350 Binary files /dev/null and b/ide/src/figures/appstartup/appstartupjump.jpg differ diff --git a/ide/src/figures/appstartup/appstartuprow.jpg b/ide/src/figures/appstartup/appstartuprow.jpg new file mode 100644 index 0000000000000000000000000000000000000000..fd4352512879725ee74f7271855b3beafd1d6798 Binary files /dev/null and b/ide/src/figures/appstartup/appstartuprow.jpg differ diff --git a/ide/src/figures/appstartup/appstartupslice.jpg b/ide/src/figures/appstartup/appstartupslice.jpg new file mode 100644 index 0000000000000000000000000000000000000000..4d0746c1c6deba135a51085b1fa6ccb21ddc9783 Binary files /dev/null and b/ide/src/figures/appstartup/appstartupslice.jpg differ diff --git a/ide/src/figures/appstartup/staticinitilizationdrag.jpg b/ide/src/figures/appstartup/staticinitilizationdrag.jpg new file mode 100644 index 0000000000000000000000000000000000000000..dcad07e3ca77b6dd8f7c26b9c9f8b30eb4e6ce45 Binary files /dev/null and b/ide/src/figures/appstartup/staticinitilizationdrag.jpg differ diff --git a/ide/src/figures/appstartup/staticinitilizationjump.jpg b/ide/src/figures/appstartup/staticinitilizationjump.jpg new file mode 100644 index 0000000000000000000000000000000000000000..ce1dd133e30010982c3bc10242a0dcb5742eceee Binary files /dev/null and b/ide/src/figures/appstartup/staticinitilizationjump.jpg differ diff --git a/ide/src/figures/appstartup/staticinitilizationrow.jpg b/ide/src/figures/appstartup/staticinitilizationrow.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e5391ec7d5bc5fd800e1f8b2d8ba4173c20a1a44 Binary files /dev/null and b/ide/src/figures/appstartup/staticinitilizationrow.jpg differ diff --git a/ide/src/figures/appstartup/staticinitilizationslice.jpg b/ide/src/figures/appstartup/staticinitilizationslice.jpg new file mode 100644 index 0000000000000000000000000000000000000000..5c8c4657dc9b19403627fddc34deb590f713b46c Binary files /dev/null and b/ide/src/figures/appstartup/staticinitilizationslice.jpg differ diff --git a/ide/src/figures/arkts/cpuprofilerconfig.jpg b/ide/src/figures/arkts/cpuprofilerconfig.jpg new file mode 100644 index 0000000000000000000000000000000000000000..1bc9ac5a1250212568c7f66314e1cdcac0c0bdf5 Binary files /dev/null and b/ide/src/figures/arkts/cpuprofilerconfig.jpg differ diff --git a/ide/src/figures/arkts/cpuprofilerdragb.jpg b/ide/src/figures/arkts/cpuprofilerdragb.jpg new file mode 100644 index 0000000000000000000000000000000000000000..cd445d1111ef40ee7cc8461e6e2bb742da10eb01 Binary files /dev/null and b/ide/src/figures/arkts/cpuprofilerdragb.jpg differ diff --git a/ide/src/figures/arkts/cpuprofilerdragc.jpg b/ide/src/figures/arkts/cpuprofilerdragc.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e120e59317397959e2f91ff9ae7c813739532aac Binary files /dev/null and b/ide/src/figures/arkts/cpuprofilerdragc.jpg differ diff --git a/ide/src/figures/arkts/cpuprofilerdrags.jpg b/ide/src/figures/arkts/cpuprofilerdrags.jpg new file mode 100644 index 0000000000000000000000000000000000000000..7d1265f5585883a225ab36c19d7e1e1e8ace13af Binary files /dev/null and b/ide/src/figures/arkts/cpuprofilerdrags.jpg differ diff --git a/ide/src/figures/arkts/cpuprofilerheavib.jpg b/ide/src/figures/arkts/cpuprofilerheavib.jpg new file mode 100644 index 0000000000000000000000000000000000000000..4804c3a423828b86e402feb31724ab823515f215 Binary files /dev/null and b/ide/src/figures/arkts/cpuprofilerheavib.jpg differ diff --git a/ide/src/figures/arkts/cpuprofilerheavic.jpg b/ide/src/figures/arkts/cpuprofilerheavic.jpg new file mode 100644 index 0000000000000000000000000000000000000000..77224b8d2d5869f449663b1fcc61713be0a24b6c Binary files /dev/null and b/ide/src/figures/arkts/cpuprofilerheavic.jpg differ diff --git a/ide/src/figures/arkts/cpuprofilerrow.jpg b/ide/src/figures/arkts/cpuprofilerrow.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f506c28e3fd13ef3a1ec051252e3f3bd9d4c64a1 Binary files /dev/null and b/ide/src/figures/arkts/cpuprofilerrow.jpg differ diff --git a/ide/src/figures/arkts/cpuprofilerselectb.jpg b/ide/src/figures/arkts/cpuprofilerselectb.jpg new file mode 100644 index 0000000000000000000000000000000000000000..64c5963175be4c9514324777992e675de512f180 Binary files /dev/null and b/ide/src/figures/arkts/cpuprofilerselectb.jpg differ diff --git a/ide/src/figures/arkts/cpuprofilerselectc.jpg b/ide/src/figures/arkts/cpuprofilerselectc.jpg new file mode 100644 index 0000000000000000000000000000000000000000..201ecec956131f2d1d54f2c664bd9d2b8becfe1e Binary files /dev/null and b/ide/src/figures/arkts/cpuprofilerselectc.jpg differ diff --git a/ide/src/figures/arkts/cpuprofilerselects.jpg b/ide/src/figures/arkts/cpuprofilerselects.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b1afe774dda2ed0ead098ee9b4694414d1cdeb4c Binary files /dev/null and b/ide/src/figures/arkts/cpuprofilerselects.jpg differ diff --git a/ide/src/figures/arkts/cpuprofilertip.jpg b/ide/src/figures/arkts/cpuprofilertip.jpg new file mode 100644 index 0000000000000000000000000000000000000000..d3aea974f8d50fa49588aa8311c3a2a523e86321 Binary files /dev/null and b/ide/src/figures/arkts/cpuprofilertip.jpg differ diff --git a/ide/src/js-heap/logic/HeapLoader.ts b/ide/src/js-heap/logic/HeapLoader.ts index 750f9744c5eb8d7c9688b253fe93a119a5743f0f..3bfcbb69d060ea144c96bd19c125f79e6ff74727 100644 --- a/ide/src/js-heap/logic/HeapLoader.ts +++ b/ide/src/js-heap/logic/HeapLoader.ts @@ -925,22 +925,7 @@ export class HeapLoader { let clickNode = childNodes[0].parent; // If there are duplicate IDs in the third layer and beyond, they will not be expanded again if (clickNode!.type == ConstructorType.FiledType) { - function findParents(clickNode: any, parents: any): any { - if (!clickNode.parent) { - return parents; - } - // add the parent of the current node to the result array - parents.push(clickNode); - for (let childNode of childNodes) { - for (let p of parents) { - if (p.id === childNode!.id) { - childNode.hasNext = false; - } - } - } - return findParents(clickNode.parent, parents); - } - findParents(clickNode, []); + this.findParentsFunc(childNodes, clickNode); } let filterChildNodes = new Array(); for (let item of childNodes) { @@ -952,6 +937,25 @@ export class HeapLoader { return filterChildNodes; } + private findParentsFunc(childNodes: ConstructorItem[], clickNode: ConstructorItem) { + function findParents(clickNode: any, parents: any): any { + if (!clickNode.parent) { + return parents; + } + // add the parent of the current node to the result array + parents.push(clickNode); + for (let childNode of childNodes) { + for (let heapParent of parents) { + if (heapParent.id === childNode!.id) { + childNode.hasNext = false; + } + } + } + return findParents(clickNode.parent, parents); + } + findParents(clickNode, []); + } + /** * get nodes which referenced this node * @param constructor current node @@ -1004,22 +1008,7 @@ export class HeapLoader { let clickNode = retains[0].parent; // If there are duplicate IDs in the third layer and beyond, they will not be expanded again if (clickNode!.type == ConstructorType.RetainersType) { - function findParents(clickNode: any, parents: any): any { - if (!clickNode.parent) { - return parents; - } - // add the parent of the current node to the result array - parents.push(clickNode); - for (let childNode of retains) { - for (let p of parents) { - if (p.id === childNode!.id) { - childNode.hasNext = false; - } - } - } - return findParents(clickNode.parent, parents); - } - findParents(clickNode, []); + this.findParentsFunc(retains, clickNode); } } diff --git a/ide/src/trace/SpApplication.ts b/ide/src/trace/SpApplication.ts index 02ad225ba96917337161bcf4b4f99d81bd23de62..17ab0331f245f0e200dc10da88768c148f539e24 100644 --- a/ide/src/trace/SpApplication.ts +++ b/ide/src/trace/SpApplication.ts @@ -870,6 +870,10 @@ export class SpApplication extends BaseElement { title: 'Help Documents', icon: 'smart-help', clickHandler: function (item: MenuItem) { + SpStatisticsHttpUtil.addOrdinaryVisitAction({ + event: 'help_page', + action: 'help_doc', + }); that.search = false; that.spHelp!.dark = that.dark; showContent(that.spHelp!); @@ -1097,25 +1101,25 @@ export class SpApplication extends BaseElement { title: 'Help Documents', icon: 'smart-help', clickHandler: function (item: MenuItem) { + that.spHelp!.dark = that.dark; + that.search = false; + showContent(that.spHelp!); SpStatisticsHttpUtil.addOrdinaryVisitAction({ event: 'help_page', action: 'help_doc', }); - that.search = false; - that.spHelp!.dark = that.dark; - showContent(that.spHelp!); }, }, { title: 'Flags', icon: 'menu', clickHandler: function (item: MenuItem) { + that.search = false; + showContent(spFlags); SpStatisticsHttpUtil.addOrdinaryVisitAction({ event: 'flags', action: 'flags', }); - that.search = false; - showContent(spFlags); }, }, ], diff --git a/ide/src/trace/bean/NativeHook.ts b/ide/src/trace/bean/NativeHook.ts index ac38f7340d1a2a3fe8cb22a0095ccc1f3c559940..f868568d1aeac940704b6efa025d505f2fde2378 100644 --- a/ide/src/trace/bean/NativeHook.ts +++ b/ide/src/trace/bean/NativeHook.ts @@ -75,9 +75,10 @@ export class NativeHookStatisticsTableData { export class NativeMemory { index: number = 0; eventId: number = 0; + threadId: number = 0; + threadName: string = ''; eventType: string = ''; subType: string = ''; - addr: string = ''; startTs: number = 0; endTs: number = 0; timestamp: string = ''; @@ -87,8 +88,7 @@ export class NativeMemory { library: string = ''; isSelected: boolean = false; state: string = ''; - threadId: number = 0; - threadName: string = ''; + addr: string = ''; } export class NativeHookSamplerInfo { diff --git a/ide/src/trace/bean/PerfProfile.ts b/ide/src/trace/bean/PerfProfile.ts index 3c0aef060eb105ef7d0b114f8a6b3b0236bdc264..4cb49d2e0240ab44515097a27ee89a5ac3335c0f 100644 --- a/ide/src/trace/bean/PerfProfile.ts +++ b/ide/src/trace/bean/PerfProfile.ts @@ -16,20 +16,20 @@ import { ChartStruct } from '../../trace/bean/FrameChartStruct.js'; export class PerfFile { + path: string = ''; fileId: number = 0; symbol: string = ''; - path: string = ''; fileName: string = ''; - static setFileName(data: PerfFile) { - if (data.path) { - let number = data.path.lastIndexOf('/'); + static setFileName(perfData: PerfFile) { + if (perfData.path) { + let number = perfData.path.lastIndexOf('/'); if (number > 0) { - data.fileName = data.path.substring(number + 1); + perfData.fileName = perfData.path.substring(number + 1); return; } } - data.fileName = data.path; + perfData.fileName = perfData.path; } } @@ -49,23 +49,23 @@ export class PerfCall { export class PerfCallChain { tid: number = 0; pid: number = 0; + parentId: string = ''; //合并之后区分的id + id: string = ''; + fileId: number = 0; + symbolId: number = 0; + topDownMerageId: string = ''; //top down合并使用的id + topDownMerageParentId: string = ''; //top down合并使用的id + bottomUpMerageId: string = ''; //bottom up合并使用的id + bottomUpMerageParentId: string = ''; //bottom up合并使用的id + sampleId: number = 0; + callChainId: number = 0; name: string = ''; fileName: string = ''; threadState: string = ''; startNS: number = 0; dur: number = 0; - sampleId: number = 0; - callChainId: number = 0; vaddrInFile: number = 0; - fileId: number = 0; - symbolId: number = 0; path: string = ''; - parentId: string = ''; //合并之后区分的id - id: string = ''; - topDownMerageId: string = ''; //top down合并使用的id - topDownMerageParentId: string = ''; //top down合并使用的id - bottomUpMerageId: string = ''; //bottom up合并使用的id - bottomUpMerageParentId: string = ''; //bottom up合并使用的id depth: number = 0; canCharge: boolean = true; previousNode: PerfCallChain | undefined = undefined; //将list转换为一个链表结构 @@ -75,25 +75,25 @@ export class PerfCallChain { export class PerfCallChainMerageData extends ChartStruct { id: string = ''; parentId: string = ''; + tid: number = 0; + pid: number = 0; currentTreeParentNode: PerfCallChainMerageData | undefined = undefined; symbolName: string = ''; - symbol: string = ''; libName: string = ''; + symbol: string = ''; path: string = ''; self: string = '0s'; weight: string = ''; weightPercent: string = ''; selfDur: number = 0; dur: number = 0; - tid: number = 0; - pid: number = 0; - isStore = 0; - canCharge: boolean = true; children: PerfCallChainMerageData[] = []; initChildren: PerfCallChainMerageData[] = []; + isStore = 0; + isSelected: boolean = false; + canCharge: boolean = true; type: number = 0; vaddrInFile: number = 0; - isSelected: boolean = false; searchShow: boolean = true; } diff --git a/ide/src/trace/bean/ProcessStruct.ts b/ide/src/trace/bean/ProcessStruct.ts index b5fdb07b92f7a3677ecf2eec28e97726f47243b7..ba70e89fecd8c72cb08e30bbbe05f44177c0c955 100644 --- a/ide/src/trace/bean/ProcessStruct.ts +++ b/ide/src/trace/bean/ProcessStruct.ts @@ -20,18 +20,18 @@ import { CpuStruct } from '../database/ui-worker/ProcedureWorkerCPU.js'; const padding = 1; export class ProcessStruct extends BaseStruct { + startTime: number | undefined; cpu: number | undefined; dur: number | undefined; id: number | undefined; + utid: number | undefined; pid: number | undefined; process: string | undefined; - startTime: number | undefined; state: string | undefined; thread: string | undefined; tid: number | undefined; ts: number | undefined; type: string | undefined; - utid: number | undefined; static draw(processBeanCanvasCtx: CanvasRenderingContext2D, processBeanStruct: ProcessStruct) { if (processBeanStruct.frame) { diff --git a/ide/src/trace/bean/StateProcessThread.ts b/ide/src/trace/bean/StateProcessThread.ts index aaad55f10cca0a92555b0ecb708595e86fbd1333..51fb00651d1cb1b940260f88fc0665fc2ae96258 100644 --- a/ide/src/trace/bean/StateProcessThread.ts +++ b/ide/src/trace/bean/StateProcessThread.ts @@ -51,39 +51,15 @@ export class SPTChild { } export class SPT { - process: string = ''; - processId: number = 0; - thread: string = ''; - threadId: number = 0; - state: string = ''; - dur: number = 0; start_ts: number = 0; end_ts: number = 0; - cpu: number = 0; - priority: string = '-'; - note: string = '-'; -} - -export class ThreadState { - itid: number = 0; state: string = ''; dur: number = 0; - ts: number = 0; - end_ts: number = 0; - start_ts: number = 0; cpu: number = 0; -} - -export class ThreadProcess { - id: number = 0; - threadId: number = 0; - thread: string = ''; - processId: number = 0; + priority: string = '-'; + note: string = '-'; process: string = ''; -} - -export class SptSlice { - itid: number = 0; - ts: number = 0; - priority: number = 0; + processId: number = 0; + thread: string = ''; + threadId: number = 0; } diff --git a/ide/src/trace/bean/WakeupBean.ts b/ide/src/trace/bean/WakeupBean.ts index 616af8cba6a48641a60e5bdd05d9cabe2430960d..9d7783f18f25eaf5ac6c87c3e4f7e67d2278dc0b 100644 --- a/ide/src/trace/bean/WakeupBean.ts +++ b/ide/src/trace/bean/WakeupBean.ts @@ -14,14 +14,14 @@ */ export class WakeupBean { + thread: string | undefined; wakeupTime: number | undefined; cpu: number | undefined; process: string | undefined; pid: number | undefined; - thread: string | undefined; tid: number | undefined; - schedulingLatency: number | undefined; schedulingDesc: string | undefined; ts: number | undefined; itid: number | undefined; + schedulingLatency: number | undefined; } diff --git a/ide/src/trace/component/SpFlags.ts b/ide/src/trace/component/SpFlags.ts index d1c94b495ed642b3c2657e00729a0555fd0ab270..41294fa1bb7bb064d6132a47dea06760f79b8a59 100644 --- a/ide/src/trace/component/SpFlags.ts +++ b/ide/src/trace/component/SpFlags.ts @@ -30,7 +30,7 @@ export class SpFlags extends BaseElement { initHtml(): string { return ` ${this.initHtmlStyle()} -
+

Feature flags

@@ -41,18 +41,18 @@ export class SpFlags extends BaseElement { private initHtmlStyle(): string { return ` -
+
diff --git a/ide/src/trace/component/SpMetrics.ts b/ide/src/trace/component/SpMetrics.ts index 9da9eb51aa46cbca1ea016fd1173a2b57ebaae01..4383f0e3f8ba0ff0ace28825a4e5a336aa9cdb48 100644 --- a/ide/src/trace/component/SpMetrics.ts +++ b/ide/src/trace/component/SpMetrics.ts @@ -293,20 +293,18 @@ export class SpMetrics extends BaseElement { text-align: left; width: 100%; } - ::-webkit-scrollbar - { - width: 8px; - background-color: var(--dark-background3,#FFFFFF); - } - ::-webkit-scrollbar-thumb - { - border-radius: 6px; + ::-webkit-scrollbar-thumb{ background-color: var(--dark-background7,rgba(0,0,0,0.1)); + border-radius: 6px; } .sp-load-metric{ width: 95%; bottom: 0; } + ::-webkit-scrollbar{ + background-color: var(--dark-background3,#FFFFFF); + width: 8px; + }
diff --git a/ide/src/trace/component/SpQuerySQL.ts b/ide/src/trace/component/SpQuerySQL.ts index d8d3b9b259d9b0f1a0eb0336215325bf324dd4a6..2b645bffc26a8ddcc01e4a61cfa330ca11e5bf6b 100644 --- a/ide/src/trace/component/SpQuerySQL.ts +++ b/ide/src/trace/component/SpQuerySQL.ts @@ -370,13 +370,11 @@ export class SpQuerySQL extends BaseElement { .sql-select{ background-color: var(--dark-background5, #F6F6F6); } - ::-webkit-scrollbar - { + ::-webkit-scrollbar{ width: 8px; background-color: var(--dark-background3,#FFFFFF); } - ::-webkit-scrollbar-thumb - { + ::-webkit-scrollbar-thumb{ border-radius: 6px; background-color: var(--dark-background7,rgba(0,0,0,0.1)); } diff --git a/ide/src/trace/component/SpRecordTrace.ts b/ide/src/trace/component/SpRecordTrace.ts index 8c1930e60dbc0d011bad2c8f9e3dfb0290450ad6..8c6553a7202dcb6ffe504830f43baec6763695ee 100644 --- a/ide/src/trace/component/SpRecordTrace.ts +++ b/ide/src/trace/component/SpRecordTrace.ts @@ -484,8 +484,9 @@ export class SpRecordTrace extends BaseElement { } else { SpRecordTrace.selectVersion = SpRecordTrace.supportVersions[0]; this.setDeviceVersionSelect(SpRecordTrace.selectVersion); + let cmdTxt = PluginConvertUtils.BeanToCmdTxt(this.makeRequest(), false) this.traceCommand!.hdcCommon = PluginConvertUtils.createHdcCmd( - PluginConvertUtils.BeanToCmdTxt(this.makeRequest(), false), + cmdTxt, this.recordSetting!.output, this.recordSetting!.maxDur ); @@ -766,7 +767,7 @@ export class SpRecordTrace extends BaseElement { title: 'Record setting', icon: 'properties', fileChoose: false, - clickHandler: function (ev: InputEvent): void { + clickHandler: function (event: InputEvent): void { that.appContent!.innerHTML = ''; that.appContent!.append(that.recordSetting!); that.freshMenuItemsStatus('Record setting'); @@ -1435,18 +1436,18 @@ export class SpRecordTrace extends BaseElement { height: 32px; margin-left: 14px; margin-right: 10px; - background: var(--dark-background1,#ffffff); border: 1px solid var(--dark-color1,#4D4D4D); + background: var(--dark-background1,#ffffff); + font-size: 14px; border-radius: 16px; opacity: 0.6; + -webkit-appearance: none; font-family: Helvetica; - font-size: 14px; color: var(--dark-color1,#000000); - text-align: center; line-height: 20px; font-weight: 400; padding: 5px 10px 5px 10px; - -webkit-appearance: none; + text-align: center; background: url('img/down.png') no-repeat 96% center; } .device_version { diff --git a/ide/src/trace/component/SpRecyclerSystemTrace.ts b/ide/src/trace/component/SpRecyclerSystemTrace.ts index e42a6d0cb091779c045b4e7bad3bafae303ef856..93582100df6674d0a1e548fa8ec4a3ad9d103c85 100644 --- a/ide/src/trace/component/SpRecyclerSystemTrace.ts +++ b/ide/src/trace/component/SpRecyclerSystemTrace.ts @@ -295,10 +295,10 @@ export class SpRecyclerSystemTrace extends BaseElement { this.init({ url: url }).then(() => { let scrollTop = this.rowsEL?.scrollTop || 0; let scrollHeight = this.rowsEL?.clientHeight || 0; - this.rowsEL?.querySelectorAll('trace-row').forEach((it: any) => { - let top = it.offsetTop - (this.rowsEL?.offsetTop || 0); - if (top + it.clientHeight > scrollTop && top + it.clientHeight < scrollTop + scrollHeight + it.clientHeight) { - (it as TraceRow).dataListCache.length = 0; + this.rowsEL?.querySelectorAll('trace-row').forEach((rowItem: any) => { + let top = rowItem.offsetTop - (this.rowsEL?.offsetTop || 0); + if (top + rowItem.clientHeight > scrollTop && top + rowItem.clientHeight < scrollTop + scrollHeight + rowItem.clientHeight) { + (rowItem as TraceRow).dataListCache.length = 0; } }); if (complete) { @@ -311,10 +311,10 @@ export class SpRecyclerSystemTrace extends BaseElement { this.init({ buf }).then(() => { let scrollTop = this.rowsEL?.scrollTop || 0; let scrollHeight = this.rowsEL?.clientHeight || 0; - this.rowsEL?.querySelectorAll('trace-row').forEach((it: any) => { - let top = it.offsetTop - (this.rowsEL?.offsetTop || 0); - if (top + it.clientHeight > scrollTop && top + it.clientHeight < scrollTop + scrollHeight + it.clientHeight) { - (it as TraceRow).dataListCache.length = 0; + this.rowsEL?.querySelectorAll('trace-row').forEach((item: any) => { + let top = item.offsetTop - (this.rowsEL?.offsetTop || 0); + if (top + item.clientHeight > scrollTop && top + item.clientHeight < scrollTop + scrollHeight + item.clientHeight) { + (item as TraceRow).dataListCache.length = 0; } }); if (complete) { @@ -361,28 +361,28 @@ export class SpRecyclerSystemTrace extends BaseElement { CpuStruct.cpuCount = cpuMax + 1; for (let i1 = 0; i1 < CpuStruct.cpuCount; i1++) { const cpuId = i1; - let traceRow = new TraceRowObject(); - traceRow.rowId = `${cpuId}`; - traceRow.rowType = TraceRow.ROW_TYPE_CPU; - traceRow.rowParentId = ''; - traceRow.rowHeight = 40; - traceRow.frame = new Rect(0, 0, this.rowsEL.clientWidth - 248, traceRow.rowHeight); - traceRow.name = `Cpu ${cpuId}`; - traceRow.supplier = () => queryCpuData(cpuId, 0, this.timerShaftEL?.totalNS || 0); - traceRow.onThreadHandler = (row, ctx) => { + let cpuTraceRow = new TraceRowObject(); + cpuTraceRow.rowId = `${cpuId}`; + cpuTraceRow.rowType = TraceRow.ROW_TYPE_CPU; + cpuTraceRow.rowParentId = ''; + cpuTraceRow.rowHeight = 40; + cpuTraceRow.frame = new Rect(0, 0, this.rowsEL.clientWidth - 248, cpuTraceRow.rowHeight); + cpuTraceRow.name = `Cpu ${cpuId}`; + cpuTraceRow.supplier = () => queryCpuData(cpuId, 0, this.timerShaftEL?.totalNS || 0); + cpuTraceRow.onThreadHandler = (row, ctx) => { procedurePool.submitWithName( 'cpu', `cpu${cpuId}`, { - list: traceRow.must ? traceRow.dataList : undefined, + list: cpuTraceRow.must ? cpuTraceRow.dataList : undefined, startNS: TraceRow.range?.startNS || 0, endNS: TraceRow.range?.endNS || 0, totalNS: TraceRow.range?.totalNS || 0, - frame: traceRow.frame, + frame: cpuTraceRow.frame, }, (res: any) => { - traceRow.dataListCache = res; - traceRow.must = false; + cpuTraceRow.dataListCache = res; + cpuTraceRow.must = false; row.clearCanvas(); row.c!.beginPath(); row.drawLines(); @@ -394,7 +394,7 @@ export class SpRecyclerSystemTrace extends BaseElement { } ); }; - objs.push(traceRow); + objs.push(cpuTraceRow); } } return objs; @@ -422,28 +422,28 @@ export class SpRecyclerSystemTrace extends BaseElement { math(); for (let i = 0; i < freqList.length; i++) { const it = freqList[i]; - let traceRow = new TraceRowObject(); - traceRow.rowId = `${it.cpu}`; - traceRow.rowType = TraceRow.ROW_TYPE_CPU_FREQ; - traceRow.rowParentId = ''; - traceRow.rowHeight = 40; - traceRow.frame = new Rect(0, 0, this.rowsEL.clientWidth - 248, traceRow.rowHeight); - traceRow.name = `Cpu ${it.cpu} Frequency`; - traceRow.supplier = () => queryCpuFreqData(it.cpu); - traceRow.onThreadHandler = (row, ctx) => { + let cpuFreqTraceRow = new TraceRowObject(); + cpuFreqTraceRow.rowId = `${it.cpu}`; + cpuFreqTraceRow.rowType = TraceRow.ROW_TYPE_CPU_FREQ; + cpuFreqTraceRow.rowParentId = ''; + cpuFreqTraceRow.rowHeight = 40; + cpuFreqTraceRow.frame = new Rect(0, 0, this.rowsEL.clientWidth - 248, cpuFreqTraceRow.rowHeight); + cpuFreqTraceRow.name = `Cpu ${it.cpu} Frequency`; + cpuFreqTraceRow.supplier = () => queryCpuFreqData(it.cpu); + cpuFreqTraceRow.onThreadHandler = (row, ctx) => { procedurePool.submitWithName( 'freq', `freq${it.cpu}`, { - list: traceRow.must ? traceRow.dataList : undefined, + list: cpuFreqTraceRow.must ? cpuFreqTraceRow.dataList : undefined, startNS: TraceRow.range?.startNS || 0, endNS: TraceRow.range?.endNS || 0, totalNS: TraceRow.range?.totalNS || 0, - frame: traceRow.frame, + frame: cpuFreqTraceRow.frame, }, (res: any) => { - traceRow.dataListCache = res; - traceRow.must = false; + cpuFreqTraceRow.dataListCache = res; + cpuFreqTraceRow.must = false; row.clearCanvas(); row.drawLines(); row.c!.beginPath(); @@ -464,7 +464,7 @@ export class SpRecyclerSystemTrace extends BaseElement { } ); }; - objs.push(traceRow); + objs.push(cpuFreqTraceRow); } return objs; }; diff --git a/ide/src/trace/component/SpSystemTrace.ts b/ide/src/trace/component/SpSystemTrace.ts index 15f643d75f000059db6d557a695c2b6d57773f6d..be2b0eb1b80bf6d74c30e4a821ed05cc1e38b307 100644 --- a/ide/src/trace/component/SpSystemTrace.ts +++ b/ide/src/trace/component/SpSystemTrace.ts @@ -3323,10 +3323,10 @@ export class SpSystemTrace extends BaseElement { } scrollToProcess(rowId: string, rowParentId: string, rowType: string, smooth: boolean = true) { - let rootRow = this.shadowRoot!.querySelector>(`trace-row[row-id='${rowId}'][row-type='${rowType}']`); - if (rootRow?.collect) { + let traceRow = this.shadowRoot!.querySelector>(`trace-row[row-id='${rowId}'][row-type='${rowType}']`); + if (traceRow?.collect) { this.favoriteRowsEL!.scroll({ - top: (rootRow?.offsetTop || 0) - this.canvasFavoritePanel!.offsetHeight + (rootRow?.offsetHeight || 0), + top: (traceRow?.offsetTop || 0) - this.canvasFavoritePanel!.offsetHeight + (traceRow?.offsetHeight || 0), left: 0, behavior: smooth ? 'smooth' : undefined, }); @@ -3335,9 +3335,9 @@ export class SpSystemTrace extends BaseElement { if (row && !row.expansion) { row.expansion = true; } - if (rootRow && rootRow.offsetTop >= 0 && rootRow.offsetHeight >= 0) { + if (traceRow && traceRow.offsetTop >= 0 && traceRow.offsetHeight >= 0) { this.rowsPaneEL!.scroll({ - top: (rootRow?.offsetTop || 0) - this.canvasPanel!.offsetHeight + (rootRow?.offsetHeight || 0), + top: (traceRow?.offsetTop || 0) - this.canvasPanel!.offsetHeight + (traceRow?.offsetHeight || 0), left: 0, behavior: smooth ? 'smooth' : undefined, }); diff --git a/ide/src/trace/component/chart/SpCpuChart.ts b/ide/src/trace/component/chart/SpCpuChart.ts index 8422ea83e9aa7719f3b376e02cf8bba5154ebafc..16d380ba7e0e631a6d945571b507be3ffb3e5797 100644 --- a/ide/src/trace/component/chart/SpCpuChart.ts +++ b/ide/src/trace/component/chart/SpCpuChart.ts @@ -106,7 +106,7 @@ export class SpCpuChart { traceRow.canvasSave(context); (renders['cpu-data'] as CpuRender).renderMainThread( { - context: context, + cpuRenderContext: context, useCache: useCache, type: `cpu-data-${i1}`, translateY: traceRow.translateY, diff --git a/ide/src/trace/component/chart/SpFreqChart.ts b/ide/src/trace/component/chart/SpFreqChart.ts index e18c093e5ff60036a1e832311e3fc15e5368bed3..e65e53d929be2655f2ab4675be1369b532b5c415 100644 --- a/ide/src/trace/component/chart/SpFreqChart.ts +++ b/ide/src/trace/component/chart/SpFreqChart.ts @@ -123,7 +123,7 @@ export class SpFreqChart { cpuStateRow.canvasSave(context); (renders['cpu-state'] as CpuStateRender).renderMainThread( { - context: context, + cpuStateContext: context, useCache: useCache, type: `cpu-state-${it.cpu}`, cpu: it.cpu, diff --git a/ide/src/trace/component/chart/SpHiPerf.ts b/ide/src/trace/component/chart/SpHiPerf.ts index c5cdef93ff41a51c255baf5d217f8572ee58bb5a..03b6e5f6647c9130b91dd2c2efd1341a5a5e47b3 100644 --- a/ide/src/trace/component/chart/SpHiPerf.ts +++ b/ide/src/trace/component/chart/SpHiPerf.ts @@ -19,9 +19,7 @@ import { queryHiPerfCpuData, queryHiPerfCpuMergeData, queryHiPerfCpuMergeData2, - queryHiPerfEventData, queryHiPerfEventList, - queryHiPerfEventListData, queryHiPerfProcessData, queryHiPerfThreadData, queryPerfCmdline, @@ -33,11 +31,11 @@ import { HiperfCpuRender, HiPerfCpuStruct } from '../../database/ui-worker/Proce import { HiperfThreadRender, HiPerfThreadStruct } from '../../database/ui-worker/ProcedureWorkerHiPerfThread.js'; import { HiperfProcessRender, HiPerfProcessStruct } from '../../database/ui-worker/ProcedureWorkerHiPerfProcess.js'; import { info } from '../../../log/Log.js'; -import { HiperfEventRender, HiPerfEventStruct } from '../../database/ui-worker/ProcedureWorkerHiPerfEvent.js'; +import { HiPerfEventStruct } from '../../database/ui-worker/ProcedureWorkerHiPerfEvent.js'; import { perfDataQuery } from './PerfDataQuery.js'; import { renders } from '../../database/ui-worker/ProcedureWorker.js'; import { EmptyRender } from '../../database/ui-worker/ProcedureWorkerCPU.js'; -import { HiperfReportRender, HiPerfReportStruct } from '../../database/ui-worker/ProcedureWorkerHiPerfReport.js'; +import { HiPerfReportStruct } from '../../database/ui-worker/ProcedureWorkerHiPerfReport.js'; import { SpChartManager } from './SpChartManager.js'; export interface ResultData { @@ -223,77 +221,6 @@ export class SpHiPerf { } } - async initReport() { - this.eventTypeList.forEach((it, index) => { - let fold = TraceRow.skeleton(); - fold.rowId = `Perf-Report-${it.id}-${it.report_value}`; - fold.index = index; - fold.rowType = TraceRow.ROW_TYPE_HIPERF_REPORT; - fold.rowParentId = 'HiPerf'; - fold.rowHidden = !this.rowFolder.expansion; - fold.folder = true; - fold.name = `Event :${it.report_value}`; - fold.folderPaddingLeft = 6; - fold.favoriteChangeHandler = this.trace.favoriteChangeHandler; - fold.selectChangeHandler = this.trace.selectChangeHandler; - fold.supplier = () => queryHiPerfEventListData(it.id); - fold.onThreadHandler = (useCache) => { - let context = fold.collect ? this.trace.canvasFavoritePanelCtx! : this.trace.canvasPanelCtx!; - fold.canvasSave(context); - (renders['HiPerf-Report-Fold'] as HiperfReportRender).renderMainThread( - { - context: context, - useCache: useCache, - scale: TraceRow.range?.scale || 50, - type: `HiPerf-Report-Fold-${it.report_value}-${it.id}`, - maxCpu: this.maxCpuId + 1, - intervalPerf: SpHiPerf.stringResult?.fValue || 1, - range: TraceRow.range, - }, - fold - ); - fold.canvasRestore(context); - }; - this.trace.rowsEL?.appendChild(fold); - this.rowList?.push(fold); - for (let i = 0; i <= this.maxCpuId; i++) { - let row = TraceRow.skeleton(); - row.rowId = `HiPerf-Report-Event-${it.report_value}-${i}`; - row.index = i; - row.rowType = TraceRow.ROW_TYPE_HIPERF_EVENT; - row.rowParentId = fold.rowId; - row.rowHidden = !fold.expansion; - row.folder = false; - row.name = `Cpu ${i}`; - row.style.height = '40px'; - row.setAttribute('children', ''); - row.favoriteChangeHandler = this.trace.favoriteChangeHandler; - row.selectChangeHandler = this.trace.selectChangeHandler; - row.supplier = () => queryHiPerfEventData(it.id, row.index); - row.focusHandler = () => this.hoverTip(row, HiPerfEventStruct.hoverStruct); - row.onThreadHandler = (useCache) => { - let context = fold.collect ? this.trace.canvasFavoritePanelCtx! : this.trace.canvasPanelCtx!; - fold.canvasSave(context); - (renders['HiPerf-Report-Event'] as HiperfEventRender).renderMainThread( - { - context: context, - useCache: useCache, - scale: TraceRow.range?.scale || 50, - type: `HiPerf-Report-Event-${it.report_value}-${i}`, - maxCpu: this.maxCpuId + 1, - intervalPerf: SpHiPerf.stringResult?.fValue || 1, - range: TraceRow.range, - }, - row - ); - fold.canvasRestore(context); - }; - this.trace.rowsEL?.appendChild(row); - this.rowList?.push(row); - } - }); - } - async initProcess() { Reflect.ownKeys(this.group).forEach((key, index) => { let array = this.group[key] as Array; diff --git a/ide/src/trace/component/chart/SpProcessChart.ts b/ide/src/trace/component/chart/SpProcessChart.ts index 7f9723b290361b01ae69f1271d443d15067da3ca..1f4a3853ff4297fa21f9741af712a5ab7d3f099e 100644 --- a/ide/src/trace/component/chart/SpProcessChart.ts +++ b/ide/src/trace/component/chart/SpProcessChart.ts @@ -771,7 +771,7 @@ export class SpProcessChart { startupRow.canvasSave(context); (renders['app-start-up'] as AppStartupRender).renderMainThread( { - context: context, + appStartupContext: context, useCache: useCache, type: `app-startup ${ processRow.rowId }`, }, diff --git a/ide/src/trace/component/chart/SpSdkChart.ts b/ide/src/trace/component/chart/SpSdkChart.ts index b532629e6247d1fb7dd9445518814d0becbf528b..d4924fea5947e16ed2037faea2d254b596e06a3b 100644 --- a/ide/src/trace/component/chart/SpSdkChart.ts +++ b/ide/src/trace/component/chart/SpSdkChart.ts @@ -118,7 +118,7 @@ export class SpSdkChart { } private createSliceSql(startTime: number, tableName: string, columns: Array, where?: string): string { - let selectSql = 'select '; + let sliceSelectSql = 'select '; for (let i = 0; i < columns.length; i++) { let column = columns[i]; if (column.column == 'start_ts') { @@ -128,16 +128,16 @@ export class SpSdkChart { column.column = '(end_ts - ' + startTime + ') AS end_ts'; } if (i == columns.length - 1) { - selectSql = selectSql + column.column + ' '; + sliceSelectSql = sliceSelectSql + column.column + ' '; } else { - selectSql = selectSql + column.column + ', '; + sliceSelectSql = sliceSelectSql + column.column + ', '; } } - selectSql = selectSql + 'from ' + tableName; + sliceSelectSql = sliceSelectSql + 'from ' + tableName; if (where != undefined) { - selectSql = selectSql + ' ' + where; + sliceSelectSql = sliceSelectSql + ' ' + where; } - return selectSql; + return sliceSelectSql; } private createMaxValueSql(tableName: string, where?: string): string { diff --git a/ide/src/trace/component/metrics/DistributeTermStrategy.ts b/ide/src/trace/component/metrics/DistributeTermStrategy.ts index 456f51749305d6ac84a1db5261fee9a846290337..2af6d5beb7412adce12accb9b9ff3244b788a4d5 100644 --- a/ide/src/trace/component/metrics/DistributeTermStrategy.ts +++ b/ide/src/trace/component/metrics/DistributeTermStrategy.ts @@ -13,90 +13,6 @@ * limitations under the License. */ -import { info } from '../../../log/Log.js'; - -export const initDistributedTermData = (metricData: Array<{ - threadId: string; - threadName: string; - processId: string; - processName: string; - funName: string; - dur: string; - ts: string; - chainId: string; - spanId: string; - parentSpanId: string; - flag: string; - trace_name: string; -}>): DistributedTermListItem => { - info('Distributed Term data length is:', metricData.length); - let distributedTermListItems: Array = []; - const splitChar = ','; - for (let sqlIndex = 0; sqlIndex < metricData.length; sqlIndex++) { - let threadIdsList = metricData[sqlIndex].threadId.split(splitChar); - let threadNamesList = metricData[sqlIndex].threadName.split(splitChar); - let processIdList = metricData[sqlIndex].processId.split(splitChar); - let processNameList = - metricData[sqlIndex].processName === null ? - `${threadIdsList.length }` : metricData[sqlIndex].processName.split(splitChar); - let funNameList = metricData[sqlIndex].funName.split(splitChar); - let timeList = metricData[sqlIndex].ts.split(splitChar); - let durList = metricData[sqlIndex].dur.split(splitChar); - let flag = metricData[sqlIndex].flag; - let flagList = flag.split(splitChar); - let traceNameList = metricData[sqlIndex].trace_name; - let chainIdList = metricData[sqlIndex].chainId; - let spanIdList = metricData[sqlIndex].spanId; - let parentSpanIdList = metricData[sqlIndex].parentSpanId; - let distributedTermListItem: DistributedTermItem = {}; - for (let index = 0; index < flagList.length; index++) { - let across: boolean = true; - let receiverTime: number = 0; - let senderTime: number = 0; - let delay: number = 0; - if (flag.indexOf('S,C') >= 0 || flag.indexOf('C,S') >= 0) { - across = false; - if (flagList[index] === 'S') { - receiverTime = Number(timeList[index]); - } - if (flagList[index] === 'C') { - senderTime = Number(timeList[index]); - } - delay = receiverTime - senderTime; - } - let type = { - acrossTheDevice: across, - traceName: traceNameList, - traceId: { - chainID: chainIdList, - spanID: spanIdList, - parentSpanID: parentSpanIdList, - }, - functionName: funNameList[index], - processInfo: { - processId: processIdList[index], - processName: processNameList[index], - }, - threadInfoItem: { - threadId: threadIdsList[index], - threadName: threadNamesList[index], - }, - dur: durList[index], - delay: delay, - }; - if ('C' === flagList[index]) { - distributedTermListItem.sender = type; - } else { - distributedTermListItem.receiver = type; - } - } - distributedTermListItems?.push(distributedTermListItem); - } - return { - distributedTermItem: distributedTermListItems, - }; -}; - export interface DistributedTermListItem { distributedTermItem: Array; } diff --git a/ide/src/trace/component/schedulingAnalysis/TabCpuAnalysis.ts b/ide/src/trace/component/schedulingAnalysis/TabCpuAnalysis.ts index 22cd28762917885b78790e561b4609b40a4e7bc9..187d1405509963abea402e2a32608a8019e4d599 100644 --- a/ide/src/trace/component/schedulingAnalysis/TabCpuAnalysis.ts +++ b/ide/src/trace/component/schedulingAnalysis/TabCpuAnalysis.ts @@ -142,11 +142,11 @@ export class TabCpuAnalysis extends BaseElement { }); } - queryLogicWorker(option: string, log: string, handler: (res: any) => void) { + queryLogicWorker(cpuAnalysisType: string, log: string, handler: (res: any) => void) { let cpuAnalysisTime = new Date().getTime(); procedurePool.submitWithName( 'logic1', - option, + cpuAnalysisType, { endTs: SpSchedulingAnalysis.endTs, total: SpSchedulingAnalysis.totalDur, diff --git a/ide/src/trace/component/schedulingAnalysis/TabCpuDetailsFrequency.ts b/ide/src/trace/component/schedulingAnalysis/TabCpuDetailsFrequency.ts index 396f9e152dc60fca9cea636bf724567f3fafa856..ea3da89a9759c4aac82da6b913fca0cb7d3ff1b1 100644 --- a/ide/src/trace/component/schedulingAnalysis/TabCpuDetailsFrequency.ts +++ b/ide/src/trace/component/schedulingAnalysis/TabCpuDetailsFrequency.ts @@ -44,7 +44,7 @@ export class TabCpuDetailsFrequency extends BaseElement { this.tableNoData = this.shadowRoot!.querySelector('#table-no-data'); this.cpuDetailsFrequencyProgress = this.shadowRoot!.querySelector('#loading'); this.cpuDetailsFrequencyPie = this.shadowRoot!.querySelector('#chart-pie'); - this.cpuDetailsFrequencyUsageTbl = this.shadowRoot!.querySelector('#tb-cpu-usage'); + this.cpuDetailsFrequencyUsageTbl = this.shadowRoot!.querySelector('#fre-tb-cpu-usage'); this.tabCpuDetailsThreads = this.shadowRoot!.querySelector('#tab-cpu-details-threads'); this.cpuDetailsFrequencyUsageTbl!.addEventListener('row-click', (evt: any) => { @@ -101,20 +101,20 @@ export class TabCpuDetailsFrequency extends BaseElement { label: { type: 'outer', }, - tip: (obj) => { + tip: (freObj) => { return `
-
frequency:${obj.obj.value}
-
min:${obj.obj.min}
-
max:${obj.obj.max}
-
average:${obj.obj.avg}
-
duration:${obj.obj.sumTimeStr}
-
ratio:${obj.obj.ratio}%
+
frequency:${freObj.obj.value}
+
min:${freObj.obj.min}
+
max:${freObj.obj.max}
+
average:${freObj.obj.avg}
+
duration:${freObj.obj.sumTimeStr}
+
ratio:${freObj.obj.ratio}%
`; }, - hoverHandler: (data) => { - if (data) { - this.cpuDetailsFrequencyUsageTbl!.setCurrentHover(data); + hoverHandler: (cpuDetailsFreqData) => { + if (cpuDetailsFreqData) { + this.cpuDetailsFrequencyUsageTbl!.setCurrentHover(cpuDetailsFreqData); } else { this.cpuDetailsFrequencyUsageTbl!.mouseOut(); } @@ -143,7 +143,7 @@ export class TabCpuDetailsFrequency extends BaseElement { } noData(value: boolean) { - this.shadowRoot!.querySelector('.chart-box')!.style.display = value ? 'none' : 'block'; + this.shadowRoot!.querySelector('.fre-chart-box')!.style.display = value ? 'none' : 'block'; this.shadowRoot!.querySelector('.table-box')!.style.width = value ? '100%' : '60%'; } @@ -164,11 +164,11 @@ export class TabCpuDetailsFrequency extends BaseElement { } } - queryLoginWorker(option: string, log: string, handler: (res: any) => void) { + queryLoginWorker(cpuFrequencyType: string, log: string, handler: (res: any) => void) { let cpuDetailsFrequencyTime = new Date().getTime(); procedurePool.submitWithName( 'logic1', - option, + cpuFrequencyType, { endTs: SpSchedulingAnalysis.endTs, total: SpSchedulingAnalysis.totalDur, @@ -236,10 +236,10 @@ export class TabCpuDetailsFrequency extends BaseElement { margin: 20px; height: calc(100vh - 165px); } - .chart-box{ + .fre-chart-box{ width: 40%; } - #tb-cpu-usage{ + #fre-tb-cpu-usage{ height: 100%; } .table-box{ @@ -255,13 +255,13 @@ export class TabCpuDetailsFrequency extends BaseElement {
-
+
Statistics By Duration
- + diff --git a/ide/src/trace/component/schedulingAnalysis/TabCpuDetailsIdle.ts b/ide/src/trace/component/schedulingAnalysis/TabCpuDetailsIdle.ts index 070b5be75de27711c237fbc84fefb16fadf491a4..1b1239d0c3b0b3e86920997953aed125fa30354d 100644 --- a/ide/src/trace/component/schedulingAnalysis/TabCpuDetailsIdle.ts +++ b/ide/src/trace/component/schedulingAnalysis/TabCpuDetailsIdle.ts @@ -40,8 +40,8 @@ export class TabCpuDetailsIdle extends BaseElement { initElements(): void { this.tableNoData = this.shadowRoot!.querySelector('#table-no-data'); this.cpuDetailsLdlProgress = this.shadowRoot!.querySelector('#loading'); - this.cpuDetailsLdlPie = this.shadowRoot!.querySelector('#chart-pie'); - this.cpuDetailsLdlUsageTbl = this.shadowRoot!.querySelector('#tb-cpu-usage'); + this.cpuDetailsLdlPie = this.shadowRoot!.querySelector('#cpu_idle_chart-pie'); + this.cpuDetailsLdlUsageTbl = this.shadowRoot!.querySelector('#idle-tb-cpu-usage'); this.cpuDetailsLdlUsageTbl!.addEventListener('row-click', (evt: any) => { // @ts-ignore @@ -110,14 +110,14 @@ export class TabCpuDetailsIdle extends BaseElement { this.cpuDetailsLdlUsageTbl!.mouseOut(); } }, - tip: (obj) => { + tip: (idleObj) => { return `
-
idle:${obj.obj.value}
-
min:${obj.obj.min}
-
max:${obj.obj.max}
-
average:${obj.obj.avg}
-
duration:${obj.obj.sumTimeStr}
-
ratio:${obj.obj.ratio}%
+
idle:${idleObj.obj.value}
+
min:${idleObj.obj.min}
+
max:${idleObj.obj.max}
+
average:${idleObj.obj.avg}
+
duration:${idleObj.obj.sumTimeStr}
+
ratio:${idleObj.obj.ratio}%
`; }, @@ -140,8 +140,8 @@ export class TabCpuDetailsIdle extends BaseElement { } noData(value: boolean) { - this.shadowRoot!.querySelector('.chart-box')!.style.display = value ? 'none' : 'block'; - this.shadowRoot!.querySelector('.table-box')!.style.width = value ? '100%' : '60%'; + this.shadowRoot!.querySelector('.idle-chart-box')!.style.display = value ? 'none' : 'block'; + this.shadowRoot!.querySelector('.cpu_idle_table-box')!.style.width = value ? '100%' : '60%'; } clearData() { @@ -151,11 +151,11 @@ export class TabCpuDetailsIdle extends BaseElement { this.noData(false); } - queryLoginWorker(option: string, log: string, handler: (res: any) => void) { + queryLoginWorker(idleType: string, log: string, handler: (res: any) => void) { let cpuDetailsldleTime = new Date().getTime(); procedurePool.submitWithName( 'logic1', - option, + idleType, { endTs: SpSchedulingAnalysis.endTs, total: SpSchedulingAnalysis.totalDur, @@ -209,15 +209,15 @@ export class TabCpuDetailsIdle extends BaseElement { initHtml(): string { return ` -
-
+
+
Statistics By Duration
- +
-
+
- + diff --git a/ide/src/trace/component/schedulingAnalysis/TabCpuDetailsIrq.ts b/ide/src/trace/component/schedulingAnalysis/TabCpuDetailsIrq.ts index ee39bdff856d3c08bdf933b630592b64388298bf..3b6547dd6cfe3786beed61f190150a10632ae733 100644 --- a/ide/src/trace/component/schedulingAnalysis/TabCpuDetailsIrq.ts +++ b/ide/src/trace/component/schedulingAnalysis/TabCpuDetailsIrq.ts @@ -40,7 +40,7 @@ export class TabCpuDetailsIrq extends BaseElement { this.tableNoData = this.shadowRoot!.querySelector('#table-no-data'); this.cpuDetailsLrqProgress = this.shadowRoot!.querySelector('#loading'); this.cpuDetailsLrqPie = this.shadowRoot!.querySelector('#chart-pie'); - this.cpuDetailsLrqUsageTbl = this.shadowRoot!.querySelector('#tb-cpu-usage'); + this.cpuDetailsLrqUsageTbl = this.shadowRoot!.querySelector('#tb-cpu-irq'); this.cpuDetailsLrqUsageTbl!.addEventListener('row-click', (evt: any) => { // @ts-ignore @@ -96,15 +96,15 @@ export class TabCpuDetailsIrq extends BaseElement { label: { type: 'outer', }, - tip: (obj) => { + tip: (irqObj) => { return `
-
block:${obj.obj.block}
-
name:${obj.obj.value}
-
min:${obj.obj.min}
-
max:${obj.obj.max}
-
average:${obj.obj.avg}
-
duration:${obj.obj.sumTimeStr}
-
ratio:${obj.obj.ratio}%
+
block:${irqObj.obj.block}
+
name:${irqObj.obj.value}
+
min:${irqObj.obj.min}
+
max:${irqObj.obj.max}
+
average:${irqObj.obj.avg}
+
duration:${irqObj.obj.sumTimeStr}
+
ratio:${irqObj.obj.ratio}%
`; }, @@ -134,7 +134,7 @@ export class TabCpuDetailsIrq extends BaseElement { } noData(value: boolean) { - this.shadowRoot!.querySelector('.chart-box')!.style.display = value ? 'none' : 'block'; + this.shadowRoot!.querySelector('.irq-chart-box')!.style.display = value ? 'none' : 'block'; this.shadowRoot!.querySelector('.table-box')!.style.width = value ? '100%' : '60%'; } @@ -145,11 +145,11 @@ export class TabCpuDetailsIrq extends BaseElement { this.noData(false); } - queryLoginWorker(option: string, log: string, handler: (res: any) => void) { + queryLoginWorker(irqType: string, log: string, handler: (res: any) => void) { let cpuDetailsLrqTime = new Date().getTime(); procedurePool.submitWithName( 'logic1', - option, + irqType, { endTs: SpSchedulingAnalysis.endTs, total: SpSchedulingAnalysis.totalDur, @@ -203,22 +203,22 @@ export class TabCpuDetailsIrq extends BaseElement { initHtml(): string { return ` -
-
+
+
Statistics By Duration
- + - - - - - - + + + + + +
diff --git a/ide/src/trace/component/schedulingAnalysis/TabCpuDetailsThreads.ts b/ide/src/trace/component/schedulingAnalysis/TabCpuDetailsThreads.ts index 5d7b9513d68029db93d438feb6716ed0dc2b6ba6..9df7992e24e2624f9e15999ec198e700ed9a8266 100644 --- a/ide/src/trace/component/schedulingAnalysis/TabCpuDetailsThreads.ts +++ b/ide/src/trace/component/schedulingAnalysis/TabCpuDetailsThreads.ts @@ -36,10 +36,10 @@ export class TabCpuDetailsThreads extends BaseElement { initElements(): void { this.tableNoData = this.shadowRoot!.querySelector('#table-no-data'); this.progress = this.shadowRoot!.querySelector('#loading'); - this.cpuDetailsThreadPie = this.shadowRoot!.querySelector('#chart-pie'); + this.cpuDetailsThreadPie = this.shadowRoot!.querySelector('#cpu-thread-chart-pie'); this.cpuDetailsThreadUsageTbl = this.shadowRoot!.querySelector('#tb-cpu-usage'); - this.shadowRoot!.querySelector('.go-back')!.onclick = (e) => { + this.shadowRoot!.querySelector('.cpu-thread-go-back')!.onclick = (e) => { if (!this.progress!.loading) { this.parentNode!.querySelector('.d-box')!.style.display = 'flex'; this.setShow = false; @@ -76,7 +76,7 @@ export class TabCpuDetailsThreads extends BaseElement { } init(cpu: number, it: any) { - this.shadowRoot!.querySelector('.subheading')!.textContent = 'Threads in Freq ' + it.value; + this.shadowRoot!.querySelector('.cpu-thread-subheading')!.textContent = 'Threads in Freq ' + it.value; this.progress!.loading = true; procedurePool.submitWithName( 'logic1', @@ -146,8 +146,8 @@ export class TabCpuDetailsThreads extends BaseElement { } noData(value: boolean) { - this.shadowRoot!.querySelector('.chart-box')!.style.display = value ? 'none' : 'block'; - this.shadowRoot!.querySelector('.table-box')!.style.width = value ? '100%' : '60%'; + this.shadowRoot!.querySelector('.cpu-thread-chart-box')!.style.display = value ? 'none' : 'block'; + this.shadowRoot!.querySelector('.cpu-thread-table-box')!.style.width = value ? '100%' : '60%'; } clearData() { @@ -201,21 +201,21 @@ export class TabCpuDetailsThreads extends BaseElement { background-color: var(--dark-background,#FFFFFF); display: none; } - .d-box{ + .cpu-thread-d-box{ display: flex; margin: 20px; height: calc(100vh - 165px); } - .chart-box{ + .cpu-thread-chart-box{ width: 40%; } - .subheading{ + .cpu-thread-subheading{ font-weight: bold; } #tb-cpu-usage{ height: 100%; } - .back-box{ + .cpu-thread-back-box{ background-color: var(--bark-expansion,#0C65D1); border-radius: 5px; color: #fff; @@ -226,36 +226,36 @@ export class TabCpuDetailsThreads extends BaseElement { justify-content: center; align-items: center; } - .table-box{ + .cpu-thread-table-box{ width: 60%; max-height: calc(100vh - 165px); border: solid 1px var(--dark-border1,#e0e0e0); border-radius: 5px; padding: 10px; } - #chart-pie{ + #cpu-thread-chart-pie{ height: 360px; } - .go-back{ + .cpu-thread-go-back{ display:flex; align-items: center; cursor: pointer; } -
-
-
-
+
+
+
+
-
Threads in Freq
+
Threads in Freq
Statistics By Duration
- +
-
+
diff --git a/ide/src/trace/component/schedulingAnalysis/Top20ProcessSwitchCount.ts b/ide/src/trace/component/schedulingAnalysis/Top20ProcessSwitchCount.ts index dc60a5ded1251c1125d8907927291c274ef9663d..bfcf7f17047a0d1891a5f2b84af96f76b7787325 100644 --- a/ide/src/trace/component/schedulingAnalysis/Top20ProcessSwitchCount.ts +++ b/ide/src/trace/component/schedulingAnalysis/Top20ProcessSwitchCount.ts @@ -160,7 +160,7 @@ export class Top20ProcessSwitchCount extends BaseElement { height: 100%; background-color: var(--dark-background5,#F6F6F6); } - .tb_switch_count{ + .top-process-tb-switch-count{ flex: 1; overflow: auto ; border-radius: 5px; @@ -168,28 +168,28 @@ export class Top20ProcessSwitchCount extends BaseElement { margin: 15px; padding: 5px 15px } - .pie-chart{ + .top-process-pie-chart{ display: flex; box-sizing: border-box; width: 500px; height: 500px; } - .root{ - width: 100%; - height: 100%; + .top-process-switch-root{ display: flex; flex-direction: row; box-sizing: border-box; + width: 100%; + height: 100%; } -
+
Statistics By Sched_Switch Count
- +
-
+
diff --git a/ide/src/trace/component/schedulingAnalysis/Top20ProcessThreadCount.ts b/ide/src/trace/component/schedulingAnalysis/Top20ProcessThreadCount.ts index f76f5f13015ac8056fb73d9f0465eec9a4bc0055..0395519b09618f40dc92bd48f1d8f7b8d6972e52 100644 --- a/ide/src/trace/component/schedulingAnalysis/Top20ProcessThreadCount.ts +++ b/ide/src/trace/component/schedulingAnalysis/Top20ProcessThreadCount.ts @@ -175,17 +175,17 @@ export class Top20ProcessThreadCount extends BaseElement { margin: 15px; padding: 5px 15px } - .root{ + .thread-root{ width: 100%; height: 100%; + box-sizing: border-box; display: flex; flex-direction: row; - box-sizing: border-box; } -
+
Statistics By Thread Count
diff --git a/ide/src/trace/component/setting/SpAllocations.ts b/ide/src/trace/component/setting/SpAllocations.ts index a053ee41aa10fd85bf3121c0069e2c37e7c1f6c5..568ea4682eb00db8eb93ba76dc9a72b368d2d7f4 100644 --- a/ide/src/trace/component/setting/SpAllocations.ts +++ b/ide/src/trace/component/setting/SpAllocations.ts @@ -245,15 +245,6 @@ export class SpAllocations extends BaseElement { initHtml(): string { return `
- Native Memory + Native Memory
-
- ProcessId or ProcessName +
+ ProcessId or ProcessName Record process
-
- Max unwind level +
+ Max unwind level Max Unwind Level Rang is 0 - 512, default 10 - +
-
- Shared Memory Size (One page equals 4 KB) +
+ Shared Memory Size (One page equals 4 KB) Shared Memory Size Range is 0 - 131072 page, default 16384 page
- + Page
-
- Filter Memory Size +
+ Filter Memory Size Filter size Range is 0 - 65535 byte, default 4096 byte
- + Byte
-
- Use Fp Unwind +
+ Use Fp Unwind
-
- Use Record Accurately (Available on recent OpenHarmony 4.0) +
+ Use Record Accurately (Available on recent OpenHarmony 4.0)
-
- Use Offline Symbolization (Available on recent OpenHarmony 4.0) +
+ Use Offline Symbolization (Available on recent OpenHarmony 4.0)
-
- Use Startup Mode (Available on recent OpenHarmony 4.0) +
+ Use Startup Mode (Available on recent OpenHarmony 4.0)
-
+
Use Record Statistics (Available on recent OpenHarmony 4.0) - Time between following interval (0 = disabled) + Time between following interval (0 = disabled)
diff --git a/ide/src/trace/component/setting/SpFileSystem.ts b/ide/src/trace/component/setting/SpFileSystem.ts index 32657d046bd148d2308d06d2f55d66ab0af6192a..e8d1c66a541f025cae88f70610fc63a219062b3a 100644 --- a/ide/src/trace/component/setting/SpFileSystem.ts +++ b/ide/src/trace/component/setting/SpFileSystem.ts @@ -32,8 +32,6 @@ export class SpFileSystem extends BaseElement { private maximum: HTMLInputElement | undefined | null; private selectProcess: HTMLInputElement | undefined | null; - private configList: Array = []; - set startRecord(start: boolean) { if (start) { this.unDisable(); @@ -116,7 +114,7 @@ export class SpFileSystem extends BaseElement { break; case 'Max Unwind Level': let maxUnwindLevel = value as HTMLInputElement; - if (maxUnwindLevel.value != '') { + if (maxUnwindLevel.value !== '') { systemConfig.unWindLevel = Number(maxUnwindLevel.value); } } @@ -125,113 +123,12 @@ export class SpFileSystem extends BaseElement { } initElements(): void { - this.initConfigList(); - let fileSystemConfigList = this.shadowRoot?.querySelector('.configList'); - this.configList.forEach((config) => { - let fileSystemDiv = document.createElement('div'); - if (config.hidden) { - fileSystemDiv.className = 'file-system-config-div hidden'; - } else { - fileSystemDiv.className = 'file-system-config-div'; - } - let fileSystemHeadDiv = document.createElement('div'); - fileSystemDiv.appendChild(fileSystemHeadDiv); - let fileSystemTitle = document.createElement('span'); - fileSystemTitle.className = 'file-system-title'; - fileSystemTitle.textContent = config.title; - fileSystemHeadDiv.appendChild(fileSystemTitle); - let fileSystemDes = document.createElement('span'); - fileSystemDes.textContent = config.des; - fileSystemDes.className = 'file-system-des'; - fileSystemHeadDiv.appendChild(fileSystemDes); - switch (config.type) { - case 'select-multiple': - let multipleSelect = ''; - let placeholder = config.selectArray[0]; - if (config.title == 'Process') { - } else if (config.title == 'SystemCall Event') { - placeholder = 'ALL-Event'; - } - multipleSelect += ``; - config.selectArray.forEach((value: string) => { - multipleSelect += `${value}`; - }); - multipleSelect += ``; - fileSystemDiv.innerHTML = fileSystemDiv.innerHTML + multipleSelect; - break; - case 'input': - let fileSystemInput = document.createElement('input'); - fileSystemInput.className = 'fileSystem-input config'; - fileSystemInput.textContent = config.value; - fileSystemInput.value = config.value; - fileSystemInput.title = config.title; - if (config.title == 'Record Time') { - fileSystemInput.oninput = (ev) => { - fileSystemInput.value = fileSystemInput.value.replace(/\D/g, ''); - }; - } - fileSystemDiv.appendChild(fileSystemInput); - break; - case 'select': - let fileSystemSelect = ''; - fileSystemSelect += ``; - config.selectArray.forEach((value: string) => { - fileSystemSelect += `${value}`; - }); - fileSystemSelect += ``; - fileSystemDiv.innerHTML = fileSystemDiv.innerHTML + fileSystemSelect; - break; - case 'switch': - let fileSystemSwitch = document.createElement('lit-switch') as LitSwitch; - fileSystemSwitch.className = 'config'; - fileSystemSwitch.title = config.title; - if (config.value) { - fileSystemSwitch.checked = true; - } else { - fileSystemSwitch.checked = false; - } - if (config.title == 'Start FileSystem Record') { - fileSystemSwitch.addEventListener('change', (event: CustomEventInit) => { - let detail = event.detail; - if (detail!.checked) { - this.startFileSystem = true; - } else { - this.startFileSystem = false; - } - }); - } - if (config.title == 'Start Page Fault Record') { - fileSystemSwitch.addEventListener('change', (event: CustomEventInit) => { - let detail = event.detail; - if (detail!.checked) { - this.startVirtualMemory = true; - } else { - this.startVirtualMemory = false; - } - }); - } - if (config.title == 'Start BIO Latency Record') { - fileSystemSwitch.addEventListener('change', (event: CustomEventInit) => { - let detail = event.detail; - if (detail!.checked) { - this.startIo = true; - } else { - this.startIo = false; - } - }); - } - fileSystemHeadDiv.appendChild(fileSystemSwitch); - break; - default: - break; - } - fileSystemConfigList!.appendChild(fileSystemDiv); - }); - this.processInput = this.shadowRoot?.querySelector("lit-select-v[title='Process']"); - this.maximum = this.shadowRoot?.querySelector("input[title='Max Unwind Level']"); + this.switchChange(); + this.processInput = this.shadowRoot?.querySelector('lit-select-v'); + this.maximum = this.shadowRoot?.querySelector('#maxUnwindLevel'); this.maximum?.addEventListener('keyup', (eve: Event) => { this.maximum!.value = this.maximum!.value.replace(/\D/g, ''); - if (this.maximum!.value != '') { + if (this.maximum!.value !== '') { let mun = parseInt(this.maximum!.value); if (mun > 64 || mun < 0) { this.maximum!.value = '10'; @@ -254,20 +151,50 @@ export class SpFileSystem extends BaseElement { this.disable(); } - private unDisable() { + private switchChange(): void { + let fileSystemSwitch = this.shadowRoot?.querySelector('#fileSystem'); + fileSystemSwitch!.addEventListener('change', (event: CustomEventInit) => { + let detail = event.detail; + if (detail!.checked) { + this.startFileSystem = true; + } else { + this.startFileSystem = false; + } + }); + let pageFaultSwitch = this.shadowRoot?.querySelector('#pageFault'); + pageFaultSwitch!.addEventListener('change', (event: CustomEventInit) => { + let detail = event.detail; + if (detail!.checked) { + this.startVirtualMemory = true; + } else { + this.startVirtualMemory = false; + } + }); + let bioLatencySwitch = this.shadowRoot?.querySelector('#bioLatency'); + bioLatencySwitch!.addEventListener('change', (event: CustomEventInit) => { + let detail = event.detail; + if (detail!.checked) { + this.startIo = true; + } else { + this.startIo = false; + } + }); + } + + private unDisable(): void { let fileSystemConfigVals = this.shadowRoot?.querySelectorAll('.config'); fileSystemConfigVals!.forEach((fileSystemConfigVal) => { fileSystemConfigVal.removeAttribute('disabled'); }); } - private disable() { + private disable(): void { let fileSystemConfigVals = this.shadowRoot?.querySelectorAll('.config'); fileSystemConfigVals!.forEach((fileSystemConfigVal) => { if ( - fileSystemConfigVal.title == 'Start FileSystem Record' || - fileSystemConfigVal.title == 'Start Page Fault Record' || - fileSystemConfigVal.title == 'Start BIO Latency Record' + fileSystemConfigVal.title === 'Start FileSystem Record' || + fileSystemConfigVal.title === 'Start Page Fault Record' || + fileSystemConfigVal.title === 'Start BIO Latency Record' ) { } else { fileSystemConfigVal.setAttribute('disabled', ''); @@ -275,46 +202,6 @@ export class SpFileSystem extends BaseElement { }); } - initConfigList(): void { - this.configList = [ - { - title: 'Start FileSystem Record', - des: '', - hidden: false, - type: 'switch', - value: false, - }, - { - title: 'Start Page Fault Record', - des: '', - hidden: false, - type: 'switch', - value: false, - }, - { - title: 'Start BIO Latency Record', - des: '', - hidden: false, - type: 'switch', - value: false, - }, - { - title: 'Process', - des: 'Record process', - hidden: false, - type: 'select-multiple', - selectArray: [''], - }, - { - title: 'Max Unwind Level', - des: '', - hidden: false, - type: 'input', - value: '10', - }, - ]; - } - initHtml(): string { return `
-
+
+
+ Start FileSystem Record + +
+
+
+
+ Start Page Fault Record + +
+
+
+
+ Start BIO Latency Record +
+
+
+
+ Process + Record process +
+ +
+
+
+ Max Unwind Level +
+ +
`; } diff --git a/ide/src/trace/component/setting/SpHisysEvent.ts b/ide/src/trace/component/setting/SpHisysEvent.ts index 3c75eaf3045060a82945511fcad448476f3cf213..e6e0f4e82bfceeecde46d1b2e563c92edb6b5fca 100644 --- a/ide/src/trace/component/setting/SpHisysEvent.ts +++ b/ide/src/trace/component/setting/SpHisysEvent.ts @@ -28,7 +28,6 @@ import { HdcDeviceManager } from '../../../hdc/HdcDeviceManager.js'; export class SpHisysEvent extends BaseElement { private eventProcessInput: LitAllocationSelect | undefined | null; private selectProcess: HTMLInputElement | undefined | null; - private eventConfigList: Array = []; set startSamp(start: boolean) { if (start) { @@ -52,157 +51,56 @@ export class SpHisysEvent extends BaseElement { } initElements(): void { - this.initConfigList(); - let hisysEventConfigList = this.shadowRoot?.querySelector('.configList'); - this.eventConfigList.forEach((config) => { - let hisysEventDiv = document.createElement('div'); - if (config.hidden) { - hisysEventDiv.className = 'hisys-event-config-div hidden'; + let hisysEventSwitch = this.shadowRoot?.querySelector('lit-switch') as LitSwitch; + hisysEventSwitch.addEventListener('change', (event: CustomEventInit) => { + let detail = event.detail; + if (detail!.checked) { + this.startSamp = true; + this.unDisable(); } else { - hisysEventDiv.className = 'hisys-event-config-div'; + this.startSamp = false; + this.disable(); } - let hisysEventHeadDiv = document.createElement('div'); - hisysEventDiv.appendChild(hisysEventHeadDiv); - let hisysEventTitle = document.createElement('span'); - hisysEventTitle.className = 'event-title'; - hisysEventTitle.textContent = config.title; - hisysEventHeadDiv.appendChild(hisysEventTitle); - let hisysEventDes = document.createElement('span'); - hisysEventDes.textContent = config.des; - hisysEventDes.className = 'event-des'; - hisysEventHeadDiv.appendChild(hisysEventDes); - switch (config.type) { - case 'select': - let hisysEventSelect = ''; - hisysEventSelect += ``; - hisysEventSelect += ``; - hisysEventDiv.innerHTML = hisysEventDiv.innerHTML + hisysEventSelect; - break; - case 'switch': - let hisysEventSwitch = document.createElement('lit-switch') as LitSwitch; - hisysEventSwitch.className = 'config'; - hisysEventSwitch.title = config.title; - if (config.value) { - hisysEventSwitch.checked = true; - } else { - hisysEventSwitch.checked = false; - } - if (config.title == 'Start Hisystem Event Tracker Record') { - hisysEventSwitch.addEventListener('change', (event: CustomEventInit) => { - let detail = event.detail; - if (detail!.checked) { - this.startSamp = true; - this.unDisable(); - } else { - this.startSamp = false; - this.disable(); - } - }); - } - hisysEventHeadDiv.appendChild(hisysEventSwitch); - break; - default: - break; - } - hisysEventConfigList!.appendChild(hisysEventDiv); }); - this.eventProcessInput = this.shadowRoot?.querySelector( - "lit-allocation-select[title='AppName']" - ); + this.eventProcessInput = this.shadowRoot?.querySelector('lit-allocation-select'); let hisyEventProcessInput = this.eventProcessInput?.shadowRoot?.querySelector('.multipleSelect') as HTMLDivElement; this.selectProcess = this.eventProcessInput!.shadowRoot?.querySelector('input') as HTMLInputElement; - let hisysEventProcessData: Array = []; hisyEventProcessInput!.addEventListener('mousedown', (ev) => { - if (SpRecordTrace.serialNumber == '') { + if (SpRecordTrace.serialNumber === '') { this.eventProcessInput!.processData = []; this.eventProcessInput!.initData(); } }); hisyEventProcessInput!.addEventListener('mouseup', () => { - if (SpRecordTrace.serialNumber == '') { + if (SpRecordTrace.serialNumber === '') { this.eventProcessInput!.processData = []; this.eventProcessInput!.initData(); } else { - if (SpRecordTrace.isVscode) { - let cmd = Cmd.formatString(CmdConstant.CMD_GET_APP_NMAE_DEVICES, [SpRecordTrace.serialNumber]); - Cmd.execHdcCmd(cmd, (res: string) => { - hisysEventProcessData = []; - let hisyEventValuesVs: string[] = res.replace(/\r\n/g, '\r').replace(/\n/g, '\r').split(/\r/); - for (let lineVal of hisyEventValuesVs) { - if (lineVal.indexOf('__progname') != -1 || lineVal.indexOf('CMD') != -1) { - continue; - } - let process = lineVal.trim(); - if (process != '') { - hisysEventProcessData.push(process); - } - } - this.eventProcessInput!.processData = hisysEventProcessData; - this.eventProcessInput!.initData(); - }); - } else { - HdcDeviceManager.connect(SpRecordTrace.serialNumber).then((conn) => { - if (conn) { - HdcDeviceManager.shellResultAsString(CmdConstant.CMD_GET_APP_NMAE, false).then((res) => { - hisysEventProcessData = []; - if (res) { - let hisyEventValues: string[] = res.replace(/\r\n/g, '\r').replace(/\n/g, '\r').split(/\r/); - for (let lineVal of hisyEventValues) { - if (lineVal.indexOf('__progname') != -1 || lineVal.indexOf('CMD') != -1) { - continue; - } - let process = lineVal.trim(); - if (process != '') { - hisysEventProcessData.push(process); - } - } - } - this.eventProcessInput!.processData = hisysEventProcessData; - this.eventProcessInput!.initData(); - }); - } - }); - } + Cmd.getProcess().then((processList) => { + this.eventProcessInput!.processData = processList; + this.eventProcessInput!.initData(); + }); } }); this.disable(); } - private unDisable() { + private unDisable(): void { let hisysEventConfigVals = this.shadowRoot?.querySelectorAll('.config'); hisysEventConfigVals!.forEach((hisysEventConfigVal) => { hisysEventConfigVal.removeAttribute('disabled'); }); } - private disable() { + private disable(): void { let hisysEventConfigVals = this.shadowRoot?.querySelectorAll('.config'); hisysEventConfigVals!.forEach((hisysEventConfigVal) => { - if (hisysEventConfigVal.title != 'Start Hisystem Event Tracker Record') { + if (hisysEventConfigVal.title !== 'Start Hisystem Event Tracker Record') { hisysEventConfigVal.setAttribute('disabled', ''); } }); } - initConfigList(): void { - this.eventConfigList = [ - { - title: 'Start Hisystem Event Tracker Record', - des: '', - hidden: false, - type: 'switch', - value: false, - }, - { - title: 'AppName', - des: 'Record AppName', - hidden: false, - type: 'select', - selectArray: [''], - }, - ]; - } - initHtml(): string { return `
-
-
+
+
+ Start Hisystem Event Tracker Record + +
+
+
+
+ AppName + Record AppName +
+ +
`; } diff --git a/ide/src/trace/component/setting/SpRecordPerf.ts b/ide/src/trace/component/setting/SpRecordPerf.ts index 438a5707acea59729bcd8f137bb49dde9ff694c6..28658908de9160d05317c4fd960899dba6e674db 100644 --- a/ide/src/trace/component/setting/SpRecordPerf.ts +++ b/ide/src/trace/component/setting/SpRecordPerf.ts @@ -362,8 +362,8 @@ export class SpRecordPerf extends BaseElement { this.cpuSelect?.dataSource(cpuData, 'ALL-CPU'); }); } else { - sp.search = true; recordPerfSearch.clear(); + sp.search = true; recordPerfSearch.setPercent('please kill other hdc-server !', -2); } }); @@ -548,10 +548,10 @@ export class SpRecordPerf extends BaseElement { value: false, }, { + type: 'select-multiple', title: 'Process', des: 'Record process', hidden: false, - type: 'select-multiple', selectArray: [''], }, { diff --git a/ide/src/trace/component/setting/SpVmTracker.ts b/ide/src/trace/component/setting/SpVmTracker.ts index d7977151f86a5d0d2a0a5deda8266a44d1e5d5ab..81dec5e24e4aaea70fe7f6ad36dfbb078ad7809d 100644 --- a/ide/src/trace/component/setting/SpVmTracker.ts +++ b/ide/src/trace/component/setting/SpVmTracker.ts @@ -25,7 +25,6 @@ import { Cmd } from '../../../command/Cmd.js'; @element('sp-vm-tracker') export class SpVmTracker extends BaseElement { private vmTrackerProcessInput: LitAllocationSelect | undefined | null; - private configList: Array = []; set startSamp(start: boolean) { if (start) { @@ -54,72 +53,27 @@ export class SpVmTracker extends BaseElement { } initElements(): void { - this.initConfigList(); - let configList = this.shadowRoot?.querySelector('.configList'); - this.configList.forEach((config) => { - let vmTrackerDiv = document.createElement('div'); - if (config.hidden) { - vmTrackerDiv.className = 'vm-config-div hidden'; + let vmTrackerSwitch = this.shadowRoot?.querySelector('lit-switch') as LitSwitch; + vmTrackerSwitch.addEventListener('change', (event: CustomEventInit) => { + let detail = event.detail; + if (detail!.checked) { + this.startSamp = true; + this.unDisable(); } else { - vmTrackerDiv.className = 'vm-config-div'; + this.startSamp = false; + this.disable(); } - let headDiv = document.createElement('div'); - vmTrackerDiv.appendChild(headDiv); - let vmTrackerTitle = document.createElement('span'); - vmTrackerTitle.className = 'title'; - vmTrackerTitle.textContent = config.title; - headDiv.appendChild(vmTrackerTitle); - let des = document.createElement('span'); - des.textContent = config.des; - des.className = 'des'; - headDiv.appendChild(des); - switch (config.type) { - case 'select': - let html1 = ''; - html1 += ``; - html1 += ``; - vmTrackerDiv.innerHTML = vmTrackerDiv.innerHTML + html1; - break; - case 'switch': - let vmTrackerSwitch = document.createElement('lit-switch') as LitSwitch; - vmTrackerSwitch.className = 'config'; - vmTrackerSwitch.title = config.title; - if (config.value) { - vmTrackerSwitch.checked = true; - } else { - vmTrackerSwitch.checked = false; - } - if (config.title == 'Start VM Tracker Record') { - vmTrackerSwitch.addEventListener('change', (event: CustomEventInit) => { - let detail = event.detail; - if (detail!.checked) { - this.startSamp = true; - this.unDisable(); - } else { - this.startSamp = false; - this.disable(); - } - }); - } - headDiv.appendChild(vmTrackerSwitch); - break; - default: - break; - } - configList!.appendChild(vmTrackerDiv); }); - this.vmTrackerProcessInput = this.shadowRoot?.querySelector( - "lit-allocation-select[title='Process']" - ); + this.vmTrackerProcessInput = this.shadowRoot?.querySelector('lit-allocation-select'); let vmTrackerMul = this.vmTrackerProcessInput?.shadowRoot?.querySelector('.multipleSelect') as HTMLDivElement; vmTrackerMul!.addEventListener('mousedown', (ev) => { - if (SpRecordTrace.serialNumber == '') { + if (SpRecordTrace.serialNumber === '') { this.vmTrackerProcessInput!.processData = []; this.vmTrackerProcessInput!.initData(); } }); vmTrackerMul!.addEventListener('mouseup', () => { - if (SpRecordTrace.serialNumber == '') { + if (SpRecordTrace.serialNumber === '') { this.vmTrackerProcessInput!.processData = []; this.vmTrackerProcessInput!.initData(); } else { @@ -132,41 +86,22 @@ export class SpVmTracker extends BaseElement { this.disable(); } - private unDisable() { + private unDisable(): void { let configVal = this.shadowRoot?.querySelectorAll('.config'); configVal!.forEach((configVal1) => { configVal1.removeAttribute('disabled'); }); } - private disable() { + private disable(): void { let configVal = this.shadowRoot?.querySelectorAll('.config'); configVal!.forEach((configVal1) => { - if (configVal1.title != 'Start VM Tracker Record') { + if (configVal1.title !== 'Start VM Tracker Record') { configVal1.setAttribute('disabled', ''); } }); } - initConfigList(): void { - this.configList = [ - { - title: 'Start VM Tracker Record', - des: '', - hidden: false, - type: 'switch', - value: false, - }, - { - title: 'Process', - des: 'Record process', - hidden: false, - type: 'select', - selectArray: [''], - }, - ]; - } - initHtml(): string { return `
-
+
+
+ Start VM Tracker Record + +
+
+
+ Process + Record process +
+ +
`; } diff --git a/ide/src/trace/component/trace/TimerShaftElement.ts b/ide/src/trace/component/trace/TimerShaftElement.ts index 9262d845d122ad05a39e19e493512a6a1e5e0321..6891860ad573dffa548ac3fea6eef996a118eb1f 100644 --- a/ide/src/trace/component/trace/TimerShaftElement.ts +++ b/ide/src/trace/component/trace/TimerShaftElement.ts @@ -33,7 +33,7 @@ import { SpSystemTrace, CurrentSlicesTime } from '../SpSystemTrace.js'; export function randomRgbColor() { const letters = '0123456789ABCDEF'; let color = '#'; - for (let i = 0; i < 6; i++) { + for (let index = 0; index < 6; index++) { color += letters[Math.floor(Math.random() * 16)]; } return color; diff --git a/ide/src/trace/component/trace/base/TraceRow.ts b/ide/src/trace/component/trace/base/TraceRow.ts index bb16738090457a9b360f8d01144c74983d185a58..2176757ff5bffbeffb29adc067e4f55f6ce1deee 100644 --- a/ide/src/trace/component/trace/base/TraceRow.ts +++ b/ide/src/trace/component/trace/base/TraceRow.ts @@ -893,10 +893,10 @@ export class TraceRow extends HTMLElement { it.rangeSelect = false; }); } - let traceRowList: Array> = []; + let rowList: Array> = []; this.parentElement!.parentElement!.querySelectorAll>("trace-row[check-type='2'][folder]").forEach( (it) => { - traceRowList.push( + rowList.push( ...it.childrenList.filter((it) => { return it.checkType === '2'; }) @@ -905,7 +905,7 @@ export class TraceRow extends HTMLElement { ); this.selectChangeHandler?.([ ...this.parentElement!.parentElement!.querySelectorAll>("trace-row[check-type='2']"), - ...traceRowList, + ...rowList, ]); } diff --git a/ide/src/trace/component/trace/base/TraceRowConfig.ts b/ide/src/trace/component/trace/base/TraceRowConfig.ts index d88498f37160548571488989369932f4ff7a65c5..47c6d494c4fcb4dd983a97d8a9ea3fc199e3c2e5 100644 --- a/ide/src/trace/component/trace/base/TraceRowConfig.ts +++ b/ide/src/trace/component/trace/base/TraceRowConfig.ts @@ -181,6 +181,7 @@ export class TraceRowConfig extends BaseElement { if (this.selectTypeList!.length === 0) { traceRow.removeAttribute('row-hidden'); traceRow.setAttribute('scene', ''); + this.refreshChildRow(traceRow.childrenList, true); } else { for (let index = 0; index < traceRow.templateType!.length; index++) { let type = traceRow.templateType![index]; @@ -205,6 +206,32 @@ export class TraceRowConfig extends BaseElement { } } }); + this.spSystemTrace?.collectRows.forEach(favoriteRow => { + let isShowRow: boolean = false; + if (favoriteRow.parentRowEl) { + favoriteRow.parentRowEl.expansion = false; + } + if (this.selectTypeList!.length === 0) { + favoriteRow.removeAttribute('row-hidden'); + favoriteRow.setAttribute('scene', ''); + } else { + for (let index = 0; index < favoriteRow.templateType!.length; index++) { + if (this.selectTypeList!.indexOf(favoriteRow.templateType![index]) >= 0) { + isShowRow = true; + break; + } + } + if (isShowRow) { + if (favoriteRow.templateType.length > 0) { + favoriteRow.removeAttribute('row-hidden'); + favoriteRow.setAttribute('scene', ''); + } + } else { + favoriteRow.removeAttribute('scene'); + favoriteRow.setAttribute('row-hidden', ''); + } + } + }); this.refreshSystemPanel(); } } @@ -212,7 +239,6 @@ export class TraceRowConfig extends BaseElement { refreshChildRow(childRows: Array>, isShowScene: boolean = false): void{ childRows.forEach(row => { if (isShowScene) { - row.removeAttribute('row-hidden'); row.setAttribute('scene', ''); if (row.childrenList && row.childrenList.length > 0) { this.refreshChildRow(row.childrenList, isShowScene); diff --git a/ide/src/trace/component/trace/base/TraceRowObject.ts b/ide/src/trace/component/trace/base/TraceRowObject.ts index 22cd59520af8c397d8cf5fb98d47c2e246e685e8..c2654ea535035990ccad49c7e6f62e5bfe3da1b9 100644 --- a/ide/src/trace/component/trace/base/TraceRowObject.ts +++ b/ide/src/trace/component/trace/base/TraceRowObject.ts @@ -33,31 +33,13 @@ export class TraceRowObject { public color: string | undefined; public frame: Rect | undefined; public supplier: (() => Promise>) | undefined | null; - public onThreadHandler: - | (( + public onThreadHandler: | (( row: TraceRow, - ctx: - | ImageBitmapRenderingContext - | CanvasRenderingContext2D - | WebGLRenderingContext - | WebGL2RenderingContext - | null - | undefined - ) => void) - | undefined - | null; - public onDrawHandler: - | (( - ctx: - | ImageBitmapRenderingContext - | CanvasRenderingContext2D - | WebGLRenderingContext - | WebGL2RenderingContext - | null - | undefined - ) => void) - | undefined - | null; + ctx: | ImageBitmapRenderingContext | CanvasRenderingContext2D | WebGLRenderingContext | + WebGL2RenderingContext | null | undefined ) => void) | undefined | null; + public onDrawHandler: | (( + ctx: | ImageBitmapRenderingContext | CanvasRenderingContext2D | WebGLRenderingContext | + WebGL2RenderingContext | null | undefined) => void) | undefined | null; public top: number = 0; public rowIndex: number = 0; public preObject: TraceRowObject | undefined | null; diff --git a/ide/src/trace/component/trace/base/TraceSheet.ts b/ide/src/trace/component/trace/base/TraceSheet.ts index 467ba9cc1a01c2baa8f9cbe6e08120af3704823d..615ff7d26f934103978bba97f82eeba15a044218 100644 --- a/ide/src/trace/component/trace/base/TraceSheet.ts +++ b/ide/src/trace/component/trace/base/TraceSheet.ts @@ -595,15 +595,9 @@ export class TraceSheet extends BaseElement { .reverse() .forEach((id) => { let element = tabConfig[id]; - if (element.require) { - if (element.require(selection)) { - let pane = this.shadowRoot!.querySelector(`#${id as string}`); - pane!.hidden = false; - } else { - this.shadowRoot!.querySelector(`#${id as string}`)!.hidden = true; - } - } else { - this.shadowRoot!.querySelector(`#${id as string}`)!.hidden = true; + let pane = this.shadowRoot!.querySelector(`#${id as string}`); + if (pane) { + pane.hidden = !(element.require && element.require(selection)); } }); if (restore) { diff --git a/ide/src/trace/component/trace/base/Utils.ts b/ide/src/trace/component/trace/base/Utils.ts index 32f8ccbb52bc8724f2f1a7eea50f2ab8b0fa5aea..0eb1ce7c96f6303a41320fc43d6dca5005d8472a 100644 --- a/ide/src/trace/component/trace/base/Utils.ts +++ b/ide/src/trace/component/trace/base/Utils.ts @@ -133,28 +133,28 @@ export class Utils { return res; } - public static getProbablyTime(ns: number): string { - let currentNs = ns; - let hour1 = 3600_000_000_000; - let minute1 = 60_000_000_000; - let second1 = 1_000_000_000; - let millisecond1 = 1_000_000; - let microsecond1 = 1_000; + public static getProbablyTime(timeNs: number): string { + let currentNs = timeNs; + let probablyHour = 3600_000_000_000; + let probablyMinute1 = 60_000_000_000; + let probablySecond1 = 1_000_000_000; + let probablyMillisecond1 = 1_000_000; + let probablyMicrosecond1 = 1_000; let res = ''; - if (currentNs >= hour1) { - res += (currentNs / hour1).toFixed(2) + 'h '; - } else if (currentNs >= minute1) { - res += (currentNs / minute1).toFixed(2) + 'm '; - } else if (currentNs >= second1) { - res += (currentNs / second1).toFixed(2) + 's '; - } else if (currentNs >= millisecond1) { - res += (currentNs / millisecond1).toFixed(2) + 'ms '; - } else if (currentNs >= microsecond1) { - res += (currentNs / microsecond1).toFixed(2) + 'μs '; + if (currentNs >= probablyHour) { + res += (currentNs / probablyHour).toFixed(2) + 'h '; + } else if (currentNs >= probablyMinute1) { + res += (currentNs / probablyMinute1).toFixed(2) + 'm '; + } else if (currentNs >= probablySecond1) { + res += (currentNs / probablySecond1).toFixed(2) + 's '; + } else if (currentNs >= probablyMillisecond1) { + res += (currentNs / probablyMillisecond1).toFixed(2) + 'ms '; + } else if (currentNs >= probablyMicrosecond1) { + res += (currentNs / probablyMicrosecond1).toFixed(2) + 'μs '; } else if (currentNs > 0) { res += currentNs + 'ns '; } else if (res == '') { - res = ns + ''; + res = timeNs + ''; } return res; } @@ -241,27 +241,27 @@ export class Utils { let hour1 = 3600_000; let minute1 = 60_000; let second1 = 1_000; // 1 second - let res = ''; + let result = ''; if (currentNs >= hour1) { - res += Math.round(currentNs / hour1).toFixed(2) + 'h'; - return res; + result += Math.round(currentNs / hour1).toFixed(2) + 'h'; + return result; } if (currentNs >= minute1) { - res += Math.round(currentNs / minute1).toFixed(2) + 'min'; - return res; + result += Math.round(currentNs / minute1).toFixed(2) + 'min'; + return result; } if (currentNs >= second1) { - res += Math.round(currentNs / second1).toFixed(2) + 's'; - return res; + result += Math.round(currentNs / second1).toFixed(2) + 's'; + return result; } if (currentNs > 0) { - res += currentNs.toFixed(2) + 'ms'; - return res; + result += currentNs.toFixed(2) + 'ms'; + return result; } - if (res == '') { - res = '0s'; + if (result == '') { + result = '0s'; } - return res; + return result; } public static uuid(): string { diff --git a/ide/src/trace/component/trace/sheet/TabPaneCurrent.ts b/ide/src/trace/component/trace/sheet/TabPaneCurrent.ts index 82a42797330a003bc0c6640292dc6e3aa6693418..6602a4e7ba815dfd084f8a45d2dadeeb0ccacf3f 100644 --- a/ide/src/trace/component/trace/sheet/TabPaneCurrent.ts +++ b/ide/src/trace/component/trace/sheet/TabPaneCurrent.ts @@ -26,7 +26,7 @@ export class TabPaneCurrent extends BaseElement { document.dispatchEvent(new CustomEvent('slices-change', { detail: this.slicestime })); } }); - this.shadowRoot?.querySelector('#text-input')?.addEventListener('keyup', (event: any) => { + this.shadowRoot?.querySelector('#text-input-current')?.addEventListener('keyup', (event: any) => { event.stopPropagation(); if (event.keyCode == '13') { if (this.slicestime) { @@ -42,13 +42,13 @@ export class TabPaneCurrent extends BaseElement { } } }); - this.shadowRoot?.querySelector('#text-input')?.addEventListener('blur', (event: any) => { + this.shadowRoot?.querySelector('#text-input-current')?.addEventListener('blur', (event: any) => { (window as any).flagInputFocus = false; window.publish(window.SmartEvent.UI.KeyboardEnable, { enable: true, }); }); - this.shadowRoot?.querySelector('#text-input')?.addEventListener('focus', (event: any) => { + this.shadowRoot?.querySelector('#text-input-current')?.addEventListener('focus', (event: any) => { (window as any).flagInputFocus = true; window.publish(window.SmartEvent.UI.KeyboardEnable, { enable: false, @@ -65,7 +65,7 @@ export class TabPaneCurrent extends BaseElement { setCurrentSlicesTime(slicestime: SlicesTime) { this.slicestime = slicestime; this.shadowRoot!.querySelector('#color-input')!.value = this.slicestime.color; - this.shadowRoot!.querySelector('#text-input')!.value = this.slicestime.text; + this.shadowRoot!.querySelector('#text-input-current')!.value = this.slicestime.text; } initHtml(): string { @@ -79,10 +79,10 @@ export class TabPaneCurrent extends BaseElement { .notes-editor-panel{ display: flex;align-items: center } - .slices-text{ + .current-slices-text{ font-size: 14px;color: var(--dark-color1,#363636c7);font-weight: 300; } - .slices-input{ + .current-slices-input{ border-radius: 4px; border: 1px solid var(--dark-border,#dcdcdc); color: var(--dark-color1,#212121); @@ -90,7 +90,7 @@ export class TabPaneCurrent extends BaseElement { padding: 3px; margin: 0 10px; } - .slices-input:focus{ + .current-slices-input:focus{ outline: none; box-shadow: 1px 1px 1px var(--bark-prompt,#bebebe); } @@ -109,9 +109,9 @@ export class TabPaneCurrent extends BaseElement { outline: inherit;
-
Annotation at
- - Change color: +
Annotation at
+ + Change color:
`; diff --git a/ide/src/trace/component/trace/sheet/TabPaneCurrentSelection.ts b/ide/src/trace/component/trace/sheet/TabPaneCurrentSelection.ts index 1bc72c9db1fc7259dd83133244ba0d2b17d56128..6fe5e5fc68d5a37b05a057db797692b0a5b67d93 100644 --- a/ide/src/trace/component/trace/sheet/TabPaneCurrentSelection.ts +++ b/ide/src/trace/component/trace/sheet/TabPaneCurrentSelection.ts @@ -253,16 +253,7 @@ export class TabPaneCurrentSelection extends BaseElement { } else { list.unshift({ name: 'Name', value: name }); } - list.push({ - name: 'StartTime', - value: getTimeString(data.startTs || 0), - }); - list.push({ - name: 'Duration', - value: getTimeString(data.dur || 0), - }); - list.push({ name: 'depth', value: data.depth }); - list.push({ name: 'arg_set_id', value: data.argsetid }); + this.addTabPanelContent(list, data); this.currentSelectionTbl!.dataSource = list; let funcClick = this.currentSelectionTbl?.shadowRoot?.querySelector('#function-jump'); funcClick?.addEventListener('click', () => { @@ -288,16 +279,7 @@ export class TabPaneCurrentSelection extends BaseElement { if (binderSliceId === -1) { list.unshift({ name: 'Name', value: name }); } - list.push({ - name: 'StartTime', - value: getTimeString(data.startTs || 0), - }); - list.push({ - name: 'Duration', - value: getTimeString(data.dur || 0), - }); - list.push({ name: 'depth', value: data.depth }); - list.push({ name: 'arg_set_id', value: data.argsetid }); + this.addTabPanelContent(list, data); this.currentSelectionTbl!.dataSource = list; let funcClick = this.currentSelectionTbl?.shadowRoot?.querySelector('#function-jump'); funcClick?.addEventListener('click', () => { @@ -317,16 +299,7 @@ export class TabPaneCurrentSelection extends BaseElement { argset.forEach((item) => { list.push({ name: item.keyName, value: item.strValue }); }); - list.push({ - name: 'StartTime', - value: getTimeString(data.startTs || 0), - }); - list.push({ - name: 'Duration', - value: getTimeString(data.dur || 0), - }); - list.push({ name: 'depth', value: data.depth }); - list.push({ name: 'arg_set_id', value: data.argsetid }); + this.addTabPanelContent(list, data); this.currentSelectionTbl!.dataSource = list; }); } @@ -346,22 +319,38 @@ export class TabPaneCurrentSelection extends BaseElement { } } + private addTabPanelContent(contentList: any[], data: FuncStruct): void{ + contentList.push({ + name: 'StartTime', + value: getTimeString(data.startTs || 0), + }); + contentList.push({ + name: 'Duration', + value: getTimeString(data.dur || 0), + }); + contentList.push({ name: 'depth', value: data.depth }); + contentList.push({ name: 'arg_set_id', value: data.argsetid }); + } + private tabCurrentSelectionInit(leftTitleStr: string): void { this.initCanvas(); let leftTitle: HTMLElement | null | undefined = this?.shadowRoot?.querySelector('#leftTitle'); + this.setTitleAndButtonStyle(); + if (leftTitle) { + leftTitle.innerText = leftTitleStr; + } + } + + private setTitleAndButtonStyle(): void{ let rightTitle: HTMLElement | null | undefined = this?.shadowRoot?.querySelector('#rightTitle'); - let rightButton: HTMLElement | null | undefined = this?.shadowRoot - ?.querySelector('#rightButton') - ?.shadowRoot?.querySelector('#custom-button'); + let rightButton: HTMLElement | null | undefined = this?.shadowRoot?.querySelector('#rightButton')?. + shadowRoot?.querySelector('#custom-button'); let rightStar: HTMLElement | null | undefined = this?.shadowRoot?.querySelector('#right-star'); if (rightTitle) { rightTitle.style.visibility = 'hidden'; rightButton!.style.visibility = 'hidden'; rightStar!.style.visibility = 'hidden'; } - if (leftTitle) { - leftTitle.innerText = leftTitleStr; - } } setClockData(data: ClockStruct): void { @@ -406,16 +395,7 @@ export class TabPaneCurrentSelection extends BaseElement { setIrqData(data: IrqStruct): void { this.setTableHeight('550px'); this.initCanvas(); - let rightTitle: HTMLElement | null | undefined = this?.shadowRoot?.querySelector('#rightTitle'); - let rightButton: HTMLElement | null | undefined = this?.shadowRoot - ?.querySelector('#rightButton') - ?.shadowRoot?.querySelector('#custom-button'); - let rightStar: HTMLElement | null | undefined = this?.shadowRoot?.querySelector('#right-star'); - if (rightTitle) { - rightTitle.style.visibility = 'hidden'; - rightButton!.style.visibility = 'hidden'; - rightStar!.style.visibility = 'hidden'; - } + this.setTitleAndButtonStyle(); let leftTitle: HTMLElement | null | undefined = this?.shadowRoot?.querySelector('#leftTitle'); if (leftTitle) { leftTitle.innerText = 'Counter Details'; @@ -448,16 +428,7 @@ export class TabPaneCurrentSelection extends BaseElement { this.setTableHeight('550px'); this.initCanvas(); let leftTitle: HTMLElement | null | undefined = this?.shadowRoot?.querySelector('#leftTitle'); - let rightTitle: HTMLElement | null | undefined = this?.shadowRoot?.querySelector('#rightTitle'); - let rightButton: HTMLElement | null | undefined = this?.shadowRoot - ?.querySelector('#rightButton') - ?.shadowRoot?.querySelector('#custom-button'); - let rightStar: HTMLElement | null | undefined = this?.shadowRoot?.querySelector('#right-star'); - if (rightTitle) { - rightTitle.style.visibility = 'hidden'; - rightButton!.style.visibility = 'hidden'; - rightStar!.style.visibility = 'hidden'; - } + this.setTitleAndButtonStyle(); if (leftTitle) { leftTitle.innerText = 'Thread State'; } @@ -798,24 +769,23 @@ export class TabPaneCurrentSelection extends BaseElement { setStartupData(data: AppStartupStruct, scrollCallback: Function): void { this.setTableHeight('550px'); this.initCanvas(); - let rightTitle: HTMLElement | null | undefined = this?.shadowRoot?.querySelector('#rightTitle'); - let rightButton: HTMLElement | null | undefined = this?.shadowRoot - ?.querySelector('#rightButton') - ?.shadowRoot?.querySelector('#custom-button'); - if (rightTitle) { - rightTitle.style.visibility = 'hidden'; + let rightButton: HTMLElement | null | undefined = this?.shadowRoot?.querySelector('#rightButton')?.shadowRoot?. + querySelector('#custom-button'); + let startUpRightTitle: HTMLElement | null | undefined = this?.shadowRoot?.querySelector('#rightTitle'); + if (startUpRightTitle) { + startUpRightTitle.style.visibility = 'hidden'; rightButton!.style.visibility = 'hidden'; } - let leftTitle: HTMLElement | null | undefined = this?.shadowRoot?.querySelector('#leftTitle'); - if (leftTitle) { - leftTitle.innerText = 'Details'; + let startUpLeftTitle: HTMLElement | null | undefined = this?.shadowRoot?.querySelector('#leftTitle'); + if (startUpLeftTitle) { + startUpLeftTitle.innerText = 'Details'; } let list: any[] = []; list.push({ name: 'Name', value: AppStartupStruct.getStartupName(data.startName) }); list.push({ name: 'StartTime(Relative)', value: ` -
+
${ getTimeString(data.startTs || 0) }
`, @@ -901,7 +871,7 @@ export class TabPaneCurrentSelection extends BaseElement { name: 'StartTime(Relative)', value: `
${ getTimeString(data.startTs || 0) }
- +
`, }); list.push({ diff --git a/ide/src/trace/component/trace/sheet/TabPaneFilter.ts b/ide/src/trace/component/trace/sheet/TabPaneFilter.ts index b2cdfb27fbe7611e1922323685909f6d5a611ba0..f5d38b3cf9bf3170b273804ce2b78abb1d9c7e21 100644 --- a/ide/src/trace/component/trace/sheet/TabPaneFilter.ts +++ b/ide/src/trace/component/trace/sheet/TabPaneFilter.ts @@ -85,7 +85,7 @@ export class TabPaneFilter extends BaseElement { initElements(): void { this.cutList = []; this.libraryList = []; - this.filterInputEL = this.shadowRoot?.querySelector('#filter-input'); + this.filterInputEL = this.shadowRoot?.querySelector('#pane-filter-input'); this.markButtonEL = this.shadowRoot?.querySelector('#mark'); this.iconEL = this.shadowRoot?.querySelector('#icon'); this.statisticsName = this.shadowRoot?.querySelector('.statistics-name'); @@ -626,18 +626,18 @@ export class TabPaneFilter extends BaseElement { .disabled{ color: rgba(0,0,0,0.4); } - #filter-input{ + #pane-filter-input{ background: var(--dark-background4,#FFFFFF); border: 1px solid var(--dark-border,rgba(0,0,0,0.60)); color: var(--dark-color2,#000000); border-radius: 8px; width: 200px; } - #filter-input:focus{ + #pane-filter-input:focus{ outline: none; box-shadow: 1px 1px 1px var(--dark-color,#bebebe); } - #filter-input::-webkit-input-placeholder { + #pane-filter-input::-webkit-input-placeholder { color: var(--dark-color,#aab2bd); } .describe{ @@ -679,7 +679,7 @@ export class TabPaneFilter extends BaseElement { :host(:not([inputLeftText])) .left-text{ display: none; } - :host(:not([input])) #filter-input{ + :host(:not([input])) #pane-filter-input{ display: none; } :host(:not([mark])) #mark{ @@ -798,7 +798,7 @@ export class TabPaneFilter extends BaseElement { Input Filter - +
diff --git a/ide/src/trace/component/trace/sheet/TabPaneJsMemoryFilter.ts b/ide/src/trace/component/trace/sheet/TabPaneJsMemoryFilter.ts index f94a8ff32f88fa69ae824d9352c384bf2c22a36b..af6ab82d4d1c143755ef955fbb1a067e5aa1f8ce 100644 --- a/ide/src/trace/component/trace/sheet/TabPaneJsMemoryFilter.ts +++ b/ide/src/trace/component/trace/sheet/TabPaneJsMemoryFilter.ts @@ -35,7 +35,7 @@ export class TabPaneJsMemoryFilter extends BaseElement { position: fixed; bottom: 0px; } - #filter-input{ + #js-memory-filter-input{ background: var(--dark-background4,#FFFFFF); border: 1px solid var(--dark-border,rgba(0,0,0,0.60)); color: var(--dark-color2,#000000); @@ -43,11 +43,11 @@ export class TabPaneJsMemoryFilter extends BaseElement { margin-left: 10px; width: 200px; } - #filter-input:focus{ + #js-memory-filter-input:focus{ outline: none; box-shadow: 1px 1px 1px var(--dark-color,#bebebe); } - #filter-input::-webkit-input-placeholder { + #js-memory-filter-input::-webkit-input-placeholder { color: var(--dark-color,#aab2bd); } .describe{ @@ -71,11 +71,11 @@ export class TabPaneJsMemoryFilter extends BaseElement {
Class Filter - +
`; } -} \ No newline at end of file +} diff --git a/ide/src/trace/component/trace/sheet/ability/TabPaneDmaAbility.ts b/ide/src/trace/component/trace/sheet/ability/TabPaneDmaAbility.ts index 04a7a37ddae8e712e3d176e70596382fa4cffaed..472b61b9375494de18686a2ae774b2f5022850f1 100644 --- a/ide/src/trace/component/trace/sheet/ability/TabPaneDmaAbility.ts +++ b/ide/src/trace/component/trace/sheet/ability/TabPaneDmaAbility.ts @@ -61,8 +61,8 @@ export class TabPaneDmaAbility extends BaseElement { if (this.tableThead!.hasAttribute('sort')) { this.tableThead!.removeAttribute('sort'); list.forEach((item) => { - item.querySelectorAll('svg').forEach((svg) => { - svg.style.display = 'none'; + item.querySelectorAll('svg').forEach((svgEl) => { + svgEl.style.display = 'none'; }); }); } @@ -75,26 +75,26 @@ export class TabPaneDmaAbility extends BaseElement { if (data.length !== null && data.length > 0) { this.total = new Dma(); this.total.process = '*All*'; - data.forEach((item) => { - if (item.processName !== null) { - item.process = `${item.processName}(${item.processId})`; + data.forEach((dmaItem) => { + if (dmaItem.processName !== null) { + dmaItem.process = `${dmaItem.processName}(${dmaItem.processId})`; } else { - item.process = `Process(${item.processId})`; + dmaItem.process = `Process(${dmaItem.processId})`; } - this.total.avgSize += item.avgSize; + this.total.avgSize += dmaItem.avgSize; if (this.total.minSize < 0) { - this.total.minSize = item.minSize; + this.total.minSize = dmaItem.minSize; } if (this.total.maxSize < 0) { - this.total.maxSize = item.maxSize; + this.total.maxSize = dmaItem.maxSize; } - this.total.minSize = Math.min(this.total.minSize, item.minSize); - this.total.maxSize = Math.max(this.total.maxSize, item.maxSize); + this.total.minSize = Math.min(this.total.minSize, dmaItem.minSize); + this.total.maxSize = Math.max(this.total.maxSize, dmaItem.maxSize); - item.avgSizes = Utils.getBinaryByteWithUnit(Math.round(item.avgSize)); - item.minSizes = Utils.getBinaryByteWithUnit(item.minSize); - item.maxSizes = Utils.getBinaryByteWithUnit(item.maxSize); + dmaItem.avgSizes = Utils.getBinaryByteWithUnit(Math.round(dmaItem.avgSize)); + dmaItem.minSizes = Utils.getBinaryByteWithUnit(dmaItem.minSize); + dmaItem.maxSizes = Utils.getBinaryByteWithUnit(dmaItem.maxSize); }); this.total.avgSizes = Utils.getBinaryByteWithUnit(Math.round(this.total.avgSize / data.length)); this.total.minSizes = Utils.getBinaryByteWithUnit(this.total.minSize); diff --git a/ide/src/trace/component/trace/sheet/ability/TabPaneDmaAbilityComparison.ts b/ide/src/trace/component/trace/sheet/ability/TabPaneDmaAbilityComparison.ts index 3b1c1b3b3a9d39fd31d0fe78dbe066952a3e83f8..0fba69b1331c97b7c37758060b8670675b94a4a2 100644 --- a/ide/src/trace/component/trace/sheet/ability/TabPaneDmaAbilityComparison.ts +++ b/ide/src/trace/component/trace/sheet/ability/TabPaneDmaAbilityComparison.ts @@ -34,8 +34,8 @@ export class TabPaneDmaAbilityComparison extends BaseElement { private comparisonSource: Array = []; initElements(): void { - this.damClickTable = this.shadowRoot?.querySelector('#damClickTable'); this.comparisonSelect = this.shadowRoot?.querySelector('#filter') as TabPaneJsMemoryFilter; + this.damClickTable = this.shadowRoot?.querySelector('#damClickTable'); this.selectEl = this.comparisonSelect?.shadowRoot?.querySelector('lit-select'); this.damClickTable!.addEventListener('column-click', (e) => { // @ts-ignore @@ -79,22 +79,22 @@ export class TabPaneDmaAbilityComparison extends BaseElement { this.getComparisonData(dataArray[0].startNs); } - selectStamps(dataList: Array): void { + selectStamps(dmaAbilityComList: Array): void { let input = this.selectEl!.shadowRoot?.querySelector('input') as HTMLInputElement; this.selectEl!.innerHTML = ''; let option = new LitSelectOption(); option.innerHTML = 'File Name'; option.setAttribute('disabled', 'disabled'); this.selectEl?.appendChild(option); - if (dataList[0].name) { - option.setAttribute('value', dataList[0].name); + if (dmaAbilityComList[0].name) { + option.setAttribute('value', dmaAbilityComList[0].name); } - this.selectEl!.defaultValue = dataList[0].name || ''; - this.selectEl!.placeholder = dataList[0].name || ''; - this.selectEl!.dataSource = dataList; + this.selectEl!.defaultValue = dmaAbilityComList[0].name || ''; + this.selectEl!.placeholder = dmaAbilityComList[0].name || ''; + this.selectEl!.dataSource = dmaAbilityComList; this.selectEl!.querySelectorAll('lit-select-option').forEach((option) => { option.addEventListener('onSelected', (e) => { - for (let f of dataList) { + for (let f of dmaAbilityComList) { if (input.value === f.name) { this.getComparisonData(f.startNs); } diff --git a/ide/src/trace/component/trace/sheet/ability/TabPaneDmaSelectAbility.ts b/ide/src/trace/component/trace/sheet/ability/TabPaneDmaSelectAbility.ts index 5e6138cb8ffa98a765eb6b57461a57db0a3e4965..acb90faf7bae6876d857aed19cb8f5a61baf96fb 100644 --- a/ide/src/trace/component/trace/sheet/ability/TabPaneDmaSelectAbility.ts +++ b/ide/src/trace/component/trace/sheet/ability/TabPaneDmaSelectAbility.ts @@ -40,9 +40,9 @@ export class TabPaneDmaSelectAbility extends BaseElement { connectedCallback(): void { super.connectedCallback(); new ResizeObserver(() => { - if (this.parentElement?.clientHeight != 0) { + if (this.parentElement?.clientHeight !== 0) { // @ts-ignore - this.damClickTable?.shadowRoot?.querySelector('.table').style.height = this.parentElement.clientHeight - 18 + 'px'; + this.damClickTable?.shadowRoot?.querySelector('.table').style.height = (this.parentElement?.clientHeight - 18) + 'px'; this.parentElement!.style.overflow = 'hidden'; this.damClickTable?.reMeauseHeight(); } @@ -51,10 +51,10 @@ export class TabPaneDmaSelectAbility extends BaseElement { private init(): void { const thTable = this.tableThead!.querySelector('.th'); - const list = thTable!.querySelectorAll('div'); + const dmaSelectTblNodes = thTable!.querySelectorAll('div'); if (this.tableThead!.hasAttribute('sort')) { this.tableThead!.removeAttribute('sort'); - list.forEach((item) => { + dmaSelectTblNodes.forEach((item) => { item.querySelectorAll('svg').forEach((svg) => { svg.style.display = 'none'; }); @@ -77,10 +77,10 @@ export class TabPaneDmaSelectAbility extends BaseElement { } item.sizes = Utils.getBinaryByteWithUnit(item.size); item.timeStamp = ns2s(item.startNs); - this.damClickTable!.getItemTextColor = (item: Dma): any => { - if (item.flag === 1) { + this.damClickTable!.getItemTextColor = (dmaItem: Dma): any => { + if (dmaItem.flag === 1) { return '#d4b550'; - } else if (item.flag === 2) { + } else if (dmaItem.flag === 2) { return '#f86b6b'; } else { return '#000000'; diff --git a/ide/src/trace/component/trace/sheet/ability/TabPaneGpuMemoryAbility.ts b/ide/src/trace/component/trace/sheet/ability/TabPaneGpuMemoryAbility.ts index 1e1d70a3e1a07c937bf5de53df8e24079a82e296..aace2158d2247cf9bf29098b693da05b6218221a 100644 --- a/ide/src/trace/component/trace/sheet/ability/TabPaneGpuMemoryAbility.ts +++ b/ide/src/trace/component/trace/sheet/ability/TabPaneGpuMemoryAbility.ts @@ -61,10 +61,10 @@ export class TabPaneGpuMemoryAbility extends BaseElement { private init(): void { const thTable = this.tableThead!.querySelector('.th'); - const list = thTable!.querySelectorAll('div'); + const gpuMemoryTblNodes = thTable!.querySelectorAll('div'); if (this.tableThead!.hasAttribute('sort')) { this.tableThead!.removeAttribute('sort'); - list.forEach((item) => { + gpuMemoryTblNodes.forEach((item) => { item.querySelectorAll('svg').forEach((svg) => { svg.style.display = 'none'; }); @@ -80,26 +80,26 @@ export class TabPaneGpuMemoryAbility extends BaseElement { this.total = new GpuMemory(); this.total.process = '*All*'; this.total.gpuName = '*All*'; - data.forEach((item) => { - if (item.processName !== null) { - item.process = `${item.processName}(${item.processId})`; + data.forEach((gpuMemoryItem) => { + if (gpuMemoryItem.processName !== null) { + gpuMemoryItem.process = `${gpuMemoryItem.processName}(${gpuMemoryItem.processId})`; } else { - item.process = `Process(${item.processId})`; + gpuMemoryItem.process = `Process(${gpuMemoryItem.processId})`; } - this.total.avgSize += item.avgSize; + this.total.avgSize += gpuMemoryItem.avgSize; if (this.total.minSize < 0) { - this.total.minSize = item.minSize; + this.total.minSize = gpuMemoryItem.minSize; } if (this.total.maxSize < 0) { - this.total.maxSize = item.maxSize; + this.total.maxSize = gpuMemoryItem.maxSize; } - this.total.minSize = Math.min(this.total.minSize, item.minSize); - this.total.maxSize = Math.max(this.total.maxSize, item.maxSize); - item.gpuName = SpSystemTrace.DATA_DICT.get(item.gpuNameId) || ''; - item.avgSizes = Utils.getBinaryByteWithUnit(Math.round(item.avgSize)); - item.minSizes = Utils.getBinaryByteWithUnit(item.minSize); - item.maxSizes = Utils.getBinaryByteWithUnit(item.maxSize); + this.total.minSize = Math.min(this.total.minSize, gpuMemoryItem.minSize); + this.total.maxSize = Math.max(this.total.maxSize, gpuMemoryItem.maxSize); + gpuMemoryItem.gpuName = SpSystemTrace.DATA_DICT.get(gpuMemoryItem.gpuNameId) || ''; + gpuMemoryItem.avgSizes = Utils.getBinaryByteWithUnit(Math.round(gpuMemoryItem.avgSize)); + gpuMemoryItem.minSizes = Utils.getBinaryByteWithUnit(gpuMemoryItem.minSize); + gpuMemoryItem.maxSizes = Utils.getBinaryByteWithUnit(gpuMemoryItem.maxSize); }); this.total.avgSizes = Utils.getBinaryByteWithUnit(Math.round(this.total.avgSize / data.length)); this.total.minSizes = Utils.getBinaryByteWithUnit(this.total.minSize); diff --git a/ide/src/trace/component/trace/sheet/ability/TabPaneGpuMemoryComparison.ts b/ide/src/trace/component/trace/sheet/ability/TabPaneGpuMemoryComparison.ts index 4cdb471a9c690d2e462cd6dcea4b81a1ce6d25d8..bc64887227ce78cf1c6506d9828067738d4a1740 100644 --- a/ide/src/trace/component/trace/sheet/ability/TabPaneGpuMemoryComparison.ts +++ b/ide/src/trace/component/trace/sheet/ability/TabPaneGpuMemoryComparison.ts @@ -81,23 +81,23 @@ export class TabPaneGpuMemoryComparison extends BaseElement { this.getComparisonData(dataArray[0].startNs); } - selectStamps(dataList: Array): void { + selectStamps(gpuMemoryComList: Array): void { let input = this.selectEl!.shadowRoot?.querySelector('input') as HTMLInputElement; this.selectEl!.innerHTML = ''; let option = new LitSelectOption(); option.innerHTML = 'File Name'; option.setAttribute('disabled', 'disabled'); this.selectEl?.appendChild(option); - if (dataList[0].name) { - option.setAttribute('value', dataList[0].name); + if (gpuMemoryComList[0].name) { + option.setAttribute('value', gpuMemoryComList[0].name); } - option.setAttribute('value', dataList[0].name); - this.selectEl!.defaultValue = dataList[0].name || ''; - this.selectEl!.placeholder = dataList[0].name || ''; - this.selectEl!.dataSource = dataList; + option.setAttribute('value', gpuMemoryComList[0].name); + this.selectEl!.defaultValue = gpuMemoryComList[0].name || ''; + this.selectEl!.placeholder = gpuMemoryComList[0].name || ''; + this.selectEl!.dataSource = gpuMemoryComList; this.selectEl!.querySelectorAll('lit-select-option').forEach((option) => { option.addEventListener('onSelected', async (e) => { - for (let f of dataList) { + for (let f of gpuMemoryComList) { if (input.value === f.name) { this.getComparisonData(f.startNs); } diff --git a/ide/src/trace/component/trace/sheet/ability/TabPaneGpuMemorySelectAbility.ts b/ide/src/trace/component/trace/sheet/ability/TabPaneGpuMemorySelectAbility.ts index b4105318cc9f79c605c1ad5e87e62731fd98d4b3..84283bbc12f6e5689d545add122ed0961995534b 100644 --- a/ide/src/trace/component/trace/sheet/ability/TabPaneGpuMemorySelectAbility.ts +++ b/ide/src/trace/component/trace/sheet/ability/TabPaneGpuMemorySelectAbility.ts @@ -44,9 +44,10 @@ export class TabPaneGpuMemorySelectAbility extends BaseElement { connectedCallback(): void { super.connectedCallback(); new ResizeObserver(() => { - if (this.parentElement?.clientHeight != 0) { + if (this.parentElement?.clientHeight !== 0) { + let gpuMemoryTbl = this.gpuMemoryClickTable?.shadowRoot?.querySelector('.table'); // @ts-ignore - this.gpuMemoryClickTable?.shadowRoot?.querySelector('.table').style.height = this.parentElement.clientHeight - 18 + 'px'; + gpuMemoryTbl.style.height = this.parentElement.clientHeight - 18 + 'px'; this.parentElement!.style.overflow = 'hidden'; this.gpuMemoryClickTable?.reMeauseHeight(); } @@ -55,10 +56,10 @@ export class TabPaneGpuMemorySelectAbility extends BaseElement { private init(): void { const thTable = this.tableThead!.querySelector('.th'); - const list = thTable!.querySelectorAll('div'); + const gpuMemorySelectTblNode = thTable!.querySelectorAll('div'); if (this.tableThead!.hasAttribute('sort')) { this.tableThead!.removeAttribute('sort'); - list.forEach((item) => { + gpuMemorySelectTblNode.forEach((item) => { item.querySelectorAll('svg').forEach((svg) => { svg.style.display = 'none'; }); diff --git a/ide/src/trace/component/trace/sheet/ability/TabPanePurgPin.ts b/ide/src/trace/component/trace/sheet/ability/TabPanePurgPin.ts index 5e9a217d8a06c80a31b541f6644d7101f24f25e8..8276aea0165df31423faeb72d2411b0a2c1ee325 100644 --- a/ide/src/trace/component/trace/sheet/ability/TabPanePurgPin.ts +++ b/ide/src/trace/component/trace/sheet/ability/TabPanePurgPin.ts @@ -48,12 +48,12 @@ export class TabPanePurgPin extends BaseElement { selection.rightNs, (MemoryConfig.getInstance().interval * 1000_000) / 5, true - ).then((results) => { + ).then((purgePinResults) => { this.purgeablePinTable!.loading = false; - if (results.length > 0) { - for (let i = 0; i < results.length; i++) { + if (purgePinResults.length > 0) { + for (let i = 0; i < purgePinResults.length; i++) { this.purgeablePinSource.push( - this.toTabStruct(results[i].name, results[i].maxSize, results[i].minSize, results[i].avgSize) + this.toTabStruct(purgePinResults[i].name, purgePinResults[i].maxSize, purgePinResults[i].minSize, purgePinResults[i].avgSize) ); } this.sortByColumn({ key: this.sortKey, sort: this.sortType }); @@ -97,10 +97,10 @@ export class TabPanePurgPin extends BaseElement { private init() { const thTable = this.tabTitle!.querySelector('.th'); - const list = thTable!.querySelectorAll('div'); + const purgePinTblNodes = thTable!.querySelectorAll('div'); if (this.tabTitle!.hasAttribute('sort')) { this.tabTitle!.removeAttribute('sort'); - list.forEach((item) => { + purgePinTblNodes.forEach((item) => { item.querySelectorAll('svg').forEach((svg) => { svg.style.display = 'none'; }); @@ -110,15 +110,16 @@ export class TabPanePurgPin extends BaseElement { this.sortType = 2; } - private toTabStruct(type: string, maxSize: number, minSize: number, avgSize: number): PurgeableTabStruct { + private toTabStruct(type: string, maxPurgePinSize: number, minPurgePinSize: number, avgPurgePinSize: number + ): PurgeableTabStruct { const tabStruct = new PurgeableTabStruct( type, - maxSize, - minSize, - avgSize, - Utils.getBinaryByteWithUnit(avgSize), - Utils.getBinaryByteWithUnit(maxSize), - Utils.getBinaryByteWithUnit(minSize) + maxPurgePinSize, + minPurgePinSize, + avgPurgePinSize, + Utils.getBinaryByteWithUnit(avgPurgePinSize), + Utils.getBinaryByteWithUnit(maxPurgePinSize), + Utils.getBinaryByteWithUnit(minPurgePinSize) ); return tabStruct; } @@ -140,7 +141,7 @@ export class TabPanePurgPin extends BaseElement { private sortByColumn(detail: any): void { // @ts-ignore function compare(key, sort, type) { - return function (a: any, b: any) { + return function (purgePinLeftData: any, purgePinRightData: any) { // 不管哪一列的排序方式是0(默认排序),都按照avgSize列从大到小排序 if (sort === 0) { sort = 2; @@ -149,12 +150,12 @@ export class TabPanePurgPin extends BaseElement { } if (type === 'number') { // @ts-ignore - return sort === 2 ? parseFloat(b[key]) - parseFloat(a[key]) : parseFloat(a[key]) - parseFloat(b[key]); + return sort === 2 ? parseFloat(purgePinRightData[key]) - parseFloat(purgePinLeftData[key]) : parseFloat(purgePinLeftData[key]) - parseFloat(purgePinRightData[key]); } else { if (sort === 2) { - return b[key].toString().localeCompare(a[key].toString()); + return purgePinRightData[key].toString().localeCompare(purgePinLeftData[key].toString()); } else { - return a[key].toString().localeCompare(b[key].toString()); + return purgePinLeftData[key].toString().localeCompare(purgePinRightData[key].toString()); } } }; diff --git a/ide/src/trace/component/trace/sheet/ability/TabPanePurgPinComparisonAbility.ts b/ide/src/trace/component/trace/sheet/ability/TabPanePurgPinComparisonAbility.ts index fe1dfd6879812794647ff76bdb9d0d62b6602f2b..6352b1d9b67d8da387375d3649a696fd579c1da9 100644 --- a/ide/src/trace/component/trace/sheet/ability/TabPanePurgPinComparisonAbility.ts +++ b/ide/src/trace/component/trace/sheet/ability/TabPanePurgPinComparisonAbility.ts @@ -14,8 +14,8 @@ */ import { BaseElement, element } from '../../../../../base-ui/BaseElement.js'; import { LitSelect } from '../../../../../base-ui/select/LitSelect.js'; -import { LitSelectOption } from '../../../../../base-ui/select/LitSelectOption.js'; import { LitTable } from '../../../../../base-ui/table/lit-table.js'; +import { LitSelectOption } from '../../../../../base-ui/select/LitSelectOption.js'; import { SelectionParam } from '../../../../bean/BoxSelection.js'; import { querySysPurgeableSelectionTab } from '../../../../database/SqlLite.js'; import { Utils } from '../../base/Utils.js'; @@ -33,7 +33,7 @@ export class TabPanePurgPinComparisonAbility extends BaseElement { this.filterEl = this.shadowRoot!.querySelector('#filter'); this.selectEl = this.filterEl?.shadowRoot?.querySelector('lit-select'); } - public totalData(data: SelectionParam | any, dataList: any): void { + public totalData(purgePinComParam: SelectionParam | any, dataList: any): void { //@ts-ignore this.purgeablePinTable?.shadowRoot?.querySelector('.table')?.style?.height = `${ this.parentElement!.clientHeight - 45 @@ -41,15 +41,15 @@ export class TabPanePurgPinComparisonAbility extends BaseElement { this.purgeablePinSource = []; let fileArr: any[] = []; for (let file of dataList) { - if (file.startNs !== data.startNs) { + if (file.startNs !== purgePinComParam.startNs) { fileArr.push(file); } } fileArr = fileArr.sort(); - this.initSelect(data.startNs, fileArr); - this.updateComparisonData(data.startNs, fileArr[0].startNs); + this.initSelect(purgePinComParam.startNs, fileArr); + this.updateComparisonData(purgePinComParam.startNs, fileArr[0].startNs); } - private initSelect(fileStartNs: number, fileArr: Array): void { + private initSelect(fileStartNs: number, purgePinComFileArr: Array): void { let that = this; let input = this.selectEl!.shadowRoot?.querySelector('input') as HTMLInputElement; this.selectEl!.innerHTML = ''; @@ -57,15 +57,15 @@ export class TabPanePurgPinComparisonAbility extends BaseElement { option.innerHTML = 'File Name'; option.setAttribute('disabled', 'disabled'); this.selectEl?.appendChild(option); - if (fileArr[0].name) { - option.setAttribute('value', fileArr[0].name); + if (purgePinComFileArr[0].name) { + option.setAttribute('value', purgePinComFileArr[0].name); } - this.selectEl!.defaultValue = fileArr[0].name; - this.selectEl!.placeholder = fileArr[0].name; - this.selectEl!.dataSource = fileArr; + this.selectEl!.defaultValue = purgePinComFileArr[0].name; + this.selectEl!.placeholder = purgePinComFileArr[0].name; + this.selectEl!.dataSource = purgePinComFileArr; this.selectEl!.querySelectorAll('lit-select-option').forEach((a) => { a.addEventListener('onSelected', (e: any) => { - for (let f of fileArr) { + for (let f of purgePinComFileArr) { if (input.value === f.name) { that.updateComparisonData(fileStartNs, f.startNs); } diff --git a/ide/src/trace/component/trace/sheet/ability/TabPanePurgPinSelection.ts b/ide/src/trace/component/trace/sheet/ability/TabPanePurgPinSelection.ts index 642426e701ba946411c4cbf8d938bc303ed5a152..909d81e7a0405bd6fe7563fee1957002439c253f 100644 --- a/ide/src/trace/component/trace/sheet/ability/TabPanePurgPinSelection.ts +++ b/ide/src/trace/component/trace/sheet/ability/TabPanePurgPinSelection.ts @@ -15,8 +15,8 @@ import { BaseElement, element } from '../../../../../base-ui/BaseElement.js'; import { LitTable } from '../../../../../base-ui/table/lit-table.js'; -import { SelectionParam } from '../../../../bean/BoxSelection.js'; import { MemoryConfig } from '../../../../bean/MemoryConfig.js'; +import { SelectionParam } from '../../../../bean/BoxSelection.js'; import { queryProcessPurgeableSelectionTab, querySysPurgeableSelectionTab } from '../../../../database/SqlLite.js'; import { ns2s } from '../../../../database/ui-worker/ProcedureWorkerCommon.js'; import { Utils } from '../../base/Utils.js'; @@ -35,12 +35,12 @@ export class TabPanePurgPinSelection extends BaseElement { async queryTableData(type: string, startNs: number) { if (type === 'ability') { - await querySysPurgeableSelectionTab(startNs, true).then((results) => { + await querySysPurgeableSelectionTab(startNs, true).then((purgePinSelectResults) => { this.purgeableSelectionSource = []; this.purgeableSelectionSource.push({ name: 'TimeStamp', value: ns2s(startNs) }); - for (let i = 0; i < results.length; i++) { - results[i].value = Utils.getBinaryByteWithUnit(results[i].value); - this.purgeableSelectionSource.push(results[i]); + for (let i = 0; i < purgePinSelectResults.length; i++) { + purgePinSelectResults[i].value = Utils.getBinaryByteWithUnit(purgePinSelectResults[i].value); + this.purgeableSelectionSource.push(purgePinSelectResults[i]); this.purgeableSelectionTable!.recycleDataSource = this.purgeableSelectionSource; } }); diff --git a/ide/src/trace/component/trace/sheet/ability/TabPanePurgTotal.ts b/ide/src/trace/component/trace/sheet/ability/TabPanePurgTotal.ts index e7a33471686928214ba22a1eb7267529221fb6d9..efe001c676f02fe715679b0c13ef7b4c52f3e222 100644 --- a/ide/src/trace/component/trace/sheet/ability/TabPanePurgTotal.ts +++ b/ide/src/trace/component/trace/sheet/ability/TabPanePurgTotal.ts @@ -46,12 +46,12 @@ export class TabPanePurgTotal extends BaseElement { selection.leftNs, selection.rightNs, (MemoryConfig.getInstance().interval * 1000000) / 5 - ).then((results) => { + ).then((purgeTotalResults) => { this.purgeableTotalTable!.loading = false; - if (results.length > 0) { - for (let i = 0; i < results.length; i++) { + if (purgeTotalResults.length > 0) { + for (let i = 0; i < purgeTotalResults.length; i++) { this.purgeableTotalSource.push( - this.toTabStruct(results[i].name, results[i].maxSize, results[i].minSize, results[i].avgSize) + this.toTabStruct(purgeTotalResults[i].name, purgeTotalResults[i].maxSize, purgeTotalResults[i].minSize, purgeTotalResults[i].avgSize) ); } this.sortByColumn({ key: this.sortKey, sort: this.sortType }); @@ -94,10 +94,10 @@ export class TabPanePurgTotal extends BaseElement { private init() { const thTable = this.tabTitle!.querySelector('.th'); - const list = thTable!.querySelectorAll('div'); + const purgeTotalTblNode = thTable!.querySelectorAll('div'); if (this.tabTitle!.hasAttribute('sort')) { this.tabTitle!.removeAttribute('sort'); - list.forEach((item) => { + purgeTotalTblNode.forEach((item) => { item.querySelectorAll('svg').forEach((svg) => { svg.style.display = 'none'; }); @@ -137,7 +137,7 @@ export class TabPanePurgTotal extends BaseElement { private sortByColumn(detail: any): void { // @ts-ignore function compare(key, sort, type) { - return function (a: any, b: any) { + return function (purgeTotalLeftData: any, purgeTotalRightData: any) { // 不管哪一列的排序方式是0(默认排序),都按照avgSize列从大到小排序 if (sort === 0) { sort = 2; @@ -146,12 +146,12 @@ export class TabPanePurgTotal extends BaseElement { } if (type === 'number') { // @ts-ignore - return sort === 2 ? parseFloat(b[key]) - parseFloat(a[key]) : parseFloat(a[key]) - parseFloat(b[key]); + return sort === 2 ? parseFloat(purgeTotalRightData[key]) - parseFloat(purgeTotalLeftData[key]) : parseFloat(purgeTotalLeftData[key]) - parseFloat(purgeTotalRightData[key]); } else { if (sort === 2) { - return b[key].toString().localeCompare(a[key].toString()); + return purgeTotalRightData[key].toString().localeCompare(purgeTotalLeftData[key].toString()); } else { - return a[key].toString().localeCompare(b[key].toString()); + return purgeTotalLeftData[key].toString().localeCompare(purgeTotalRightData[key].toString()); } } }; diff --git a/ide/src/trace/component/trace/sheet/ability/TabPanePurgTotalComparisonAbility.ts b/ide/src/trace/component/trace/sheet/ability/TabPanePurgTotalComparisonAbility.ts index 9e7ee6d466ce4526cba4761d1912e5a38ec6b41b..6f3deb49ba68ab2b0c2b5baa77bd114abf1b438f 100644 --- a/ide/src/trace/component/trace/sheet/ability/TabPanePurgTotalComparisonAbility.ts +++ b/ide/src/trace/component/trace/sheet/ability/TabPanePurgTotalComparisonAbility.ts @@ -33,7 +33,7 @@ export class TabPanePurgTotalComparisonAbility extends BaseElement { this.filterEl = this.shadowRoot!.querySelector('#filter'); this.selectEl = this.filterEl?.shadowRoot?.querySelector('lit-select'); } - public totalData(data: SelectionParam | any, dataList: any): void { + public totalData(purgeTotalComParam: SelectionParam | any, dataList: any): void { //@ts-ignore this.purgeableTotalTable?.shadowRoot?.querySelector('.table')?.style?.height = `${ this.parentElement!.clientHeight - 45 @@ -41,15 +41,15 @@ export class TabPanePurgTotalComparisonAbility extends BaseElement { this.purgeableTotalSource = []; let fileArr: any[] = []; for (let file of dataList) { - if (file.startNs !== data.startNs) { + if (file.startNs !== purgeTotalComParam.startNs) { fileArr.push(file); } } fileArr = fileArr.sort(); - this.initSelect(data.startNs, fileArr); - this.updateComparisonData(data.startNs, fileArr[0].startNs); + this.initSelect(purgeTotalComParam.startNs, fileArr); + this.updateComparisonData(purgeTotalComParam.startNs, fileArr[0].startNs); } - private initSelect(fileStartNs: number, fileArr: Array): void { + private initSelect(fileStartNs: number, purgeTotalComFileArr: Array): void { let that = this; let input = this.selectEl!.shadowRoot?.querySelector('input') as HTMLInputElement; this.selectEl!.innerHTML = ''; @@ -57,13 +57,13 @@ export class TabPanePurgTotalComparisonAbility extends BaseElement { option.innerHTML = 'File Name'; option.setAttribute('disabled', 'disabled'); this.selectEl?.appendChild(option); - if (fileArr[0].name) option.setAttribute('value', fileArr[0].name); - this.selectEl!.defaultValue = fileArr[0].name; - this.selectEl!.placeholder = fileArr[0].name; - this.selectEl!.dataSource = fileArr; + if (purgeTotalComFileArr[0].name) option.setAttribute('value', purgeTotalComFileArr[0].name); + this.selectEl!.defaultValue = purgeTotalComFileArr[0].name; + this.selectEl!.placeholder = purgeTotalComFileArr[0].name; + this.selectEl!.dataSource = purgeTotalComFileArr; this.selectEl!.querySelectorAll('lit-select-option').forEach((a) => { a.addEventListener('onSelected', (e: any) => { - for (let f of fileArr) { + for (let f of purgeTotalComFileArr) { if (input.value === f.name) { that.updateComparisonData(fileStartNs, f.startNs); } diff --git a/ide/src/trace/component/trace/sheet/ability/TabPanePurgTotalSelection.ts b/ide/src/trace/component/trace/sheet/ability/TabPanePurgTotalSelection.ts index 967adcaa317b818da6c5a78a58782b6ff51a879d..80ac52df9855affbfca782196b1eb005715081d9 100644 --- a/ide/src/trace/component/trace/sheet/ability/TabPanePurgTotalSelection.ts +++ b/ide/src/trace/component/trace/sheet/ability/TabPanePurgTotalSelection.ts @@ -35,13 +35,13 @@ export class TabPanePurgTotalSelection extends BaseElement { async queryTableData(type: string, startNs: number) { if (type === 'ability') { - await querySysPurgeableSelectionTab(startNs).then((results) => { + await querySysPurgeableSelectionTab(startNs).then((purgeTotalSelectResults) => { this.purgeableSelectionSource = []; - if (results.length > 0) { + if (purgeTotalSelectResults.length > 0) { this.purgeableSelectionSource.push({ name: 'TimeStamp', value: ns2s(startNs) }); - for (let i = 0; i < results.length; i++) { - results[i].value = Utils.getBinaryByteWithUnit(results[i].value); - this.purgeableSelectionSource.push(results[i]); + for (let i = 0; i < purgeTotalSelectResults.length; i++) { + purgeTotalSelectResults[i].value = Utils.getBinaryByteWithUnit(purgeTotalSelectResults[i].value); + this.purgeableSelectionSource.push(purgeTotalSelectResults[i]); } this.purgeableSelectionTable!.recycleDataSource = this.purgeableSelectionSource; } diff --git a/ide/src/trace/component/trace/sheet/ark-ts/TabPaneComparison.ts b/ide/src/trace/component/trace/sheet/ark-ts/TabPaneComparison.ts index e13bd0ef4a6d230377c765195528a296b2a8ec15..64c5a9668e4933779bc0b222f55954fdf96a0e40 100644 --- a/ide/src/trace/component/trace/sheet/ark-ts/TabPaneComparison.ts +++ b/ide/src/trace/component/trace/sheet/ark-ts/TabPaneComparison.ts @@ -50,7 +50,7 @@ export class TabPaneComparison extends BaseElement { this.retainerTableEl = this.shadowRoot!.querySelector('#tb-retainer') as LitTable; this.filterEl = this.shadowRoot!.querySelector('#filter'); this.selectEl = this.filterEl?.shadowRoot?.querySelector('lit-select'); - this.search = this.filterEl?.shadowRoot?.querySelector('#filter-input') as HTMLInputElement; + this.search = this.filterEl?.shadowRoot?.querySelector('#js-memory-filter-input') as HTMLInputElement; this.rightTheadTable = this.retainerTableEl!.shadowRoot?.querySelector('.thead') as HTMLDivElement; this.leftTheadTable = this.comparisonTableEl!.shadowRoot?.querySelector('.thead') as HTMLDivElement; this.comparisonTable = this.comparisonTableEl.shadowRoot?.querySelector('.table') as HTMLDivElement; @@ -128,8 +128,8 @@ export class TabPaneComparison extends BaseElement { let i = 0; let that = this; let retainsTable = () => { - const getList = (list: Array) => { - list.forEach((row) => { + const getList = (comList: Array) => { + comList.forEach((row) => { let shallow = Math.round((row.shallowSize / this.fileSize) * 100) + '%'; let retained = Math.round((row.retainedSize / this.fileSize) * 100) + '%'; row.shallowPercent = shallow; @@ -142,9 +142,9 @@ export class TabPaneComparison extends BaseElement { } i++; // @ts-ignore - if (i < that.retainsData[0].distance - 1 && list[0].distance != '-') { - list[0].getChildren(); - list[0].expanded = false; + if (i < that.retainsData[0].distance - 1 && comList[0].distance != '-') { + comList[0].getChildren(); + comList[0].expanded = false; if (row.hasNext) { getList(row.children); } @@ -297,7 +297,7 @@ export class TabPaneComparison extends BaseElement { this.comparisonTableEl!.reMeauseHeight(); } - initSelect(fileId: number, fileArr: Array) { + initSelect(fileId: number, comFileArr: Array) { let that = this; let input = this.selectEl!.shadowRoot?.querySelector('input') as HTMLInputElement; this.selectEl!.innerHTML = ''; @@ -305,17 +305,17 @@ export class TabPaneComparison extends BaseElement { option.innerHTML = 'File Name'; option.setAttribute('disabled', 'disabled'); this.selectEl?.appendChild(option); - if (fileArr[0].name) { - option.setAttribute('value', fileArr[0].name); + if (comFileArr[0].name) { + option.setAttribute('value', comFileArr[0].name); } - this.selectEl!.defaultValue = fileArr[0].name || ''; - this.selectEl!.placeholder = fileArr[0].name || ''; - this.selectEl!.dataSource = fileArr; + this.selectEl!.defaultValue = comFileArr[0].name || ''; + this.selectEl!.placeholder = comFileArr[0].name || ''; + this.selectEl!.dataSource = comFileArr; this.selectEl!.querySelectorAll('lit-select-option').forEach((a) => { a.addEventListener('onSelected', (e) => { this.comparisonTable!.scrollTop = 0; this.retainerTableEl!.snapshotDataSource = []; - for (let f of fileArr) { + for (let f of comFileArr) { if (input.value == f.name) { that.updateComparisonData(fileId, f.id); } @@ -542,16 +542,6 @@ export class TabPaneComparison extends BaseElement { padding: 10px 10px 0 10px; height: calc(100% - 10px - 31px); } - tab-pane-filter { - border: solid rgb(216,216,216) 1px; - float: left; - position: fixed; - bottom: 0; - width: 100%; - } - selector{ - display: none; - } .show{ display: flex; flex: 1; @@ -563,6 +553,16 @@ export class TabPaneComparison extends BaseElement { left: 0; right: 0; } + selector{ + display: none; + } + tab-pane-filter { + border: solid rgb(216,216,216) 1px; + float: left; + position: fixed; + bottom: 0; + width: 100%; + } .loading{ bottom: 0; position: absolute; diff --git a/ide/src/trace/component/trace/sheet/ark-ts/TabPaneJsCpuStatistics.ts b/ide/src/trace/component/trace/sheet/ark-ts/TabPaneJsCpuStatistics.ts index 3e89ab99d4779f14643c07c83ec04375099d6c21..7fb7177fb3d8f919242343dffeadc6226118cf7a 100644 --- a/ide/src/trace/component/trace/sheet/ark-ts/TabPaneJsCpuStatistics.ts +++ b/ide/src/trace/component/trace/sheet/ark-ts/TabPaneJsCpuStatistics.ts @@ -49,10 +49,10 @@ export class TabPaneJsCpuStatistics extends BaseElement { private init() { const thTable = this.tabTitle!.querySelector('.th'); - const list = thTable!.querySelectorAll('div'); + const jsCpuStatTblNodes = thTable!.querySelectorAll('div'); if (this.tabTitle!.hasAttribute('sort')) { this.tabTitle!.removeAttribute('sort'); - list.forEach((item) => { + jsCpuStatTblNodes.forEach((item) => { item.querySelectorAll('svg').forEach((svg) => { svg.style.display = 'none'; }); diff --git a/ide/src/trace/component/trace/sheet/ark-ts/TabPaneSummary.ts b/ide/src/trace/component/trace/sheet/ark-ts/TabPaneSummary.ts index 4ae657e747411c2f4910ca9a12f736a62e7dcef0..86c120e45c4d1efc38a5d3cbe38e17fc9c64fc3d 100644 --- a/ide/src/trace/component/trace/sheet/ark-ts/TabPaneSummary.ts +++ b/ide/src/trace/component/trace/sheet/ark-ts/TabPaneSummary.ts @@ -13,19 +13,19 @@ * limitations under the License. */ -import { BaseElement, element } from '../../../../../base-ui/BaseElement.js'; -import { LitTable } from '../../../../../base-ui/table/lit-table.js'; +import {BaseElement, element} from '../../../../../base-ui/BaseElement.js'; +import {LitTable} from '../../../../../base-ui/table/lit-table.js'; import '../../../../../base-ui/table/lit-table.js'; -import { ConstructorItem, FileInfo } from '../../../../../js-heap/model/UiStruct.js'; -import { HeapDataInterface } from '../../../../../js-heap/HeapDataInterface.js'; +import {ConstructorItem, FileInfo} from '../../../../../js-heap/model/UiStruct.js'; +import {HeapDataInterface} from '../../../../../js-heap/HeapDataInterface.js'; import '../../../../../base-ui/table/lit-table-column.js'; -import { TabPaneJsMemoryFilter } from '../TabPaneJsMemoryFilter.js'; +import {TabPaneJsMemoryFilter} from '../TabPaneJsMemoryFilter.js'; import '../TabPaneJsMemoryFilter.js'; -import { LitProgressBar } from '../../../../../base-ui/progress-bar/LitProgressBar.js'; +import {LitProgressBar} from '../../../../../base-ui/progress-bar/LitProgressBar.js'; import '../../../../../base-ui/progress-bar/LitProgressBar.js'; import '../../../../../base-ui/slicer/lit-slicer.js'; -import { HeapSnapshotStruct } from '../../../../database/ui-worker/ProcedureWorkerHeapSnapshot.js'; -import { HeapTraceFunctionInfo } from '../../../../../js-heap/model/DatabaseStruct.js'; +import {HeapSnapshotStruct} from '../../../../database/ui-worker/ProcedureWorkerHeapSnapshot.js'; +import {HeapTraceFunctionInfo} from '../../../../../js-heap/model/DatabaseStruct.js'; @element('tabpane-summary') export class TabPaneSummary extends BaseElement { @@ -54,20 +54,20 @@ export class TabPaneSummary extends BaseElement { private leftTable: HTMLDivElement | null | undefined; initElements(): void { - this.tblSummary = this.shadowRoot?.querySelector('#left'); - this.tbs = this.shadowRoot?.querySelector('#right'); + this.tblSummary = this.shadowRoot?.querySelector('#summary_left'); + this.tbs = this.shadowRoot?.querySelector('#summary_right'); this.stackTable = this.shadowRoot?.querySelector('#stackTable'); this.stackText = this.shadowRoot?.querySelector('.stackText') as HTMLElement; this.tabFilter = this.shadowRoot?.querySelector('#filter') as TabPaneJsMemoryFilter; - this.progressEL = this.shadowRoot?.querySelector('.progress') as LitProgressBar; - this.search = this.tabFilter?.shadowRoot?.querySelector('#filter-input') as HTMLInputElement; + this.progressEL = this.shadowRoot?.querySelector('.summary_progress') as LitProgressBar; + this.search = this.tabFilter?.shadowRoot?.querySelector('#js-memory-filter-input') as HTMLInputElement; this.stack = this.shadowRoot?.querySelector('#stack') as HTMLLIElement; this.retainers = this.shadowRoot?.querySelector('#retainers') as HTMLLIElement; this.tblTable = this.tblSummary!.shadowRoot?.querySelector('.table') as HTMLDivElement; this.rightTheadTable = this.tbs!.shadowRoot?.querySelector('.thead') as HTMLDivElement; this.leftTheadTable = this.tblSummary!.shadowRoot?.querySelector('.thead') as HTMLDivElement; this.tbsTable = this.tbs!.shadowRoot?.querySelector('.table') as HTMLDivElement; - this.leftTable = this.shadowRoot?.querySelector('#left_table') as HTMLDivElement; + this.leftTable = this.shadowRoot?.querySelector('#summary_left_table') as HTMLDivElement; this.tblSummary!.addEventListener('row-click', (evt) => { this.rightTheadTable!.removeAttribute('sort'); this.tbsTable!.scrollTop = 0; @@ -166,12 +166,12 @@ export class TabPaneSummary extends BaseElement { } }); - this.tbs!.addEventListener('row-click', (evt: any) => { - let data = evt.detail.data as ConstructorItem; + this.tbs!.addEventListener('row-click', (summanyRowEvent: any) => { + let data = summanyRowEvent.detail.data as ConstructorItem; (data as any).isSelected = true; - if ((evt.detail as any).callBack) { + if ((summanyRowEvent.detail as any).callBack) { // @ts-ignore - (evt.detail as any).callBack(true); + (summanyRowEvent.detail as any).callBack(true); } }); @@ -354,6 +354,66 @@ export class TabPaneSummary extends BaseElement { this.clickToggleTable(); } + private retainsTableByDistance(currentLeftItem: ConstructorItem, sort: number) { + const getList = function (list: Array) { + list.sort((leftA, rightB) => { + return sort === 1 ? leftA.distance - rightB.distance : rightB.distance - leftA.distance; + }); + list.forEach(function (row) { + if (row.children.length > 0) { + getList(row.children); + } + }); + }; + getList(currentLeftItem.children); + } + + private retainsTableByShallowSize(currentLeftItem: ConstructorItem, sort: number) { + const getList = function (list: Array) { + list.sort((leftA, rightB) => { + return sort === 1 ? leftA.shallowSize - rightB.shallowSize : rightB.shallowSize - leftA.shallowSize; + }); + list.forEach(function (row) { + if (row.children.length > 0) { + getList(row.children); + } + }); + }; + getList(currentLeftItem.children); + } + + private retainsTableByRetainedSize(currentLeftItem: ConstructorItem, sort: number) { + const getList = function (list: Array) { + list.sort((leftA, rightB) => { + return sort === 1 + ? leftA.retainedSize - rightB.retainedSize + : rightB.retainedSize - leftA.retainedSize; + }); + list.forEach(function (row) { + if (row.children.length > 0) { + getList(row.children); + } + }); + }; + getList(currentLeftItem.children); + } + + private retainsTableByObjectName(currentLeftItem: ConstructorItem, sort: number) { + const getList = function (list: Array) { + list.sort((leftA, rightB) => { + return sort === 1 + ? (leftA.objectName + '').localeCompare(rightB.objectName + '') + : (rightB.objectName + '').localeCompare(leftA.objectName + ''); + }); + list.forEach(function (row) { + if (row.children.length > 0) { + getList(row.children); + } + }); + }; + getList(currentLeftItem.children); + } + sortByLeftTable(column: string, sort: number) { switch (sort) { case 0: @@ -375,20 +435,7 @@ export class TabPaneSummary extends BaseElement { return sort === 1 ? leftData.distance - rightData.distance : rightData.distance - leftData.distance; }); this.leftArray.forEach((currentLeftItem) => { - let retainsTable = function () { - const getList = function (list: Array) { - list.sort((leftA, rightB) => { - return sort === 1 ? leftA.distance - rightB.distance : rightB.distance - leftA.distance; - }); - list.forEach(function (row) { - if (row.children.length > 0) { - getList(row.children); - } - }); - }; - getList(currentLeftItem.children); - }; - retainsTable(); + this.retainsTableByDistance(currentLeftItem, sort); }); this.tblSummary!.snapshotDataSource = this.leftArray; break; @@ -399,20 +446,7 @@ export class TabPaneSummary extends BaseElement { : rightData.shallowSize - leftData.shallowSize; }); this.leftArray.forEach((currentLeftItem) => { - let retainsTable = function () { - const getList = function (list: Array) { - list.sort((leftA, rightB) => { - return sort === 1 ? leftA.shallowSize - rightB.shallowSize : rightB.shallowSize - leftA.shallowSize; - }); - list.forEach(function (row) { - if (row.children.length > 0) { - getList(row.children); - } - }); - }; - getList(currentLeftItem.children); - }; - retainsTable(); + this.retainsTableByShallowSize(currentLeftItem, sort); }); this.tblSummary!.snapshotDataSource = this.leftArray; break; @@ -423,22 +457,7 @@ export class TabPaneSummary extends BaseElement { : rightData.retainedSize - leftData.retainedSize; }); this.leftArray.forEach((currentLeftItem) => { - let retainsTable = function () { - const getList = function (list: Array) { - list.sort((leftA, rightB) => { - return sort === 1 - ? leftA.retainedSize - rightB.retainedSize - : rightB.retainedSize - leftA.retainedSize; - }); - list.forEach(function (row) { - if (row.children.length > 0) { - getList(row.children); - } - }); - }; - getList(currentLeftItem.children); - }; - retainsTable(); + this.retainsTableByRetainedSize(currentLeftItem, sort); }); this.tblSummary!.snapshotDataSource = this.leftArray; break; @@ -449,22 +468,7 @@ export class TabPaneSummary extends BaseElement { : (rightData.objectName + '').localeCompare(leftData.objectName + ''); }); this.leftArray.forEach((currentLeftItem) => { - let retainsTable = function () { - const getList = function (list: Array) { - list.sort((leftA, rightB) => { - return sort === 1 - ? (leftA.objectName + '').localeCompare(rightB.objectName + '') - : (rightB.objectName + '').localeCompare(leftA.objectName + ''); - }); - list.forEach(function (row) { - if (row.children.length > 0) { - getList(row.children); - } - }); - }; - getList(currentLeftItem.children); - }; - retainsTable(); + this.retainsTableByObjectName(currentLeftItem, sort); }); this.tblSummary!.snapshotDataSource = this.leftArray; break; @@ -486,20 +490,7 @@ export class TabPaneSummary extends BaseElement { return sort === 1 ? a.distance - b.distance : b.distance - a.distance; }); this.rightArray.forEach((list) => { - let retainsTable = function () { - const getList = function (list: Array) { - list.sort((a, b) => { - return sort === 1 ? a.distance - b.distance : b.distance - a.distance; - }); - list.forEach(function (row) { - if (row.children.length > 0) { - getList(row.children); - } - }); - }; - getList(list.children); - }; - retainsTable(); + this.retainsTableByDistance(list, sort); }); this.tbs!.snapshotDataSource = this.rightArray; break; @@ -508,20 +499,7 @@ export class TabPaneSummary extends BaseElement { return sort === 1 ? a.shallowSize - b.shallowSize : b.shallowSize - a.shallowSize; }); this.rightArray.forEach((list) => { - let retainsTable = function () { - const getList = function (list: Array) { - list.sort((a, b) => { - return sort === 1 ? a.shallowSize - b.shallowSize : b.shallowSize - a.shallowSize; - }); - list.forEach(function (row) { - if (row.children.length > 0) { - getList(row.children); - } - }); - }; - getList(list.children); - }; - retainsTable(); + this.retainsTableByShallowSize(list, sort); }); this.tbs!.snapshotDataSource = this.rightArray; break; @@ -530,20 +508,7 @@ export class TabPaneSummary extends BaseElement { return sort === 1 ? a.retainedSize - b.retainedSize : b.retainedSize - a.retainedSize; }); this.rightArray.forEach((list) => { - let retainsTable = function () { - const getList = function (list: Array) { - list.sort((a, b) => { - return sort === 1 ? a.retainedSize - b.retainedSize : b.retainedSize - a.retainedSize; - }); - list.forEach(function (row) { - if (row.children.length > 0) { - getList(row.children); - } - }); - }; - getList(list.children); - }; - retainsTable(); + this.retainsTableByRetainedSize(list, sort); }); this.tbs!.snapshotDataSource = this.rightArray; break; @@ -554,22 +519,7 @@ export class TabPaneSummary extends BaseElement { : (b.objectName + '').localeCompare(a.objectName + ''); }); this.rightArray.forEach((list) => { - let retainsTable = function () { - const getList = function (list: Array) { - list.sort((a, b) => { - return sort === 1 - ? (a.objectName + '').localeCompare(b.objectName + '') - : (b.objectName + '').localeCompare(a.objectName + ''); - }); - list.forEach(function (row) { - if (row.children.length > 0) { - getList(row.children); - } - }); - }; - getList(list.children); - }; - retainsTable(); + this.retainsTableByObjectName(list, sort); }); this.tbs!.snapshotDataSource = this.rightArray; break; @@ -747,7 +697,7 @@ export class TabPaneSummary extends BaseElement { bottom: 0; width: 100%; } - .progress{ + .summary_progress{ bottom: 33px; position: absolute; height: 1px; @@ -757,25 +707,24 @@ export class TabPaneSummary extends BaseElement { selector{ display: none; } - .show{ + .summary_show{ display: flex; flex: 1; } - .retainers{ + .summary_retainers{ height: 30px; - /* background: #D8D8D8; */ width: 100%; display: flex; } - #right{ + #summary_right{ height: calc(100% - 30px); }
- + -
- +
+ @@ -793,13 +742,13 @@ export class TabPaneSummary extends BaseElement {
-
+
  • Retainers
- + @@ -823,7 +772,7 @@ export class TabPaneSummary extends BaseElement { - +
`; } diff --git a/ide/src/trace/component/trace/sheet/cpu/TabPanePTS.ts b/ide/src/trace/component/trace/sheet/cpu/TabPanePTS.ts index 3a2f48aaf6e1c7b1874f9bc7cc1d45da1465fe26..830417ac65421c7724a0c66893ae5e5a9136d95b 100644 --- a/ide/src/trace/component/trace/sheet/cpu/TabPanePTS.ts +++ b/ide/src/trace/component/trace/sheet/cpu/TabPanePTS.ts @@ -47,11 +47,6 @@ export class TabPanePTS extends BaseElement { this.ptsRange = this.shadowRoot?.querySelector('#pts-time-range'); } - connectedCallback() { - super.connectedCallback(); - resizeObserver(this.parentElement!, this.ptsTbl!); - } - queryDataByDB(ptsVal: SelectionParam | any) { getStatesProcessThreadDataByRange(ptsVal.leftNs, ptsVal.rightNs).then((result) => { this.getDataByPTS(ptsVal.leftNs, ptsVal.rightNs, result); @@ -67,13 +62,16 @@ export class TabPanePTS extends BaseElement { }); } + connectedCallback() { + super.connectedCallback(); + resizeObserver(this.parentElement!, this.ptsTbl!); + } initHtml(): string { - return ` - diff --git a/ide/src/trace/component/trace/sheet/energy/TabPaneSystemDetails.ts b/ide/src/trace/component/trace/sheet/energy/TabPaneSystemDetails.ts index 204ddd59e01f35013a1eeae57176cae33619ead5..e8d84f1f560c1206399685cd27c362896def6361 100644 --- a/ide/src/trace/component/trace/sheet/energy/TabPaneSystemDetails.ts +++ b/ide/src/trace/component/trace/sheet/energy/TabPaneSystemDetails.ts @@ -101,6 +101,9 @@ export class TabPaneSystemDetails extends BaseElement { this.detailsTbl!.dataSource = this.detailsSource; this.boxDetails!.style.width = '65%'; } + this.detailsTbl!.shadowRoot?.querySelectorAll('.tr').forEach((tr) => { + tr.style.gridTemplateColumns = '120px 1fr'; + }); this.detailsTbl!.shadowRoot?.querySelectorAll('.td').forEach((td) => { let item = td.getAttribute('title'); td.style.fontSize = '14px'; diff --git a/ide/src/trace/component/trace/sheet/file-system/TabPaneCallTree.ts b/ide/src/trace/component/trace/sheet/file-system/TabPaneCallTree.ts index 0cf6eaf31dfd3cf80c6cf959ad70833aef8c8924..27cead375f9a970a9ef8ae71062311eb6fbb4f1d 100644 --- a/ide/src/trace/component/trace/sheet/file-system/TabPaneCallTree.ts +++ b/ide/src/trace/component/trace/sheet/file-system/TabPaneCallTree.ts @@ -36,11 +36,11 @@ export class TabPaneCallTree extends BaseElement { private callTreeDataSource: any[] = []; private callTreeSortKey = 'weight'; private callTreeSortType = 0; - private currentSelectedData: any = undefined; + private callTreeSelectedData: any = undefined; private frameChart: FrameChart | null | undefined; private isChartShow: boolean = false; private systmeRuleName = '/system/'; - private numRuleName = '/max/min/'; + private callTreeNumRuleName = '/max/min/'; private needShowMenu = true; private searchValue: string = ''; private loadingList: number[] = []; @@ -224,7 +224,7 @@ export class TabPaneCallTree extends BaseElement { let data = evt.detail.data as MerageBean; this.setRightTableData(data); data.isSelected = true; - this.currentSelectedData = data; + this.callTreeSelectedData = data; this.callTreeTbr?.clearAllSelection(data); this.callTreeTbr?.setCurrentSelection(data); // @ts-ignore @@ -283,27 +283,27 @@ export class TabPaneCallTree extends BaseElement { }); } else if (data.type == 'button') { if (data.item == 'symbol') { - if (this.currentSelectedData && !this.currentSelectedData.canCharge) { + if (this.callTreeSelectedData && !this.callTreeSelectedData.canCharge) { return; } - if (this.currentSelectedData != undefined) { - this.callTreeFilter!.addDataMining({ name: this.currentSelectedData.symbolName }, data.item); + if (this.callTreeSelectedData != undefined) { + this.callTreeFilter!.addDataMining({ name: this.callTreeSelectedData.symbolName }, data.item); callTreeFuncArgs.push({ funcName: 'splitTree', - funcArgs: [this.currentSelectedData.symbolName, false, true], + funcArgs: [this.callTreeSelectedData.symbolName, false, true], }); } else { return; } } else if (data.item == 'library') { - if (this.currentSelectedData && !this.currentSelectedData.canCharge) { + if (this.callTreeSelectedData && !this.callTreeSelectedData.canCharge) { return; } - if (this.currentSelectedData != undefined && this.currentSelectedData.libName != '') { - this.callTreeFilter!.addDataMining({ name: this.currentSelectedData.libName }, data.item); + if (this.callTreeSelectedData != undefined && this.callTreeSelectedData.libName != '') { + this.callTreeFilter!.addDataMining({ name: this.callTreeSelectedData.libName }, data.item); callTreeFuncArgs.push({ funcName: 'splitTree', - funcArgs: [this.currentSelectedData.libName, false, false], + funcArgs: [this.callTreeSelectedData.libName, false, false], }); } else { return; @@ -335,11 +335,11 @@ export class TabPaneCallTree extends BaseElement { this.frameChart!.data = this.callTreeDataSource; if (this.isChartShow) this.frameChart?.calculateChartData(); this.callTreeTbl!.move1px(); - if (this.currentSelectedData) { - this.currentSelectedData.isSelected = false; - this.callTreeTbl?.clearAllSelection(this.currentSelectedData); + if (this.callTreeSelectedData) { + this.callTreeSelectedData.isSelected = false; + this.callTreeTbl?.clearAllSelection(this.callTreeSelectedData); this.callTreeTbr!.recycleDataSource = []; - this.currentSelectedData = undefined; + this.callTreeSelectedData = undefined; } }); }; @@ -387,11 +387,11 @@ export class TabPaneCallTree extends BaseElement { let callTreeConstraintsArgs: any[] = [ { funcName: 'resotreAllNode', - funcArgs: [[this.numRuleName]], + funcArgs: [[this.callTreeNumRuleName]], }, { funcName: 'clearSplitMapData', - funcArgs: [this.numRuleName], + funcArgs: [this.callTreeNumRuleName], }, ]; if (data.checked) { @@ -413,7 +413,7 @@ export class TabPaneCallTree extends BaseElement { this.callTreeFilter!.getFilterData((callTreeFilterData: FilterData) => { if (this.searchValue != this.callTreeFilter!.filterValue) { this.searchValue = this.callTreeFilter!.filterValue; - let args = [ + let callTreeArgs = [ { funcName: 'setSearchValue', funcArgs: [this.searchValue], @@ -423,7 +423,7 @@ export class TabPaneCallTree extends BaseElement { funcArgs: [], }, ]; - this.getDataByWorker(args, (result: any[]) => { + this.getDataByWorker(callTreeArgs, (result: any[]) => { this.setLTableData(result); this.frameChart!.data = this.callTreeDataSource; this.switchFlameChart(callTreeFilterData); @@ -556,11 +556,6 @@ export class TabPaneCallTree extends BaseElement { initHtml(): string { return `
diff --git a/ide/src/trace/component/trace/sheet/file-system/TabPaneFileSystemCalltree.ts b/ide/src/trace/component/trace/sheet/file-system/TabPaneFileSystemCalltree.ts index 23352d7910b42bd91179e01b813f7348a24c003a..20486ddf1b5684ec78590e70512b6313710b1201 100644 --- a/ide/src/trace/component/trace/sheet/file-system/TabPaneFileSystemCalltree.ts +++ b/ide/src/trace/component/trace/sheet/file-system/TabPaneFileSystemCalltree.ts @@ -42,7 +42,7 @@ export class TabpaneFilesystemCalltree extends BaseElement { private frameChart: FrameChart | null | undefined; private isChartShow: boolean = false; private systmeRuleName = '/system/'; - private numRuleName = '/max/min/'; + private fsCallTreeNumRuleName = '/max/min/'; private modal: DisassemblingWindow | null | undefined; private needShowMenu = true; private searchValue: string = ''; @@ -342,11 +342,11 @@ export class TabpaneFilesystemCalltree extends BaseElement { let fsCallTreeConstraintsArgs: any[] = [ { funcName: 'resotreAllNode', - funcArgs: [[this.numRuleName]], + funcArgs: [[this.fsCallTreeNumRuleName]], }, { funcName: 'clearSplitMapData', - funcArgs: [this.numRuleName], + funcArgs: [this.fsCallTreeNumRuleName], }, ]; if (data.checked) { @@ -368,7 +368,7 @@ export class TabpaneFilesystemCalltree extends BaseElement { this.fsCallTreeFilter!.getFilterData((data: FilterData) => { if (this.searchValue != this.fsCallTreeFilter!.filterValue) { this.searchValue = this.fsCallTreeFilter!.filterValue; - let args = [ + let fileArgs = [ { funcName: 'setSearchValue', funcArgs: [this.searchValue], @@ -378,7 +378,7 @@ export class TabpaneFilesystemCalltree extends BaseElement { funcArgs: [], }, ]; - this.getDataByWorker(args, (result: any[]) => { + this.getDataByWorker(fileArgs, (result: any[]) => { this.setLTableData(result); this.frameChart!.data = this.fsCallTreeDataSource; this.switchFlameChart(data); @@ -545,11 +545,6 @@ export class TabpaneFilesystemCalltree extends BaseElement { initHtml(): string { return `
diff --git a/ide/src/trace/component/trace/sheet/file-system/TabPaneFileSystemDescHistory.ts b/ide/src/trace/component/trace/sheet/file-system/TabPaneFileSystemDescHistory.ts index bbb0175946a713278d2904c578c6cc74eea72dab..837854ba1a39fadb6ec163e1454ac602d668afd3 100644 --- a/ide/src/trace/component/trace/sheet/file-system/TabPaneFileSystemDescHistory.ts +++ b/ide/src/trace/component/trace/sheet/file-system/TabPaneFileSystemDescHistory.ts @@ -288,15 +288,15 @@ export class TabPaneFileSystemDescHistory extends BaseElement {
- +