Skip to content

Commit 8a58279

Browse files
committed
Move "total" row to the top and render the metric
1 parent d37469f commit 8a58279

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

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

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,20 @@ function ComparePerformanceWithData(props: {
611611
<NameHeader>Predicate</NameHeader>
612612
</HeaderTR>
613613
</thead>
614+
<tbody>
615+
<tr key="total">
616+
<ChevronCell />
617+
{comparison && renderOptionalValue(totalBefore, metric.unit)}
618+
{renderOptionalValue(totalAfter, metric.unit)}
619+
{comparison && renderDelta(totalDiff, metric.unit)}
620+
<NameCell>
621+
<strong>TOTAL</strong>
622+
</NameCell>
623+
</tr>
624+
<tr key="spacing">
625+
<td colSpan={5} style={{ height: "1em" }}></td>
626+
</tr>
627+
</tbody>
614628
</Table>
615629
<PredicateTable
616630
rowGroups={rowGroups}
@@ -619,22 +633,6 @@ function ComparePerformanceWithData(props: {
619633
metric={metric}
620634
isPerEvaluation={isPerEvaluation}
621635
/>
622-
<Table>
623-
<tfoot>
624-
<tr key="spacing">
625-
<td colSpan={5} style={{ height: "1em" }}></td>
626-
</tr>
627-
<tr key="total">
628-
<ChevronCell />
629-
{comparison && (
630-
<NumberCell>{formatDecimal(totalBefore)}</NumberCell>
631-
)}
632-
<NumberCell>{formatDecimal(totalAfter)}</NumberCell>
633-
{comparison && renderDelta(totalDiff)}
634-
<NameCell>TOTAL</NameCell>
635-
</tr>
636-
</tfoot>
637-
</Table>
638636
</>
639637
);
640638
}

0 commit comments

Comments
 (0)