Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bench: support large transactions #219

Merged
merged 4 commits into from
Oct 1, 2023

Conversation

grooviegermanikus
Copy link
Collaborator

@grooviegermanikus grooviegermanikus commented Sep 29, 2023

Problem:
The rust bench tool used small transactions of only 179 bytes which is unrealistic.

Proposed Solution:
Add option to allow for large transactions:
cargo run --bin bench -- --tx-count=10 |--large-transactions (short -L)

transaction characteristics:

  • uses memo program
  • 1186 bytes
  • 8 account signatures
  • 240 utf-chars in memo progra
  • 193175 compute units

Added transaction size to metrics:

2023-09-29T12:27:47.830548Z INFO bench: Run 1: Sent and Confirmed 10 tx(s) in Metric { txs_sent: 10, txs_confirmed: 10, txs_un_confirmed: 0, average_confirmation_time_ms: 546.8, average_time_to_send_txs: 0.8, average_transaction_bytes: 179.0, total_sent_time: 8.482915ms, total_transaction_bytes: 1790, total_confirmation_time: 5.468757417s } with
2023-09-29T12:27:47.830752Z INFO bench: Run 2: Sent and Confirmed 10 tx(s) in Metric { txs_sent: 10, txs_confirmed: 10, txs_un_confirmed: 0, average_confirmation_time_ms: 545.8, average_time_to_send_txs: 0.9, average_transaction_bytes: 179.0, total_sent_time: 9.194709ms, total_transaction_bytes: 1790, total_confirmation_time: 5.458955708s } with
2023-09-29T12:27:47.830773Z INFO bench: Run 3: Sent and Confirmed 10 tx(s) in Metric { txs_sent: 10, txs_confirmed: 10, txs_un_confirmed: 0, average_confirmation_time_ms: 551.6, average_time_to_send_txs: 1.0, average_transaction_bytes: 179.0, total_sent_time: 10.259458ms, total_transaction_bytes: 1790, total_confirmation_time: 5.516048292s } with
2023-09-29T12:27:47.830786Z INFO bench: Avg Metric Metric { txs_sent: 10, txs_confirmed: 10, txs_un_confirmed: 0, average_confirmation_time_ms: 548.1, average_time_to_send_txs: 0.9, average_transaction_bytes: 179.0, total_sent_time: 9.312ms, total_transaction_bytes: 1790, total_confirmation_time: 5.481253s }

) -> Metric {
let map_of_txs = Arc::new(DashMap::new());
let map_of_txs: Arc<DashMap<Signature, TxSendData>> = Arc::new(DashMap::new());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to specify type. May be your ide issue.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nah. sometimes is add them if the deduced type is too far away from declaration.

@grooviegermanikus grooviegermanikus merged commit 75edc36 into main Oct 1, 2023
4 checks passed
@godmodegalactus godmodegalactus deleted the groovie/bench-large-transactions branch January 25, 2024 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants