(false)
const rootNode = computed(() => plan.value && plan.value.content.Plan)
const planningTimeClass = (percent: number) => {
@@ -135,7 +137,7 @@ function averageIO(node: Node) {
JIT:
@@ -149,6 +151,23 @@ function averageIO(node: Node) {
"
v-html="duration(plan.planStats.jitTime)"
>
+
+
diff --git a/src/enums.ts b/src/enums.ts
index 3168a382..f20c382b 100644
--- a/src/enums.ts
+++ b/src/enums.ts
@@ -135,6 +135,7 @@ export enum NodeProp {
ARRAY_INDEX_KEY = "arrayIndex",
PEV_PLAN_TAG = "plan_",
+ JIT = "JIT",
}
export enum PropType {
@@ -153,6 +154,7 @@ export enum PropType {
rows,
sortGroups,
transferRate,
+ jit,
}
export const nodePropTypes: { [key: string]: PropType } = {}
@@ -210,6 +212,8 @@ nodePropTypes[NodeProp.EXCLUSIVE_LOCAL_WRITTEN_BLOCKS] = PropType.blocks
nodePropTypes[NodeProp.FULL_SORT_GROUPS] = PropType.sortGroups
nodePropTypes[NodeProp.PRE_SORTED_GROUPS] = PropType.sortGroups
+nodePropTypes[NodeProp.JIT] = PropType.jit
+
export class WorkerProp {
// plan property keys
public static WORKER_NUMBER = "Worker Number"
diff --git a/src/filters.ts b/src/filters.ts
index f07edf3e..8dae739f 100644
--- a/src/filters.ts
+++ b/src/filters.ts
@@ -1,7 +1,9 @@
import _ from "lodash"
import { createApp } from "vue"
import { EstimateDirection, nodePropTypes, PropType } from "@/enums"
+import type { JIT } from "@/interfaces"
import SortGroup from "@/components/SortGroup.vue"
+import JitDetails from "@/components/JitDetails.vue"
import hljs from "highlight.js/lib/core"
import pgsql from "highlight.js/lib/languages/pgsql"
hljs.registerLanguage("pgsql", pgsql)
@@ -170,6 +172,13 @@ export function transferRate(value: number): string {
return formatBytes(value * 8 * 1024) + "/s"
}
+function jit(value: JIT): string {
+ const app = createApp(JitDetails, { jit: value }).mount(
+ document.createElement("div")
+ )
+ return app.$el.outerHTML
+}
+
export function formatNodeProp(key: string, value: unknown): string {
if (_.has(nodePropTypes, key)) {
if (nodePropTypes[key] === PropType.duration) {
@@ -207,6 +216,8 @@ export function formatNodeProp(key: string, value: unknown): string {
return sortGroups(value as string)
} else if (nodePropTypes[key] === PropType.transferRate) {
return transferRate(value as number)
+ } else if (nodePropTypes[key] === PropType.jit) {
+ return jit(value as JIT)
}
}
return _.escape(value as unknown as string)