diff --git a/src/types/ebpf.d.ts b/src/types/ebpf.d.ts index 4598528e..40852074 100644 --- a/src/types/ebpf.d.ts +++ b/src/types/ebpf.d.ts @@ -65,6 +65,8 @@ export type StackElement = { stackType: string; value: number; children?: StackElement[]; + rateOfRoot?: string; + rateOfParent: string; }; export type AnalyzationTrees = { id: string; diff --git a/src/views/dashboard/related/ebpf/components/EBPFSchedules.vue b/src/views/dashboard/related/ebpf/components/EBPFSchedules.vue index 7609aba8..d58dfe91 100644 --- a/src/views/dashboard/related/ebpf/components/EBPFSchedules.vue +++ b/src/views/dashboard/related/ebpf/components/EBPFSchedules.vue @@ -173,7 +173,7 @@ async function analyzeEBPF() { timeRanges, aggregateType: aggregateType.value, }); - if (res.data.errors) { + if (res.data && res.data.errors) { ElMessage.error(res.data.errors); return; } diff --git a/src/views/dashboard/related/ebpf/components/EBPFStack.vue b/src/views/dashboard/related/ebpf/components/EBPFStack.vue index b69d62f6..01760a75 100644 --- a/src/views/dashboard/related/ebpf/components/EBPFStack.vue +++ b/src/views/dashboard/related/ebpf/components/EBPFStack.vue @@ -52,6 +52,8 @@ function drawGraph() { symbol: "Virtual Root", dumpCount: 0, stackType: "", + rateOfRoot: "", + rateOfParent: "", }; countRange(); for (const tree of ebpfStore.analyzeTrees) { @@ -87,12 +89,27 @@ function drawGraph() { const tip = (d3tip as any)() .attr("class", "d3-tip") .direction("w") - .html((d: { data: StackElement }) => { + .html((d: { data: StackElement } & { parent: { data: StackElement } }) => { + const name = d.data.name.replace("<", "<").replace(">", ">"); const valStr = ebpfStore.aggregateType === AggregateTypes[0].value ? `