Skip to content

Commit e718ea6

Browse files
committed
Default to hiding cache hits, and omit warning
The warning doesn't seem necessary anymore since shadowed cache hits are detected now
1 parent 06fcd6f commit e718ea6

File tree

1 file changed

+10
-19
lines changed

1 file changed

+10
-19
lines changed

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

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import type {
1818
} from "../../log-insights/performance-comparison";
1919
import { formatDecimal } from "../../common/number";
2020
import { styled } from "styled-components";
21-
import { Codicon, ViewTitle, WarningBox } from "../common";
21+
import { Codicon, ViewTitle } from "../common";
2222
import { abbreviateRANames, abbreviateRASteps } from "./RAPrettyPrinter";
2323
import { Renaming, RenamingInput } from "./RenamingInput";
2424

@@ -560,7 +560,7 @@ function ComparePerformanceWithData(props: {
560560

561561
const comparison = data?.comparison;
562562

563-
const [hideCacheHits, setHideCacheHits] = useState(false);
563+
const [hideCacheHits, setHideCacheHits] = useState(true);
564564

565565
const [sortOrder, setSortOrder] = useState<"delta" | "absDelta">("absDelta");
566566

@@ -686,23 +686,14 @@ function ComparePerformanceWithData(props: {
686686
<>
687687
<ViewTitle>Performance comparison</ViewTitle>
688688
{comparison && hasCacheHitMismatch.current && (
689-
<WarningBox>
690-
<strong>Inconsistent cache hits</strong>
691-
<br />
692-
Some predicates had a cache hit on one side but not the other. For
693-
more accurate results, try running the{" "}
694-
<strong>CodeQL: Clear Cache</strong> command before each query.
695-
<br />
696-
<br />
697-
<label>
698-
<input
699-
type="checkbox"
700-
checked={hideCacheHits}
701-
onChange={() => setHideCacheHits(!hideCacheHits)}
702-
/>
703-
Hide predicates with cache hits
704-
</label>
705-
</WarningBox>
689+
<label>
690+
<input
691+
type="checkbox"
692+
checked={hideCacheHits}
693+
onChange={() => setHideCacheHits(!hideCacheHits)}
694+
/>
695+
Hide differences due to cache hits
696+
</label>
706697
)}
707698
<RenamingInput renamings={renamings} setRenamings={setRenamings} />
708699
Compare{" "}

0 commit comments

Comments
 (0)