From 5a4015dbbaecf0570b598decb21f849a43f67103 Mon Sep 17 00:00:00 2001 From: Fine Date: Tue, 3 Dec 2024 17:10:55 +0800 Subject: [PATCH] update events --- .../async-profiling/components/Filter.vue | 17 ++++++++++++++--- .../related/async-profiling/components/data.ts | 3 ++- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/views/dashboard/related/async-profiling/components/Filter.vue b/src/views/dashboard/related/async-profiling/components/Filter.vue index 29166959..55f364e3 100644 --- a/src/views/dashboard/related/async-profiling/components/Filter.vue +++ b/src/views/dashboard/related/async-profiling/components/Filter.vue @@ -43,14 +43,25 @@ limitations under the License. --> import { useAsyncProfilingStore } from "@/store/modules/async-profiling"; import type { Instance } from "@/types/selector"; import type { Option } from "@/types/app"; - import { EventsMap } from "./data"; + import { EventsMap, ProfilingEvents, JFREventType } from "./data"; const { t } = useI18n(); const asyncProfilingStore = useAsyncProfilingStore(); const serviceInstanceIds = ref([]); const selectedEventType = ref(""); const eventTypes = computed(() => - (asyncProfilingStore.selectedTask.events ?? []).map((d: string) => ({ label: d, value: d })), + (asyncProfilingStore.selectedTask.events ?? []) + .map((d: string) => { + if (d === ProfilingEvents[1]) { + return [ + { label: JFREventType.OBJECT_ALLOCATION_IN_NEW_TLAB, value: JFREventType.OBJECT_ALLOCATION_IN_NEW_TLAB }, + { label: JFREventType.OBJECT_ALLOCATION_OUTSIDE_TLAB, value: JFREventType.OBJECT_ALLOCATION_OUTSIDE_TLAB }, + ]; + } + + return { label: d, value: d }; + }) + .flat(), ); const instances = computed(() => asyncProfilingStore.instances.filter((d: Instance) => @@ -98,7 +109,7 @@ limitations under the License. --> } .filter-events { - width: 200px; + width: 300px; margin-right: 10px; } diff --git a/src/views/dashboard/related/async-profiling/components/data.ts b/src/views/dashboard/related/async-profiling/components/data.ts index f672b3c3..f315a082 100644 --- a/src/views/dashboard/related/async-profiling/components/data.ts +++ b/src/views/dashboard/related/async-profiling/components/data.ts @@ -29,7 +29,8 @@ export enum EventsMap { CTIMER = "EXECUTION_SAMPLE", ITIMER = "EXECUTION_SAMPLE", LOCK = "LOCK", - ALLOC = "OBJECT_ALLOCATION_OUTSIDE_TLAB", + OBJECT_ALLOCATION_IN_NEW_TLAB = "OBJECT_ALLOCATION_IN_NEW_TLAB", + OBJECT_ALLOCATION_OUTSIDE_TLAB = "OBJECT_ALLOCATION_OUTSIDE_TLAB", } export enum JFREventType {