Skip to content
Draft
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
12 changes: 10 additions & 2 deletions src/app/bundles/[uuid]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,8 @@ function TransactionDetails({
}

function SimulationCard({ meter }: { meter: MeterBundleResponse }) {
const totalTimeUs = meter.totalExecutionTimeUs + meter.stateRootTimeUs;

return (
<Card>
<div className="p-5">
Expand All @@ -310,9 +312,15 @@ function SimulationCard({ meter }: { meter: MeterBundleResponse }) {
</div>
</div>
<div>
<div className="text-xs text-gray-500 mb-1">Execution Time</div>
<div className="text-xs text-gray-500 mb-1">Total Time</div>
<div className="text-xl font-semibold text-gray-900">
{meter.results.reduce((sum, r) => sum + r.executionTimeUs, 0)}μs
{totalTimeUs.toLocaleString()}μs
</div>
<div className="text-xs text-gray-500 mt-1 space-x-3">
<span>
Execution {meter.totalExecutionTimeUs.toLocaleString()}μs
</span>
<span>State Root {meter.stateRootTimeUs.toLocaleString()}μs</span>
</div>
</div>
<div>
Expand Down
1 change: 1 addition & 0 deletions src/lib/s3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ export interface MeterBundleResponse {
stateBlockNumber: number;
totalGasUsed: number;
totalExecutionTimeUs: number;
stateRootTimeUs: number;
}

export interface BundleData {
Expand Down