Skip to content

Commit a0d42f1

Browse files
committed
feat: show performance comparison description
1 parent fade4ad commit a0d42f1

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

extensions/ql-vscode/src/view/compare-performance/ComparePerformance.tsx

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
import type { ChangeEvent } from "react";
2-
import { useMemo, useState, Fragment } from "react";
2+
import { Fragment, useMemo, useState } from "react";
3+
import { styled } from "styled-components";
34
import type {
45
SetPerformanceComparisonQueries,
56
ToComparePerformanceViewMessage,
67
} from "../../common/interface-types";
7-
import { useMessageFromExtension } from "../common/useMessageFromExtension";
8+
import { formatDecimal } from "../../common/number";
89
import type {
910
PerformanceComparisonDataFromLog,
1011
PipelineSummary,
1112
} from "../../log-insights/performance-comparison";
12-
import { formatDecimal } from "../../common/number";
13-
import { styled } from "styled-components";
14-
import { Codicon, ViewTitle, WarningBox } from "../common";
13+
import {
14+
Codicon,
15+
ComparePerformanceDescription,
16+
InfoBox,
17+
ViewTitle,
18+
WarningBox,
19+
} from "../common";
20+
import { useMessageFromExtension } from "../common/useMessageFromExtension";
1521
import { abbreviateRANames, abbreviateRASteps } from "./RAPrettyPrinter";
1622

1723
const enum AbsentReason {
@@ -435,6 +441,11 @@ function ComparePerformanceWithData(props: {
435441
return (
436442
<>
437443
<ViewTitle>Performance comparison</ViewTitle>
444+
{data?.description && (
445+
<InfoBox>
446+
<ComparePerformanceDescription {...data.description} />
447+
</InfoBox>
448+
)}
438449
{hasCacheHitMismatch && (
439450
<WarningBox>
440451
<strong>Inconsistent cache hits</strong>

0 commit comments

Comments
 (0)