Skip to content

Commit

Permalink
Create benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
runtian-zhou committed Oct 15, 2024
1 parent e036793 commit 9161080
Show file tree
Hide file tree
Showing 4 changed files with 1,820 additions and 1,721 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() {
(401, EntryPoints::TokenV2AmbassadorMint { numbered: true }),
(467, EntryPoints::LiquidityPoolSwap { is_stable: true }),
(415, 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 9161080

Please sign in to comment.