Skip to content

Commit 475fe20

Browse files
committed
Compare perf: Fix missing unit in grouped predicate entry
1 parent 6b53395 commit 475fe20

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class ComparisonDataset {
8181
}
8282
}
8383

84-
function renderOptionalValue(x: Optional<number>, unit?: string) {
84+
function renderOptionalValue(x: Optional<number>, unit: string | undefined) {
8585
switch (x) {
8686
case AbsentReason.NotSeen:
8787
return <AbsentNumberCell>n/a</AbsentNumberCell>;
@@ -712,8 +712,8 @@ function PredicateRowGroup(props: PredicateRowGroupProps) {
712712
<ChevronCell>
713713
<Chevron expanded={isExpanded} />
714714
</ChevronCell>
715-
{comparison && renderOptionalValue(rowGroup.before)}
716-
{renderOptionalValue(rowGroup.after)}
715+
{comparison && renderOptionalValue(rowGroup.before, metric.unit)}
716+
{renderOptionalValue(rowGroup.after, metric.unit)}
717717
{comparison && renderDelta(rowGroup.diff, metric.unit)}
718718
<NameCell>
719719
{renderedName} ({rowGroup.rows.length} predicates)

0 commit comments

Comments
 (0)