Skip to content

Commit

Permalink
Create benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
runtian-zhou committed Nov 18, 2024
1 parent e569dd2 commit 36ef86c
Show file tree
Hide file tree
Showing 4 changed files with 1,459 additions and 20 deletions.
2 changes: 2 additions & 0 deletions aptos-move/e2e-benchmark/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ fn main() {
(386, EntryPoints::TokenV2AmbassadorMint { numbered: true }),
(467, EntryPoints::LiquidityPoolSwap { is_stable: true }),
(429, EntryPoints::LiquidityPoolSwap { is_stable: false }),
(310, EntryPoints::APTPermissionedTransfer),
(150, EntryPoints::APTTransfer),
];

let mut failures = Vec::new();
Expand Down
28 changes: 26 additions & 2 deletions crates/transaction-generator-lib/src/publishing/module_simple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ pub enum EntryPoints {
num_points_per_txn: usize,
},
DeserializeU256,
APTPermissionedTransfer,
APTTransfer,
}

impl EntryPoints {
Expand Down Expand Up @@ -309,7 +311,9 @@ impl EntryPoints {
| EntryPoints::ResourceGroupsSenderWriteTag { .. }
| EntryPoints::ResourceGroupsSenderMultiChange { .. }
| EntryPoints::CoinInitAndMint
| EntryPoints::FungibleAssetMint => "framework_usecases",
| EntryPoints::FungibleAssetMint
| EntryPoints::APTPermissionedTransfer
| EntryPoints::APTTransfer => "framework_usecases",
EntryPoints::TokenV2AmbassadorMint { .. } | EntryPoints::TokenV2AmbassadorBurn => {
"ambassador_token"
},
Expand Down Expand Up @@ -381,7 +385,9 @@ impl EntryPoints {
},
EntryPoints::IncGlobalMilestoneAggV2 { .. }
| EntryPoints::CreateGlobalMilestoneAggV2 { .. } => "counter_with_milestone",
EntryPoints::DeserializeU256 => "bcs_stream",
| EntryPoints::DeserializeU256 => "bcs_stream",
EntryPoints::APTPermissionedTransfer
| EntryPoints::APTTransfer => "permissioned_transfer",
}
}

Expand Down Expand Up @@ -722,6 +728,22 @@ impl EntryPoints {
],
)
},
EntryPoints::APTPermissionedTransfer => get_payload(
module_id,
ident_str!("transfer_permissioned").to_owned(),
vec![
bcs::to_bytes(&other.expect("Must provide other")).unwrap(),
bcs::to_bytes(&1u64).unwrap(),
],
),
EntryPoints::APTTransfer => get_payload(
module_id,
ident_str!("transfer").to_owned(),
vec![
bcs::to_bytes(&other.expect("Must provide other")).unwrap(),
bcs::to_bytes(&1u64).unwrap(),
],
)
}
}

Expand Down Expand Up @@ -829,6 +851,8 @@ impl EntryPoints {
EntryPoints::DeserializeU256 => AutomaticArgs::None,
EntryPoints::IncGlobalMilestoneAggV2 { .. } => AutomaticArgs::None,
EntryPoints::CreateGlobalMilestoneAggV2 { .. } => AutomaticArgs::Signer,
EntryPoints::APTPermissionedTransfer
| EntryPoints::APTTransfer => AutomaticArgs::Signer,
}
}
}
Expand Down
Loading

0 comments on commit 36ef86c

Please sign in to comment.