feat(oceanbase-oracle): split execution time from client wait

This commit is contained in:
efeire authored and GitHub committed 2026-09-20 12:31:47 +08:00
1 parent 1294708eea
commit 33afb0b432
58 files changed
+843 -11

No files matched your search

+17 -2
View File
@@ -3,6 +3,7 @@ import { applyDdlStoragePreference } from "@/lib/sql/ddlStorage";
import DdlStorageToggle from "@/components/objects/DdlStorageToggle.vue";
import { useUpdateBlocker } from "@/lib/app/updatePreparation";
import { useResultViewUpdateTiming } from "@/composables/useResultViewUpdateTiming";
import { computed, nextTick, onMounted, onUnmounted, onActivated, onDeactivated, ref, shallowRef, toRaw, useSlots, watch, defineAsyncComponent, type Component, type CSSProperties } from "vue";
import { useI18n } from "vue-i18n";
import {
@@ -6532,6 +6533,11 @@ let canvasPixelRatioMediaQuery: MediaQueryList | null = null;
let canvasPixelRatioMediaQueryCleanup: (() => void) | null = null;
let dataGridIsActive = true;
let canvasRuntime: DataGridCanvasRuntime;
const { elapsedMs: resultViewUpdateMs, canvasDrawCompleted: completeResultCanvasDraw } = useResultViewUpdateTiming(
() => props.result,
() => resolvedDatabaseType.value === "oceanbase-oracle" && isResultsContext.value,
() => (useCanvasGridRows.value ? "canvas" : "dom"),
);
watch(
() => [totalWidth.value, displayRowCount.value, useCanvasGridRows.value, props.result.columns.join("\u0000")],
@@ -7228,7 +7234,8 @@ function drawCanvasGrid() {
const scroller = canvasScrollerElement();
if (!canvas || !scroller || !useCanvasGridRows.value) return;
drawCanvasDataGrid({
const drawnResult = props.result;
const drawn = drawCanvasDataGrid({
canvas,
scroller,
width: Math.max(1, canvasSurfaceWidth.value || scroller.clientWidth),
@@ -7271,7 +7278,9 @@ function drawCanvasGrid() {
flatteningMultiLineEnabled: flatteningMultiLineEnabled.value,
showWhitespace: showWhitespaceEnabled.value,
});
if (!drawn) return;
flipCanvasSurface();
completeResultCanvasDraw(drawnResult);
}
function flipCanvasSurface() {
@@ -13658,7 +13667,13 @@ useUpdateBlocker(() => (hasPendingChanges.value || hasPendingDataEditorDraft.val
</span>
<span v-if="showTruncationWarning" class="shrink-0 text-amber-500 text-xs">(truncated)</span>
<span v-if="!hasData" class="shrink-0">{{ t("grid.rowsAffected", { count: result.affected_rows }) }}</span>
<span class="shrink-0">{{ result.execution_time_ms }}ms</span>
<template v-if="resolvedDatabaseType === 'oceanbase-oracle' && isResultsContext">
<span class="shrink-0" :title="t('grid.serverExecuteTimeHint')">{{ result.server_execute_time_us !== undefined ? t("grid.serverExecuteTime", { us: result.server_execute_time_us }) : t("grid.serverExecuteTimeUnavailable") }}</span>
<span class="shrink-0" :title="t('grid.agentExecuteTimeHint')">{{ t("grid.agentExecuteTime", { ms: result.execution_time_ms }) }}</span>
<span v-if="result.client_request_wait_ms !== undefined" class="shrink-0" :title="t('grid.clientRequestWaitHint')">{{ t("grid.clientRequestWait", { ms: result.client_request_wait_ms }) }}</span>
<span v-if="resultViewUpdateMs !== undefined" class="shrink-0" :title="t('grid.resultViewUpdateHint')">{{ t("grid.resultViewUpdate", { ms: resultViewUpdateMs }) }}</span>
</template>
<span v-else class="shrink-0">{{ result.execution_time_ms }}ms</span>
<template v-if="editable && hasDataGridSaveTarget">
<span v-if="hasPendingChanges" class="shrink-0 text-foreground">