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 9, 2024
1 parent 43f2715 commit 6c002e4
Show file tree
Hide file tree
Showing 4 changed files with 1,800 additions and 1,721 deletions.
1 change: 1 addition & 0 deletions aptos-move/e2e-benchmark/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ fn main() {
(401, EntryPoints::TokenV2AmbassadorMint { numbered: true }),
(467, EntryPoints::LiquidityPoolSwap { is_stable: true }),
(415, EntryPoints::LiquidityPoolSwap { is_stable: false }),
(10000, EntryPoints::APTPermissionedTransfer),
];

let mut failures = Vec::new();
Expand Down
16 changes: 14 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,7 @@ pub enum EntryPoints {
num_points_per_txn: usize,
},
DeserializeU256,
APTPermissionedTransfer,
}

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

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

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

0 comments on commit 6c002e4

Please sign in to comment.