Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 37 additions & 19 deletions report/src/pages/LoadTestDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ const SummarySection = ({ result }: { result: LoadTestResult }) => {
const submitted = result.throughput.total_submitted;
const confirmed = result.throughput.total_confirmed;
const failed = result.throughput.total_failed;
const reverted = result.throughput.total_reverted;

return (
<StatCard title="Summary">
Expand All @@ -106,6 +107,13 @@ const SummarySection = ({ result }: { result: LoadTestResult }) => {
hint={formatPercent(confirmed, submitted) + " of submitted"}
/>
<Stat label="Failed" value={failed.toLocaleString()} />
{reverted > 0 && (
<Stat
label="Reverted"
value={reverted.toLocaleString()}
hint={formatPercent(reverted, confirmed) + " of confirmed"}
/>
)}
<Stat label="Avg TPS" value={formatTps(result.throughput.tps)} />
<Stat
label="Avg gas/s"
Expand Down Expand Up @@ -223,25 +231,35 @@ const LoadTestDetail = () => {
</StatCard>

<StatCard title="Top failure reasons">
{result.top_failure_reasons.length === 0 ? (
<div className="text-sm text-slate-500">
No failures recorded.
</div>
) : (
<ul className="text-sm text-slate-700 divide-y divide-slate-100">
{result.top_failure_reasons.map(([reason, count]) => (
<li
key={reason}
className="py-2 flex justify-between gap-x-4"
>
<span>{reason}</span>
<span className="font-mono">
{count.toLocaleString()}
</span>
</li>
))}
</ul>
)}
{(() => {
const reverted = result.throughput.total_reverted;
const reasons: [string, number][] = [
...(reverted > 0 ? [["reverted", reverted] as [string, number]] : []),
...result.top_failure_reasons,
];
if (reasons.length === 0) {
return (
<div className="text-sm text-slate-500">
No failures recorded.
</div>
);
}
return (
<ul className="text-sm text-slate-700 divide-y divide-slate-100">
{reasons.map(([reason, count]) => (
<li
key={reason}
className="py-2 flex justify-between gap-x-4"
>
<span>{reason}</span>
<span className="font-mono">
{count.toLocaleString()}
</span>
</li>
))}
</ul>
);
})()}
</StatCard>
</>
)}
Expand Down
1 change: 1 addition & 0 deletions report/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ export interface ThroughputStats {
total_submitted: number;
total_confirmed: number;
total_failed: number;
total_reverted: number;
tps: number;
gps: number;
duration: RustDuration;
Expand Down
Loading