Skip to content

Commit

Permalink
[benchmarks] Module loading benches (simple)
Browse files Browse the repository at this point in the history
  • Loading branch information
georgemitenkov committed Nov 13, 2024
1 parent 2f3708e commit 3d9f8f1
Show file tree
Hide file tree
Showing 9 changed files with 7,783 additions and 14 deletions.
6 changes: 6 additions & 0 deletions crates/transaction-generator-lib/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ pub enum TransactionTypeArg {
SmartTablePicture1MWith1KChangeExceedsLimit,
DeserializeU256,
SimpleScript,
ChainDependencies,
ChainFriends,
StarDependencies,
}

impl TransactionTypeArg {
Expand Down Expand Up @@ -320,6 +323,9 @@ impl TransactionTypeArg {
},
TransactionTypeArg::DeserializeU256 => call_custom_module(EntryPoints::DeserializeU256),
TransactionTypeArg::SimpleScript => call_custom_module(EntryPoints::SimpleScript),
TransactionTypeArg::ChainDependencies => call_custom_module(EntryPoints::ChainDependencies),
TransactionTypeArg::ChainFriends => call_custom_module(EntryPoints::ChainFriends),
TransactionTypeArg::StarDependencies => call_custom_module(EntryPoints::StarDependencies),
}
}

Expand Down
11 changes: 11 additions & 0 deletions crates/transaction-generator-lib/src/publishing/module_simple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,9 @@ pub enum EntryPoints {
/// there to slow down deserialization & verification, effectively making it more expensive to
/// load it into code cache.
SimpleScript,
ChainDependencies,
ChainFriends,
StarDependencies,
}

impl EntryPoints {
Expand Down Expand Up @@ -329,6 +332,9 @@ impl EntryPoints {
EntryPoints::IncGlobalMilestoneAggV2 { .. }
| EntryPoints::CreateGlobalMilestoneAggV2 { .. } => "aggregator_examples",
EntryPoints::DeserializeU256 => "bcs_stream",
EntryPoints::ChainDependencies => "module_loading_chain_dependencies",
EntryPoints::ChainFriends => "module_loading_chain_friends",
EntryPoints::StarDependencies => "module_loading_star_dependencies",
}
}

Expand Down Expand Up @@ -389,6 +395,9 @@ impl EntryPoints {
EntryPoints::IncGlobalMilestoneAggV2 { .. }
| EntryPoints::CreateGlobalMilestoneAggV2 { .. } => "counter_with_milestone",
EntryPoints::DeserializeU256 => "bcs_stream",
EntryPoints::ChainDependencies => "module_loading_chain_dependencies",
EntryPoints::ChainFriends => "module_loading_chain_friends",
EntryPoints::StarDependencies => "module_loading_star_dependencies",
}
}

Expand Down Expand Up @@ -732,6 +741,7 @@ impl EntryPoints {
],
)
},
EntryPoints::ChainDependencies | EntryPoints::ChainFriends | EntryPoints::StarDependencies => get_payload_void(module_id, ident_str!("run").to_owned()),
}
}

Expand Down Expand Up @@ -840,6 +850,7 @@ impl EntryPoints {
EntryPoints::DeserializeU256 => AutomaticArgs::None,
EntryPoints::IncGlobalMilestoneAggV2 { .. } => AutomaticArgs::None,
EntryPoints::CreateGlobalMilestoneAggV2 { .. } => AutomaticArgs::Signer,
EntryPoints::ChainDependencies | EntryPoints::ChainFriends | EntryPoints::StarDependencies => AutomaticArgs::None,
}
}
}
Expand Down
3,149 changes: 3,135 additions & 14 deletions crates/transaction-generator-lib/src/publishing/raw_module_data.rs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[package]
name = 'module_loading_chain_dependencies'
version = '1.0.0'

[dependencies]
AptosStdlib = { local = "../../../../../aptos-move/framework/aptos-stdlib" }

[addresses]
publisher_address = "0xABCD"
Loading

0 comments on commit 3d9f8f1

Please sign in to comment.