diff --git a/ide/src/trace/bean/BoxSelection.ts b/ide/src/trace/bean/BoxSelection.ts
index dd3885065209079dfaef1e43cb4f238cc4e304fe..f629fee2278c92d1f61db7c09f8f03e5a1e890f5 100644
--- a/ide/src/trace/bean/BoxSelection.ts
+++ b/ide/src/trace/bean/BoxSelection.ts
@@ -36,7 +36,6 @@ import { JsCpuProfilerStruct } from '../database/ui-worker/ProcedureWorkerCpuPro
import { SampleStruct } from '../database/ui-worker/ProcedureWorkerBpftrace';
export class SelectionParam {
-
recordStartNs: number = 0;
leftNs: number = 0;
rightNs: number = 0;
@@ -112,11 +111,11 @@ export class SelectionParam {
gpuTotal: boolean;
gpuWindow: boolean;
} = {
- gl: false,
- graph: false,
- gpuWindow: false,
- gpuTotal: false,
- };
+ gl: false,
+ graph: false,
+ gpuWindow: false,
+ gpuTotal: false,
+ };
purgeableTotalAbility: Array
= [];
purgeableTotalVM: Array = [];
purgeablePinAbility: Array = [];
@@ -133,7 +132,7 @@ export class SelectionParam {
hiSysEvents: Array = [];
sampleData: Array = [];
- // @ts-ignore
+ // @ts-ignore
pushSampleData(it: TraceRow): void {
if (it.rowType === TraceRow.ROW_TYPE_SAMPLE) {
let dataList: SampleStruct[] = JSON.parse(JSON.stringify(it.dataList));
@@ -141,7 +140,7 @@ export class SelectionParam {
dataList.forEach((SampleStruct) => {
SampleStruct.property = SampleStruct.property!.filter(
(i: unknown) =>
- // @ts-ignore
+ // @ts-ignore
(i.begin! - i.startTs! ?? 0) >= TraceRow.rangeSelectObject!.startNS! &&
// @ts-ignore
(i.end! - i.startTs! ?? 0) <= TraceRow.rangeSelectObject!.endNS!
@@ -154,7 +153,7 @@ export class SelectionParam {
}
}
- // @ts-ignore
+ // @ts-ignore
pushCpus(it: TraceRow): void {
if (it.rowType === TraceRow.ROW_TYPE_CPU) {
this.cpus.push(parseInt(it.rowId!));
@@ -162,7 +161,7 @@ export class SelectionParam {
}
}
- // @ts-ignore
+ // @ts-ignore
pushCpuStateFilterIds(it: TraceRow): void {
if (it.rowType === TraceRow.ROW_TYPE_CPU_STATE_ALL) {
it.childrenList.forEach((child) => {
@@ -179,7 +178,7 @@ export class SelectionParam {
}
}
- // @ts-ignore
+ // @ts-ignore
pushCpuFreqFilter(it: TraceRow): void {
if (it.rowType === TraceRow.ROW_TYPE_CPU_FREQ_ALL) {
it.childrenList.forEach((child) => {
@@ -200,7 +199,7 @@ export class SelectionParam {
}
}
- // @ts-ignore
+ // @ts-ignore
pushCpuFreqLimit(it: TraceRow): void {
if (it.rowType === TraceRow.ROW_TYPE_CPU_FREQ_LIMITALL) {
it.childrenList.forEach((child) => {
@@ -221,7 +220,7 @@ export class SelectionParam {
}
}
- // @ts-ignore
+ // @ts-ignore
pushProcess(it: TraceRow, sp: SpSystemTrace): void {
if (it.rowType === TraceRow.ROW_TYPE_PROCESS) {
sp.pushPidToSelection(this, it.rowId!);
@@ -261,7 +260,7 @@ export class SelectionParam {
}
}
- // @ts-ignore
+ // @ts-ignore
pushNativeMemory(it: TraceRow, sp: SpSystemTrace): void {
if (it.rowType === TraceRow.ROW_TYPE_NATIVE_MEMORY) {
// @ts-ignore
@@ -296,7 +295,7 @@ export class SelectionParam {
}
}
- // @ts-ignore
+ // @ts-ignore
pushFunc(it: TraceRow, sp: SpSystemTrace): void {
if (it.rowType === TraceRow.ROW_TYPE_FUNC) {
TabPaneTaskFrames.TaskArray = [];
@@ -310,12 +309,12 @@ export class SelectionParam {
this.funTids.push(parseInt(it.rowId!));
}
- let isIntersect = (filterFunc: FuncStruct, rangeData: RangeSelectStruct) : boolean =>
+ let isIntersect = (filterFunc: FuncStruct, rangeData: RangeSelectStruct): boolean =>
Math.max(filterFunc.startTs! + filterFunc.dur!, rangeData!.endNS || 0) -
Math.min(filterFunc.startTs!, rangeData!.startNS || 0) <
filterFunc.dur! + (rangeData!.endNS || 0) - (rangeData!.startNS || 0) &&
filterFunc.funName!.indexOf('H:Task ') >= 0;
- // @ts-ignore
+ // @ts-ignore
let taskData = it.dataListCache.filter((taskData: FuncStruct) => {
taskData!.tid = parseInt(it.rowId!);
return isIntersect(taskData, TraceRow.rangeSelectObject!);
@@ -328,7 +327,7 @@ export class SelectionParam {
}
}
- // @ts-ignore
+ // @ts-ignore
pushHeap(it: TraceRow, sp: SpSystemTrace): void {
if (it.rowType === TraceRow.ROW_TYPE_HEAP) {
const key = it.rowParentId!.split(' ');
@@ -354,7 +353,7 @@ export class SelectionParam {
}
}
- // @ts-ignore
+ // @ts-ignore
pushMonitor(it: TraceRow, sp: SpSystemTrace): void {
if (it.rowType === TraceRow.ROW_TYPE_MONITOR) {
// @ts-ignore
@@ -389,7 +388,7 @@ export class SelectionParam {
}
}
- // @ts-ignore
+ // @ts-ignore
pushHiperf(it: TraceRow, sp: SpSystemTrace): void {
if (it.rowType?.startsWith('hiperf')) {
if (it.rowType === TraceRow.ROW_TYPE_HIPERF_EVENT || it.rowType === TraceRow.ROW_TYPE_HIPERF_REPORT) {
@@ -441,7 +440,7 @@ export class SelectionParam {
}
}
- // @ts-ignore
+ // @ts-ignore
pushFileSystem(it: TraceRow, sp: SpSystemTrace): void {
if (it.rowType === TraceRow.ROW_TYPE_FILE_SYSTEM) {
if (it.rowId === 'FileSystemLogicalWrite') {
@@ -489,7 +488,7 @@ export class SelectionParam {
this.gpu.gl =
item.dataListCache.filter(
(it) =>
- // @ts-ignore
+ // @ts-ignore
(it.startNs >= this.leftNs && it.startNs <= this.rightNs) ||
// @ts-ignore
(it.endNs >= this.leftNs && it.endNs <= this.rightNs)
@@ -499,7 +498,7 @@ export class SelectionParam {
item.dataListCache.filter(
// @ts-ignore
(it) =>
- // @ts-ignore
+ // @ts-ignore
(it.startNs >= this.leftNs && it.startNs <= this.rightNs) ||
// @ts-ignore
(it.endNs >= this.leftNs && it.endNs <= this.rightNs)
@@ -508,7 +507,7 @@ export class SelectionParam {
this.gpu.gpuTotal =
item.dataListCache.filter(
(it) =>
- // @ts-ignore
+ // @ts-ignore
(it.startNs >= this.leftNs && it.startNs <= this.rightNs) ||
// @ts-ignore
(it.endNs >= this.leftNs && it.endNs <= this.rightNs)
@@ -517,7 +516,7 @@ export class SelectionParam {
this.gpu.gpuWindow =
item.dataListCache.filter(
(it) =>
- // @ts-ignore
+ // @ts-ignore
(it.startNs >= this.leftNs && it.startNs <= this.rightNs) ||
// @ts-ignore
(it.endNs >= this.leftNs && it.endNs <= this.rightNs)
@@ -577,7 +576,7 @@ export class SelectionParam {
}
}
- // @ts-ignore
+ // @ts-ignore
pushJank(it: TraceRow, sp: SpSystemTrace): void {
if (it.rowType === TraceRow.ROW_TYPE_JANK) {
let isIntersect = (filterJank: JanksStruct, rangeData: RangeSelectStruct): boolean =>
@@ -615,7 +614,7 @@ export class SelectionParam {
}
}
- // @ts-ignore
+ // @ts-ignore
pushHeapTimeline(it: TraceRow, sp: SpSystemTrace): void {
if (it.rowType === TraceRow.ROW_TYPE_HEAP_TIMELINE) {
const [rangeStart, rangeEnd] = [TraceRow.range?.startNS, TraceRow.range?.endNS];
@@ -647,7 +646,7 @@ export class SelectionParam {
}
// If the start time range of the selected box is greater than the end time of the sampled data
- // @ts-ignore
+ // @ts-ignore
if (startNS! >= it.dataListCache[it.dataListCache.length - 1].timestamp * 1000) {
// @ts-ignore
minNodeId = it.dataListCache[it.dataListCache.length - 1].lastAssignedId;
@@ -657,7 +656,7 @@ export class SelectionParam {
minNodeId = HeapDataInterface.getInstance().getMinNodeId(sp.snapshotFiles!.id);
}
//If you select the box from the ending
- // @ts-ignore
+ // @ts-ignore
if (endNS! >= rangeEnd! || endNS! >= it.dataListCache[it.dataListCache.length - 1].timestampUs * 1000) {
maxNodeId = HeapDataInterface.getInstance().getMaxNodeId(sp.snapshotFiles!.id);
}
@@ -669,7 +668,7 @@ export class SelectionParam {
}
}
- // @ts-ignore
+ // @ts-ignore
pushJsCpuProfiler(it: TraceRow, sp: SpSystemTrace): void {
if (it.rowType === TraceRow.ROW_TYPE_JS_CPU_PROFILER) {
let isIntersect = (a: JsCpuProfilerStruct, b: RangeSelectStruct): boolean =>
@@ -698,7 +697,7 @@ export class SelectionParam {
}
}
- // @ts-ignore
+ // @ts-ignore
pushSysMemoryGpu(it: TraceRow, sp: SpSystemTrace): void {
// @ts-ignore
if (it.rowType === TraceRow.ROW_TYPE_SYS_MEMORY_GPU) {
@@ -718,7 +717,7 @@ export class SelectionParam {
this.gpu.gl =
th.dataListCache.filter(
(it) =>
- // @ts-ignore
+ // @ts-ignore
(it.startNs >= this.leftNs && it.startNs <= this.rightNs) ||
// @ts-ignore
(it.endNs >= this.leftNs && it.endNs <= this.rightNs)
@@ -727,7 +726,7 @@ export class SelectionParam {
this.gpu.graph =
th.dataListCache.filter(
(it) =>
- // @ts-ignore
+ // @ts-ignore
(it.startNs >= this.leftNs && it.startNs <= this.rightNs) ||
// @ts-ignore
(it.endNs >= this.leftNs && it.endNs <= this.rightNs)
@@ -736,7 +735,7 @@ export class SelectionParam {
this.gpu.gpuTotal =
th.dataListCache.filter(
(it) =>
- // @ts-ignore
+ // @ts-ignore
(it.startNs >= this.leftNs && it.startNs <= this.rightNs) ||
// @ts-ignore
(it.endNs >= this.leftNs && it.endNs <= this.rightNs)
@@ -745,7 +744,7 @@ export class SelectionParam {
this.gpu.gpuWindow =
th.dataListCache.filter(
(it) =>
- // @ts-ignore
+ // @ts-ignore
(it.startNs >= this.leftNs && it.startNs <= this.rightNs) ||
// @ts-ignore
(it.endNs >= this.leftNs && it.endNs <= this.rightNs)
@@ -755,13 +754,13 @@ export class SelectionParam {
}
}
- // @ts-ignore
+ // @ts-ignore
pushSDK(it: TraceRow, sp: SpSystemTrace): void {
if (it.rowType?.startsWith(TraceRow.ROW_TYPE_SDK)) {
if (it.rowType === TraceRow.ROW_TYPE_SDK) {
// @ts-ignore
let sdkRows: Array> = [
- // @ts-ignore
+ // @ts-ignore
...sp.shadowRoot!.querySelectorAll>(`trace-row[row-parent-id='${it.rowId}']`),
];
if (!it.expansion) {
@@ -781,7 +780,7 @@ export class SelectionParam {
}
}
- // @ts-ignore
+ // @ts-ignore
pushVmTrackerSmaps(it: TraceRow, sp: SpSystemTrace): void {
if (it.rowType === TraceRow.ROW_TYPE_VM_TRACKER_SMAPS) {
this.smapsType.push(...intersectData(it)!);
@@ -802,7 +801,7 @@ export class SelectionParam {
}
}
- // @ts-ignore
+ // @ts-ignore
pushIrq(it: TraceRow): void {
if (it.rowType === TraceRow.ROW_TYPE_IRQ_GROUP) {
it.childrenList.forEach((child) => {
@@ -825,13 +824,13 @@ export class SelectionParam {
}
}
- // @ts-ignore
+ // @ts-ignore
pushSysMemoryGpuGl(it: TraceRow, sp: SpSystemTrace): void {
if (it.rowType === TraceRow.ROW_TYPE_SYS_MEMORY_GPU_GL) {
this.gpu.gl =
it.dataListCache.filter(
(it) =>
- // @ts-ignore
+ // @ts-ignore
(it.startNs >= this.leftNs && it.startNs <= this.rightNs) ||
// @ts-ignore
(it.endNs >= this.leftNs && it.endNs <= this.rightNs)
@@ -839,11 +838,11 @@ export class SelectionParam {
}
}
- // @ts-ignore
+ // @ts-ignore
pushFrameDynamic(it: TraceRow, sp: SpSystemTrace): void {
if (it.rowType === TraceRow.ROW_TYPE_FRAME_DYNAMIC) {
let appName = it.getAttribute('model-name');
- let isSelect = (dynamicStruct: FrameDynamicStruct, b: RangeSelectStruct) : boolean =>
+ let isSelect = (dynamicStruct: FrameDynamicStruct, b: RangeSelectStruct): boolean =>
dynamicStruct.ts >= b.startNS! && dynamicStruct.ts <= b.endNS!;
let frameDynamicList = it.dataListCache.filter(
// @ts-ignore
@@ -857,13 +856,13 @@ export class SelectionParam {
}
}
- // @ts-ignore
+ // @ts-ignore
pushFrameSpacing(it: TraceRow): void {
if (it.rowType === TraceRow.ROW_TYPE_FRAME_SPACING) {
let appName = it.getAttribute('model-name');
- let isSelect = (a: FrameSpacingStruct, b: RangeSelectStruct) : boolean =>
+ let isSelect = (a: FrameSpacingStruct, b: RangeSelectStruct): boolean =>
a.currentTs >= b.startNS! && a.currentTs <= b.endNS!;
- // @ts-ignore
+ // @ts-ignore
let frameDatas = it.dataListCache.filter((frameData: FrameSpacingStruct) => {
return (
isSelect(frameData, TraceRow.rangeSelectObject!) &&
@@ -877,14 +876,14 @@ export class SelectionParam {
}
}
- // @ts-ignore
+ // @ts-ignore
pushFrameAnimation(it: TraceRow): void {
if (it.rowType === TraceRow.ROW_TYPE_FRAME_ANIMATION) {
let isIntersect = (animationStruct: FrameAnimationStruct, selectStruct: RangeSelectStruct): boolean =>
Math.max(animationStruct.startTs! + animationStruct.dur!, selectStruct!.endNS || 0) -
Math.min(animationStruct.startTs!, selectStruct!.startNS || 0) <
animationStruct.dur! + (selectStruct!.endNS || 0) - (selectStruct!.startNS || 0);
- // @ts-ignore
+ // @ts-ignore
let frameAnimationList = it.dataListCache.filter((frameAnimationBean: FrameAnimationStruct) => {
return isIntersect(frameAnimationBean, TraceRow.rangeSelectObject!);
});
@@ -893,13 +892,13 @@ export class SelectionParam {
}
}
- // @ts-ignore
+ // @ts-ignore
pushSysMemoryGpuWindow(it: TraceRow): void {
if (it.rowType === TraceRow.ROW_TYPE_SYS_MEMORY_GPU_WINDOW) {
this.gpu.gpuWindow =
it.dataListCache.filter(
(it) =>
- // @ts-ignore
+ // @ts-ignore
(it.startNs >= this.leftNs && it.startNs <= this.rightNs) ||
// @ts-ignore
(it.endNs >= this.leftNs && it.endNs <= this.rightNs)
@@ -907,13 +906,13 @@ export class SelectionParam {
}
}
- // @ts-ignore
+ // @ts-ignore
pushSysMemoryGpuTotal(it: TraceRow): void {
if (it.rowType === TraceRow.ROW_TYPE_SYS_MEMORY_GPU_TOTAL) {
this.gpu.gpuTotal =
it.dataListCache.filter(
(it) =>
- // @ts-ignore
+ // @ts-ignore
(it.startNs >= this.leftNs && it.startNs <= this.rightNs) ||
// @ts-ignore
(it.endNs >= this.leftNs && it.endNs <= this.rightNs)
@@ -921,13 +920,13 @@ export class SelectionParam {
}
}
- // @ts-ignore
+ // @ts-ignore
pushSysMemoryGpuGraph(it: TraceRow): void {
if (it.rowType === TraceRow.ROW_TYPE_SYS_MEMORY_GPU_GRAPH) {
this.gpu.graph =
it.dataListCache.filter(
(it) =>
- // @ts-ignore
+ // @ts-ignore
(it.startNs >= this.leftNs && it.startNs <= this.rightNs) ||
// @ts-ignore
(it.endNs >= this.leftNs && it.endNs <= this.rightNs)
@@ -935,7 +934,7 @@ export class SelectionParam {
}
}
- // @ts-ignore
+ // @ts-ignore
pushStaticInit(it: TraceRow, sp: SpSystemTrace): void {
if (it.rowType === TraceRow.ROW_TYPE_STATIC_INIT) {
this.staticInit = true;
@@ -944,7 +943,7 @@ export class SelectionParam {
}
}
- // @ts-ignore
+ // @ts-ignore
pushAppStartUp(it: TraceRow, sp: SpSystemTrace): void {
if (it.rowType === TraceRow.ROW_TYPE_APP_STARTUP) {
this.startup = true;
@@ -953,7 +952,7 @@ export class SelectionParam {
}
}
- // @ts-ignore
+ // @ts-ignore
pushThread(it: TraceRow, sp: SpSystemTrace): void {
if (it.rowType === TraceRow.ROW_TYPE_THREAD) {
sp.pushPidToSelection(this, it.rowParentId!);
@@ -962,7 +961,7 @@ export class SelectionParam {
}
}
- // @ts-ignore
+ // @ts-ignore
pushVirtualMemory(it: TraceRow, sp: SpSystemTrace): void {
if (it.rowType === TraceRow.ROW_TYPE_MEM || it.rowType === TraceRow.ROW_TYPE_VIRTUAL_MEMORY) {
if (it.rowType === TraceRow.ROW_TYPE_MEM) {
@@ -974,7 +973,7 @@ export class SelectionParam {
}
}
- // @ts-ignore
+ // @ts-ignore
pushFps(it: TraceRow, sp: SpSystemTrace): void {
if (it.rowType === TraceRow.ROW_TYPE_FPS) {
this.hasFps = true;
@@ -982,7 +981,7 @@ export class SelectionParam {
}
}
- // @ts-ignore
+ // @ts-ignore
pushCpuAbility(it: TraceRow, sp: SpSystemTrace): void {
if (it.rowType === TraceRow.ROW_TYPE_CPU_ABILITY) {
this.cpuAbilityIds.push(it.rowId!);
@@ -990,7 +989,7 @@ export class SelectionParam {
}
}
- // @ts-ignore
+ // @ts-ignore
pushMemoryAbility(it: TraceRow, sp: SpSystemTrace): void {
if (it.rowType === TraceRow.ROW_TYPE_MEMORY_ABILITY) {
this.memoryAbilityIds.push(it.rowId!);
@@ -998,7 +997,7 @@ export class SelectionParam {
}
}
- // @ts-ignore
+ // @ts-ignore
pushDiskAbility(it: TraceRow, sp: SpSystemTrace): void {
if (it.rowType === TraceRow.ROW_TYPE_DISK_ABILITY) {
this.diskAbilityIds.push(it.rowId!);
@@ -1006,7 +1005,7 @@ export class SelectionParam {
}
}
- // @ts-ignore
+ // @ts-ignore
pushNetworkAbility(it: TraceRow, sp: SpSystemTrace): void {
if (it.rowType === TraceRow.ROW_TYPE_NETWORK_ABILITY) {
this.networkAbilityIds.push(it.rowId!);
@@ -1014,49 +1013,49 @@ export class SelectionParam {
}
}
- // @ts-ignore
+ // @ts-ignore
pushDmaAbility(it: TraceRow, sp: SpSystemTrace): void {
if (it.rowType === TraceRow.ROW_TYPE_DMA_ABILITY) {
this.dmaAbilityData.push(...intersectData(it)!);
}
}
- // @ts-ignore
+ // @ts-ignore
pushGpuMemoryAbility(it: TraceRow, sp: SpSystemTrace): void {
if (it.rowType === TraceRow.ROW_TYPE_GPU_MEMORY_ABILITY) {
this.gpuMemoryAbilityData.push(...intersectData(it)!);
}
}
- // @ts-ignore
+ // @ts-ignore
pushPowerEnergy(it: TraceRow, sp: SpSystemTrace): void {
if (it.rowType === TraceRow.ROW_TYPE_POWER_ENERGY) {
this.powerEnergy.push(it.rowId!);
}
}
- // @ts-ignore
+ // @ts-ignore
pushSystemEnergy(it: TraceRow, sp: SpSystemTrace): void {
if (it.rowType === TraceRow.ROW_TYPE_SYSTEM_ENERGY) {
this.systemEnergy.push(it.rowId!);
}
}
- // @ts-ignore
+ // @ts-ignore
pushAnomalyEnergy(it: TraceRow, sp: SpSystemTrace): void {
if (it.rowType === TraceRow.ROW_TYPE_ANOMALY_ENERGY) {
this.anomalyEnergy.push(it.rowId!);
}
}
- // @ts-ignore
+ // @ts-ignore
pushVmTrackerShm(it: TraceRow, sp: SpSystemTrace): void {
if (it.rowType === TraceRow.ROW_TYPE_VMTRACKER_SHM) {
this.vmtrackershm.push(...intersectData(it)!);
}
}
- // @ts-ignore
+ // @ts-ignore
pushClock(it: TraceRow, sp: SpSystemTrace): void {
if (it.rowType === TraceRow.ROW_TYPE_CLOCK_GROUP) {
it.childrenList.forEach((it) => {
@@ -1070,21 +1069,21 @@ export class SelectionParam {
}
}
- // @ts-ignore
+ // @ts-ignore
pushGpuMemoryVmTracker(it: TraceRow, sp: SpSystemTrace): void {
if (it.rowType === TraceRow.ROW_TYPE_GPU_MEMORY_VMTRACKER) {
this.gpuMemoryTrackerData.push(...intersectData(it)!);
}
}
- // @ts-ignore
+ // @ts-ignore
pushDmaVmTracker(it: TraceRow, sp: SpSystemTrace): void {
if (it.rowType === TraceRow.ROW_TYPE_DMA_VMTRACKER) {
this.dmaVmTrackerData.push(...intersectData(it)!);
}
}
- // @ts-ignore
+ // @ts-ignore
pushPugreable(it: TraceRow, sp: SpSystemTrace): void {
if (it.rowType === TraceRow.ROW_TYPE_PURGEABLE_TOTAL_ABILITY) {
this.purgeableTotalAbility.push(...intersectData(it));
@@ -1100,42 +1099,42 @@ export class SelectionParam {
}
}
- // @ts-ignore
+ // @ts-ignore
pushPugreablePinAbility(it: TraceRow, sp: SpSystemTrace): void {
if (it.rowType === TraceRow.ROW_TYPE_PURGEABLE_PIN_ABILITY) {
this.purgeablePinAbility.push(...intersectData(it));
}
}
- // @ts-ignore
+ // @ts-ignore
pushPugreableTotalVm(it: TraceRow, sp: SpSystemTrace): void {
if (it.rowType === TraceRow.ROW_TYPE_PURGEABLE_TOTAL_VM) {
this.purgeableTotalVM.push(...intersectData(it));
}
}
- // @ts-ignore
+ // @ts-ignore
pushPugreablePinVm(it: TraceRow, sp: SpSystemTrace): void {
if (it.rowType === TraceRow.ROW_TYPE_PURGEABLE_PIN_VM) {
this.purgeablePinVM.push(...intersectData(it));
}
}
- // @ts-ignore
+ // @ts-ignore
pushLogs(it: TraceRow, sp: SpSystemTrace): void {
if (it.rowType === TraceRow.ROW_TYPE_LOGS) {
this.hiLogs.push(it.rowId!);
}
}
- // @ts-ignore
+ // @ts-ignore
pushHiSysEvent(it: TraceRow, sp: SpSystemTrace): void {
if (it.rowType === TraceRow.ROW_TYPE_HI_SYSEVENT) {
this.hiSysEvents.push(it.rowId!);
}
}
- // @ts-ignore
+ // @ts-ignore
pushSelection(it: TraceRow, sp: SpSystemTrace): void {
this.pushCpus(it);
this.pushCpuStateFilterIds(it);
diff --git a/ide/src/trace/bean/JsStruct.ts b/ide/src/trace/bean/JsStruct.ts
index 4f93fe5f41efe7fb528956e43d80384647bf6ac1..d0c8f44bb30d7dc0fc6c62ca36eb94fb6bda9ae2 100644
--- a/ide/src/trace/bean/JsStruct.ts
+++ b/ide/src/trace/bean/JsStruct.ts
@@ -56,7 +56,7 @@ export class JsCpuProfilerChartFrame extends JsCpuProfilerUIStruct {
startTime: number;
endTime: number;
children: Array;
- childrenIds: Array;
+ childrenIds: Array;
samplesIds: Array;
isSelect: boolean = false;
parent?: JsCpuProfilerChartFrame;
diff --git a/ide/src/trace/bean/ThreadStruct.ts b/ide/src/trace/bean/ThreadStruct.ts
index d14d0efa234806ad835145d1283dc47b5e040c61..e9f077c011510d6d1a2d28e9b9eab94c527357fd 100644
--- a/ide/src/trace/bean/ThreadStruct.ts
+++ b/ide/src/trace/bean/ThreadStruct.ts
@@ -90,7 +90,10 @@ export class ThreadStruct extends BaseStruct {
}
}
- private static drawRectAndString(threadBeanCanvasCtx: CanvasRenderingContext2D, threadBeanStructData: ThreadStruct): void {
+ private static drawRectAndString(
+ threadBeanCanvasCtx: CanvasRenderingContext2D,
+ threadBeanStructData: ThreadStruct
+ ): void {
// @ts-ignore
threadBeanCanvasCtx.fillRect(
threadBeanStructData.frame!.x,
diff --git a/ide/src/trace/component/SpRecordConfigModel.ts b/ide/src/trace/component/SpRecordConfigModel.ts
index ca35178d8979d4d0a556d590d7f30db7fcb19a17..15224b9571204a7a7a2655ec63d7cd2542ef6adc 100644
--- a/ide/src/trace/component/SpRecordConfigModel.ts
+++ b/ide/src/trace/component/SpRecordConfigModel.ts
@@ -531,7 +531,7 @@ export function createNativePluginConfig(
nativeConfig.mallocFreeMatchingInterval = spAllocations.sample_interval;
}
}
- nativeConfig.jsStackReport = spAllocations!.recordJsStack;
+ nativeConfig.jsStackReport = spAllocations!.recordJsStack ? 1 : 0;
if (spAllocations!.recordJsStack) {
nativeConfig.maxJsStackDepth = spAllocations!.max_js_stack_depth;
nativeConfig.filterNapiName = spAllocations!.filter_napi_name;
diff --git a/ide/src/trace/component/SpRecordTrace.ts b/ide/src/trace/component/SpRecordTrace.ts
index 7835ac26d403c45b4c7345492c669afdb511235f..bcbd6017fb19f9f252dd12bce029542d8d27f43c 100644
--- a/ide/src/trace/component/SpRecordTrace.ts
+++ b/ide/src/trace/component/SpRecordTrace.ts
@@ -290,7 +290,8 @@ export class SpRecordTrace extends BaseElement {
private freshMenuDisable(disable: boolean): void {
let mainMenu = this.sp!.shadowRoot?.querySelector('#main-menu') as LitMainMenu;
- mainMenu.menus?.forEach((men): void => {// @ts-ignore
+ mainMenu.menus?.forEach((men): void => {
+ // @ts-ignore
men.children.forEach((child: HTMLElement): void => {
// @ts-ignore
child.disabled = disable;
@@ -996,7 +997,7 @@ export class SpRecordTrace extends BaseElement {
let request = this.makeRequest();
this.showHint = true;
if (request.pluginConfigs.length === 0) {
- this.hintEl!.textContent = 'It looks like you didn\'t add any probes. Please add at least one';
+ this.hintEl!.textContent = "It looks like you didn't add any probes. Please add at least one";
return;
}
this.showHint = false;
@@ -1185,7 +1186,12 @@ export class SpRecordTrace extends BaseElement {
});
}
- private async saveIndexDBByLongTrace(pullRes: Blob, fileType: string, pageNumber: number, timStamp: number): Promise {
+ private async saveIndexDBByLongTrace(
+ pullRes: Blob,
+ fileType: string,
+ pageNumber: number,
+ timStamp: number
+ ): Promise {
let buffer = await pullRes.arrayBuffer();
let chunks = Math.ceil(buffer.byteLength / indexDBMaxSize);
let offset = 0;
diff --git a/ide/src/trace/component/SpSystemTrace.event.ts b/ide/src/trace/component/SpSystemTrace.event.ts
index b84943dfac5735103fa7cd94504580d69a7c0be7..76e0899f39532564b8f37efc38749914ddf872cc 100644
--- a/ide/src/trace/component/SpSystemTrace.event.ts
+++ b/ide/src/trace/component/SpSystemTrace.event.ts
@@ -18,7 +18,7 @@ import { ThreadStruct, ThreadStructOnClick } from '../database/ui-worker/Procedu
import { TraceRow } from './trace/base/TraceRow';
import { JankStruct, JankStructOnClick } from '../database/ui-worker/ProcedureWorkerJank';
import { HeapSnapshotStruct, HeapSnapshotStructOnClick } from '../database/ui-worker/ProcedureWorkerHeapSnapshot';
-import { FuncStructOnClick } from '../database/ui-worker/ProcedureWorkerFunc';
+import { funcStructOnClick } from '../database/ui-worker/ProcedureWorkerFunc';
import { CpuFreqStructOnClick } from '../database/ui-worker/ProcedureWorkerFreq';
import { ClockStructOnClick } from '../database/ui-worker/ProcedureWorkerClock';
import { SnapshotStructOnClick } from '../database/ui-worker/ProcedureWorkerSnapshot';
@@ -26,7 +26,7 @@ import { IrqStructOnClick } from '../database/ui-worker/ProcedureWorkerIrq';
import { HeapStructOnClick } from '../database/ui-worker/ProcedureWorkerHeap';
import { JsCpuProfilerStructOnClick } from '../database/ui-worker/ProcedureWorkerCpuProfiler';
import { AppStartupStructOnClick } from '../database/ui-worker/ProcedureWorkerAppStartup';
-import { AllAppStartupStructOnClick } from '../database/ui-worker/ProcedureWorkerAllAppStartup';
+import { allAppStartupStructOnClick } from '../database/ui-worker/ProcedureWorkerAllAppStartup';
import { SoStructOnClick } from '../database/ui-worker/ProcedureWorkerSoInit';
import { FrameAnimationStructOnClick } from '../database/ui-worker/ProcedureWorkerFrameAnimation';
import { FrameDynamicStructOnClick } from '../database/ui-worker/ProcedureWorkerFrameDynamic';
@@ -43,6 +43,8 @@ import { CpuStateStructOnClick } from '../database/ui-worker/cpu/ProcedureWorker
import { CpuFreqLimitsStructOnClick } from '../database/ui-worker/cpu/ProcedureWorkerCpuFreqLimits';
import { FlagsConfig } from './SpFlags';
import { LitMainMenu } from '../../base-ui/menu/LitMainMenu';
+import { PerfToolsStructOnClick } from '../database/ui-worker/ProcedureWorkerPerfTool';
+import { BaseStruct } from '../bean/BaseStruct';
function timeoutJudge(sp: SpSystemTrace): number {
let timeoutJudge = window.setTimeout((): void => {
@@ -109,22 +111,25 @@ function threadClickHandlerFunc(sp: SpSystemTrace): (e: ThreadStruct) => void {
},
];
let findEntry = cpuRow!.fixedList[0];
- sp.rechargeCpuData(// @ts-ignore
- findEntry,// @ts-ignore
+ sp.rechargeCpuData(
+ // @ts-ignore
+ findEntry, // @ts-ignore
cpuRow.dataListCache.find((it) => it.startTime > findEntry.startTime)
);
- if (// @ts-ignore
- findEntry!.startTime! + findEntry!.dur! < TraceRow.range!.startNS ||// @ts-ignore
+ if (
+ // @ts-ignore
+ findEntry!.startTime! + findEntry!.dur! < TraceRow.range!.startNS || // @ts-ignore
findEntry!.startTime! > TraceRow.range!.endNS
) {
- sp.timerShaftEL?.setRangeNS(// @ts-ignore
- findEntry!.startTime! - findEntry!.dur! * 2,// @ts-ignore
+ sp.timerShaftEL?.setRangeNS(
+ // @ts-ignore
+ findEntry!.startTime! - findEntry!.dur! * 2, // @ts-ignore
findEntry!.startTime! + findEntry!.dur! + findEntry!.dur! * 2
);
}
- sp.hoverStructNull().selectStructNull().wakeupListNull();// @ts-ignore
- CpuStruct.hoverCpuStruct = findEntry;// @ts-ignore
- CpuStruct.selectCpuStruct = findEntry;// @ts-ignore
+ sp.hoverStructNull().selectStructNull().wakeupListNull(); // @ts-ignore
+ CpuStruct.hoverCpuStruct = findEntry; // @ts-ignore
+ CpuStruct.selectCpuStruct = findEntry; // @ts-ignore
sp.timerShaftEL?.drawTriangle(findEntry!.startTime || 0, 'inverted');
sp.traceSheetEL?.displayCpuData(
CpuStruct.selectCpuStruct!,
@@ -154,7 +159,7 @@ function jankClickHandlerFunc(sp: SpSystemTrace): Function {
let jankRowParent: unknown;
//@ts-ignore
if (d.rowId === 'actual frameTime') {
- jankRowParent = sp.shadowRoot?.querySelector>('trace-row[row-id=\'frameTime\']');
+ jankRowParent = sp.shadowRoot?.querySelector>("trace-row[row-id='frameTime']");
} else {
jankRowParent = sp.shadowRoot?.querySelector>(
//@ts-ignore
@@ -198,7 +203,7 @@ function jankClickHandlerFunc(sp: SpSystemTrace): Function {
// 绘制跟自己关联的线
datas.forEach((data) => {
//@ts-ignore
- let endParentRow = sp.shadowRoot?.querySelector>(// @ts-ignore
+ let endParentRow = sp.shadowRoot?.querySelector>( // @ts-ignore
`trace-row[row-type='process'][row-id='${data.pid}'][folder]`
);
sp.drawJankLine(endParentRow, JankStruct.selectJankStruct!, data, true);
@@ -217,7 +222,7 @@ function jankClickHandlerFunc(sp: SpSystemTrace): Function {
function snapshotClickHandlerFunc(sp: SpSystemTrace): Function {
let snapshotClickHandler = (d: HeapSnapshotStruct): void => {
sp.observerScrollHeightEnable = true;
- let snapshotRow = sp.shadowRoot?.querySelector>('trace-row[row-id=\'heapsnapshot\']');
+ let snapshotRow = sp.shadowRoot?.querySelector>("trace-row[row-id='heapsnapshot']");
let task = (): void => {
if (snapshotRow) {
let findEntry = snapshotRow!.dataListCache!.find((dat) => dat.startTs === d.startTs);
@@ -266,14 +271,16 @@ function cpuClickHandlerTask(threadRow: TraceRow, sp: SpSystemTrace, d:
sp.timerShaftEL?.drawTriangle(findEntry!.startTime || 0, 'inverted');
sp.traceSheetEL?.displayThreadData(
ThreadStruct.selectThreadStruct!,
- threadClickHandlerFunc(sp),// @ts-ignore
+ threadClickHandlerFunc(sp), // @ts-ignore
cpuClickHandlerFunc(sp),
(datas, str): void => {
sp.removeLinkLinesByBusinessType('thread');
if (str === 'wakeup tid') {
datas.forEach((data) => {
//@ts-ignore
- let endParentRow = sp.shadowRoot?.querySelector>(`trace-row[row-id='${data.pid}'][folder]`);
+ let endParentRow = sp.shadowRoot?.querySelector>( //@ts-ignore
+ `trace-row[row-id='${data.pid}'][folder]`
+ );
sp.drawThreadLine(endParentRow, ThreadStruct.firstselectThreadStruct, data);
});
}
@@ -327,24 +334,32 @@ function cpuClickHandlerFunc(sp: SpSystemTrace) {
function allStructOnClick(clickRowType: string, sp: SpSystemTrace, row?: TraceRow, entry?: unknown): void {
CpuStructOnClick(clickRowType, sp, cpuClickHandlerFunc(sp))
.then(() => ThreadStructOnClick(clickRowType, sp, threadClickHandlerFunc(sp), cpuClickHandlerFunc(sp)))
- .then(() => FuncStructOnClick(clickRowType, sp, row, scrollToFuncHandlerFunc(sp), entry))
+ //@ts-ignore
+ .then(() => funcStructOnClick(clickRowType, sp, row, scrollToFuncHandlerFunc(sp), entry))
.then(() => CpuFreqStructOnClick(clickRowType, sp))
.then(() => CpuStateStructOnClick(clickRowType, sp))
.then(() => CpuFreqLimitsStructOnClick(clickRowType, sp))
.then(() => ClockStructOnClick(clickRowType, sp))
+ //@ts-ignore
.then(() => SnapshotStructOnClick(clickRowType, sp, row!))
.then(() => IrqStructOnClick(clickRowType, sp))
+ //@ts-ignore
.then(() => HeapStructOnClick(clickRowType, sp, row))
+ //@ts-ignore
.then(() => JankStructOnClick(clickRowType, sp, row!, jankClickHandlerFunc(sp)))
+ //@ts-ignore
.then(() => HeapSnapshotStructOnClick(clickRowType, sp, row!, snapshotClickHandlerFunc(sp)))
+ //@ts-ignore
.then(() => JsCpuProfilerStructOnClick(clickRowType, sp, row!))
.then(() => AppStartupStructOnClick(clickRowType, sp, scrollToFuncHandlerFunc(sp)))
- .then(() => AllAppStartupStructOnClick(clickRowType, sp, scrollToFuncHandlerFunc(sp)))
- .then(() => SoStructOnClick(clickRowType, sp, scrollToFuncHandlerFunc(sp)))
+ .then(() => allAppStartupStructOnClick(clickRowType, sp, scrollToFuncHandlerFunc(sp)))
+ .then(() => SoStructOnClick(clickRowType, sp, scrollToFuncHandlerFunc(sp))) //@ts-ignore
.then(() => FrameAnimationStructOnClick(clickRowType, sp, scrollToFuncHandlerFunc(sp), row!))
.then(() => FrameDynamicStructOnClick(clickRowType, sp, row))
.then(() => FrameSpacingStructOnClick(clickRowType, sp, row!))
.then(() => sampleStructOnClick(clickRowType, sp))
+ .then(() => PerfToolsStructOnClick(clickRowType, sp))
+
.then(() => {
if (!JankStruct.hoverJankStruct && JankStruct.delJankLineFlag) {
sp.removeLinkLinesByBusinessType('janks');
@@ -389,7 +404,7 @@ export default function spSystemTraceOnClickHandler(
if (row) {
let pointEvent = sp.createPointEvent(row);
SpStatisticsHttpUtil.addOrdinaryVisitAction({
- action: 'trace_row',// @ts-ignore
+ action: 'trace_row', // @ts-ignore
event: pointEvent,
});
}
@@ -476,8 +491,11 @@ function spSystemTraceDocumentOnMouseMoveMouseDown(sp: SpSystemTrace, search: Li
}
}
-//@ts-ignore
-function spSystemTraceDocumentOnMouseMoveMouseUp(sp: SpSystemTrace, rows: Array>, ev: MouseEvent): void {
+function spSystemTraceDocumentOnMouseMoveMouseUp(
+ sp: SpSystemTrace, //@ts-ignore
+ rows: Array>,
+ ev: MouseEvent
+): void {
if (!sp.rowsPaneEL!.containPoint(ev, { left: 248 })) {
sp.hoverStructNull();
}
diff --git a/ide/src/trace/component/SpSystemTrace.init.ts b/ide/src/trace/component/SpSystemTrace.init.ts
index 8c0cfe95d57f80e3361d31864e641bc7961d1e58..7a033fc2668f897f9793173121869d5d4f0c4411 100644
--- a/ide/src/trace/component/SpSystemTrace.init.ts
+++ b/ide/src/trace/component/SpSystemTrace.init.ts
@@ -405,7 +405,7 @@ function selectHandler(sp: SpSystemTrace): void {
let checkRows = rows;
if (!refreshCheckBox) {
checkRows = [
- ...sp.shadowRoot!.querySelectorAll>('trace-row[check-type=\'2\']'),
+ ...sp.shadowRoot!.querySelectorAll>("trace-row[check-type='2']"),
...sp.favoriteChartListEL!.getAllSelectCollectRows(),
];
}
@@ -448,7 +448,7 @@ function selectHandlerRows(sp: SpSystemTrace, rows: Array>): void
if (sp.rangeTraceRow!.length !== rows.length) {
let event = sp.createPointEvent(it);
SpStatisticsHttpUtil.addOrdinaryVisitAction({
- action: 'trace_row',// @ts-ignore
+ action: 'trace_row', // @ts-ignore
event: event,
});
}
@@ -536,21 +536,24 @@ function intersectionObserverHandler(sp: SpSystemTrace): void {
(entries) => {
entries.forEach((it) => {
let tr = it.target as TraceRow;
+ // 目标元素的可见比例
tr.intersectionRatio = it.intersectionRatio;
+ // 判断目标元素是否可见 isIntersecting为true是可见
if (!it.isIntersecting) {
tr.sleeping = true;
- sp.invisibleRows.indexOf(tr) === -1 && sp.invisibleRows.push(tr);
- sp.visibleRows = sp.visibleRows.filter((it) => !it.sleeping);
+ sp.invisibleRows.indexOf(tr) == -1 && sp.invisibleRows.push(tr);
} else {
tr.sleeping = false;
- sp.visibleRows.indexOf(tr) === -1 && sp.visibleRows.push(tr);
- sp.invisibleRows = sp.invisibleRows.filter((it) => it.sleeping);
+ sp.visibleRows.indexOf(tr) == -1 && sp.visibleRows.push(tr);
}
- if (sp.handler) {// @ts-ignore
- clearTimeout(sp.handler);
- }
- sp.handler = setTimeout(() => sp.refreshCanvas(false), 100);
});
+ //更新可见泳道及不可见泳道值
+ sp.visibleRows = sp.visibleRows.filter((it) => !it.sleeping);
+ sp.invisibleRows = sp.invisibleRows.filter((it) => it.sleeping);
+ if (sp.handler === -1) {
+ cancelAnimationFrame(sp.handler);
+ }
+ sp.handler = requestAnimationFrame(() => sp.refreshCanvas(false));
},
{ threshold: [0, 0.01, 0.99, 1] }
);
@@ -579,12 +582,13 @@ function smartEventSubscribe(sp: SpSystemTrace): void {
window.subscribe(window.SmartEvent.UI.SliceMark, (data) => sp.sliceMarkEventHandler(data));
window.subscribe(window.SmartEvent.UI.TraceRowComplete, (tr) => {});
window.subscribe(window.SmartEvent.UI.RefreshCanvas, () => sp.refreshCanvas(false));
- window.subscribe(window.SmartEvent.UI.KeyboardEnable, (tr) => {//@ts-ignore
+ window.subscribe(window.SmartEvent.UI.KeyboardEnable, (tr) => {
+ //@ts-ignore
sp.keyboardEnable = tr.enable;
if (!sp.keyboardEnable) {
sp.stopWASD();
}
- });//@ts-ignore
+ }); //@ts-ignore
window.subscribe(window.SmartEvent.UI.CollapseAllLane, (collapse: boolean) => {
if (!collapse) {
// 一键折叠之前,记录当前打开的泳道图
@@ -597,14 +601,15 @@ function smartEventSubscribe(sp: SpSystemTrace): void {
sp.removeAttribute('disable');
sp.refreshCanvas(true);
});
- window.subscribe(window.SmartEvent.UI.MouseEventEnable, (tr) => {//@ts-ignore
+ window.subscribe(window.SmartEvent.UI.MouseEventEnable, (tr) => {
+ //@ts-ignore
sp.mouseEventEnable = tr.mouseEnable;
if (sp.mouseEventEnable) {
sp.removeAttribute('disable');
} else {
sp.setAttribute('disable', '');
}
- });//@ts-ignore
+ }); //@ts-ignore
window.subscribe(window.SmartEvent.UI.CollectGroupChange, (group: string) => (sp.currentCollectGroup = group));
}
@@ -777,17 +782,19 @@ function spSystemTraceShowStructFindIndex(
function findEntryTypeCpu(sp: SpSystemTrace, findEntry: any): void {
CpuStruct.selectCpuStruct = findEntry;
CpuStruct.hoverCpuStruct = CpuStruct.selectCpuStruct;
- sp.queryAllTraceRow('trace-row[row-type=\'cpu-data\']', (row): boolean => row.rowType === 'cpu-data').forEach((item): void => {
- if (item.rowId === `${findEntry.cpu}`) {
- sp.rechargeCpuData(
- findEntry,// @ts-ignore
- item.dataListCache.find((it) => it.startTime > findEntry.startTime)
- );
- item.fixedList = [findEntry];
+ sp.queryAllTraceRow("trace-row[row-type='cpu-data']", (row): boolean => row.rowType === 'cpu-data').forEach(
+ (item): void => {
+ if (item.rowId === `${findEntry.cpu}`) {
+ sp.rechargeCpuData(
+ findEntry, // @ts-ignore
+ item.dataListCache.find((it) => it.startTime > findEntry.startTime)
+ );
+ item.fixedList = [findEntry];
+ }
+ item.highlight = item.rowId === `${findEntry.cpu}`;
+ item.draw(true);
}
- item.highlight = item.rowId === `${findEntry.cpu}`;
- item.draw(true);
- });
+ );
sp.scrollToProcess(`${findEntry.cpu}`, '', 'cpu-data', true);
sp.onClickHandler(TraceRow.ROW_TYPE_CPU);
}
@@ -830,7 +837,7 @@ function findEntryTypeThreadProcess(sp: SpSystemTrace, findEntry: any): void {
}
}
function findEntryTypeSdk(sp: SpSystemTrace, findEntry: any): void {
- let parentRow = sp.shadowRoot!.querySelector>('trace-row[row-type=\'sdk\'][folder]');
+ let parentRow = sp.shadowRoot!.querySelector>("trace-row[row-type='sdk'][folder]");
if (parentRow) {
let sdkRow = parentRow.childrenList.filter(
(child) => child.rowId === findEntry.rowId && child.rowType === findEntry.rowType
diff --git a/ide/src/trace/component/SpSystemTrace.line.ts b/ide/src/trace/component/SpSystemTrace.line.ts
index 2db5681803a38588d1943769bf74bff8f259f698..b4c9bfc3176790fcbc0a6e16b00fb405666c879c 100644
--- a/ide/src/trace/component/SpSystemTrace.line.ts
+++ b/ide/src/trace/component/SpSystemTrace.line.ts
@@ -65,7 +65,10 @@ function selectJankApp(
): void {
let collectList = sp.favoriteChartListEL!.getAllCollectRows();
//@ts-ignore
- let findJankEntry = endRowStruct!.dataListCache!.find((dat: unknown) => dat.name === data.name && dat.pid === data.pid);
+ let findJankEntry = endRowStruct!.dataListCache!.find(
+ //@ts-ignore
+ (dat: unknown) => dat.name === data.name && dat.pid === data.pid
+ );
let tts =
findJankEntry.frame_type === 'frameTime' ? selectJankStruct.ts! : selectJankStruct.ts! + selectJankStruct.dur!;
let startParentRow: unknown;
@@ -121,7 +124,10 @@ function findJankApp(
): void {
let collectList = sp.favoriteChartListEL!.getAllCollectRows();
//@ts-ignore
- let findJankEntry = endRowStruct!.dataListCache!.find((dat: unknown) => dat.name === data.name && dat.pid === data.pid);
+ let findJankEntry = endRowStruct!.dataListCache!.find(
+ //@ts-ignore
+ (dat: unknown) => dat.name === data.name && dat.pid === data.pid
+ );
let tts = selectJankStruct.frame_type === 'frameTime' ? findJankEntry.ts : findJankEntry.ts! + findJankEntry.dur!;
//@ts-ignore
let endY = endRowStruct!.translateY! + 20 * (findJankEntry!.depth! + 0.5);
@@ -166,7 +172,10 @@ function addPointLink(
endRowStruct: unknown
): void {
//@ts-ignore
- let findJankEntry = endRowStruct!.dataListCache!.find((dat: unknown) => dat.name === data.name && dat.pid === data.pid);
+ let findJankEntry = endRowStruct!.dataListCache!.find(
+ //@ts-ignore
+ (dat: unknown) => dat.name === data.name && dat.pid === data.pid
+ );
//连线规则:frametimeline的头----app的头,app的尾----renderservice的头
let tts: number = 0;
if (findJankEntry) {
@@ -183,7 +192,7 @@ function addPointLink(
//@ts-ignore
if (data.children[0].frame_type === 'frameTime') {
//@ts-ignore
- endP = sp.shadowRoot?.querySelector>('trace-row[row-type=\'janks\'][row-id=\'frameTime\']');
+ endP = sp.shadowRoot?.querySelector>("trace-row[row-type='janks'][row-id='frameTime']");
} else {
//@ts-ignore
endP = sp.shadowRoot?.querySelector>(
@@ -202,7 +211,7 @@ function getEndStruct(data: unknown, sp: SpSystemTrace): unknown {
//@ts-ignore
if (data.frame_type === 'frameTime') {
endRowStruct = sp.shadowRoot?.querySelector>(
- 'trace-row[row-id=\'actual frameTime\'][row-type=\'janks\']'
+ "trace-row[row-id='actual frameTime'][row-type='janks']"
);
} else {
endRowStruct = sp.shadowRoot?.querySelector>(
@@ -239,7 +248,7 @@ function drawJankLineEndParent(
});
//frameTime未展开
if (!endRowStruct) {
- endParentRow = sp.shadowRoot?.querySelector>('trace-row[row-id=\'frameTime\'][folder]');
+ endParentRow = sp.shadowRoot?.querySelector>("trace-row[row-id='frameTime'][folder]");
//@ts-ignore
endParentRow?.childrenList?.forEach((item: TraceRow): void => {
if (item.rowId === 'actual frameTime' && item.rowType === 'janks') {
diff --git a/ide/src/trace/component/SpSystemTrace.ts b/ide/src/trace/component/SpSystemTrace.ts
index 677af83e96c08148a41f452093b0497735dbb760..39b4a57052eab83533810bbd023ad90443c6f970 100644
--- a/ide/src/trace/component/SpSystemTrace.ts
+++ b/ide/src/trace/component/SpSystemTrace.ts
@@ -122,6 +122,8 @@ import spSystemTraceOnClickHandler, {
} from './SpSystemTrace.event';
import { SampleStruct } from '../database/ui-worker/ProcedureWorkerBpftrace';
import { readTraceFileBuffer } from '../SpApplicationPublicFunc';
+import { PerfToolStruct } from '../database/ui-worker/ProcedureWorkerPerfTool';
+import { BaseStruct } from '../bean/BaseStruct';
function dpr(): number {
return window.devicePixelRatio || 1;
@@ -162,10 +164,10 @@ export class SpSystemTrace extends BaseElement {
rowsEL: HTMLDivElementAlias;
rowsPaneEL: HTMLDivElementAlias;
stateRowsId: Array