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

A benchmark suite for the getTransaction RPC call #3987

Merged
merged 4 commits into from
Dec 9, 2024

Conversation

steveluscher
Copy link

Summary of Changes

  • Created a threadsafe tracker of transaction signatures the bench runner creates.
  • Use those signatures in new benchmarks for fetching base64/parsed transactions
     Running `/home/sol/src/agave/target/debug/solana-accounts-cluster-bench --identity /home/sol/.config/solana/id.json --rpc-bench transaction-parsed --iterations 0 --url l --mint 7z5aMSb5zfJThETMRgFFd3XNKKVcZGNtWQDS3qfgbQ2t --space 165`
[2024-12-06T20:17:54.094216299Z INFO  solana_accounts_cluster_bench] Targeting http://localhost:8899
[2024-12-06T20:17:54.097471489Z INFO  solana_accounts_cluster_bench] Starting balance(s): [712421783360]
[2024-12-06T20:17:54.098455952Z INFO  solana_accounts_cluster_bench] creating 4 new
[2024-12-06T20:17:54.098468085Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098481370Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098490958Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098499314Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098507380Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098516377Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098525845Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098534040Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098542025Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098550341Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098559709Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098568005Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098575910Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098585117Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098593032Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098601358Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098609694Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098617629Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098625835Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098634000Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098643378Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098651594Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098659539Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098668346Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098677453Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098685679Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098694015Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098702000Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098711718Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098719733Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098727899Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098736195Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098744180Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098752516Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098760631Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098769017Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098778315Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098786761Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098794656Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098803783Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098812269Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098821717Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098829923Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098839140Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098847496Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098855852Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098865100Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098873456Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098882042Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098890178Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098898553Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098907521Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098915706Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098923611Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098931937Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098940774Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098949260Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098957195Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098966202Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098974738Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098983836Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.098992051Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.099000347Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.099008643Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.099017600Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.099025906Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.099033931Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.099042758Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.099050943Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.099060061Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.099068376Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.099077374Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.099085589Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.099093785Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.099103754Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.099115326Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.099124874Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.099133240Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.099141245Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.099571313Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.102332023Z INFO  solana_accounts_cluster_bench] txs: 4
[2024-12-06T20:17:54.102341682Z INFO  solana_accounts_cluster_bench] transaction-parsed: No transactions have yet been made; skipping
[2024-12-06T20:17:54.285485220Z INFO  solana_accounts_cluster_bench] ids: 4
[2024-12-06T20:17:54.860121201Z INFO  solana_accounts_cluster_bench] creating 4 new
[2024-12-06T20:17:54.861283031Z INFO  solana_accounts_cluster_bench] txs: 4
[2024-12-06T20:17:55.099499428Z INFO  solana_accounts_cluster_bench] ids: 4
[2024-12-06T20:17:55.205080646Z INFO  solana_accounts_cluster_bench] creating 2 new
[2024-12-06T20:17:55.205846773Z INFO  solana_accounts_cluster_bench] txs: 2
[2024-12-06T20:17:55.317157186Z INFO  solana_accounts_cluster_bench] ids: 2
[2024-12-06T20:17:55.837933714Z INFO  solana_accounts_cluster_bench] creating 4 new
[2024-12-06T20:17:55.838808037Z INFO  solana_accounts_cluster_bench] txs: 4
[2024-12-06T20:17:56.065752898Z INFO  solana_accounts_cluster_bench] ids: 4
[2024-12-06T20:17:56.696204899Z INFO  solana_accounts_cluster_bench] creating 4 new
[2024-12-06T20:17:56.697018165Z INFO  solana_accounts_cluster_bench] txs: 4
[2024-12-06T20:17:56.926942853Z INFO  solana_accounts_cluster_bench] ids: 4
[2024-12-06T20:17:57.139323925Z INFO  solana_accounts_cluster_bench] get_transaction(parsed) error: Error { request: Some(GetTransaction), kind: SerdeJson(Error("invalid type: null, expected struct EncodedConfirmedTransactionWithStatusMeta", line: 0, column: 0)) }
[2024-12-06T20:17:57.513326623Z INFO  solana_accounts_cluster_bench] creating 4 new
[2024-12-06T20:17:57.514127676Z INFO  solana_accounts_cluster_bench] txs: 4
[2024-12-06T20:17:57.742013876Z INFO  solana_accounts_cluster_bench] ids: 4
[2024-12-06T20:17:57.742055505Z INFO  solana_accounts_cluster_bench] total_accounts_created: 22 total_accounts_closed: 0 tx_sent_count: 22 loop_count: 6 balance(s): [712376699200]
[2024-12-06T20:17:58.124629053Z INFO  solana_accounts_cluster_bench] t(0) rpc(TransactionParsed) iters: 72 success: 0 errors: 73
[2024-12-06T20:17:58.124673007Z INFO  solana_accounts_cluster_bench]  rpc average average errors time: 55094 us
[2024-12-06T20:17:58.334995854Z INFO  solana_accounts_cluster_bench] creating 4 new
[2024-12-06T20:17:58.335896927Z INFO  solana_accounts_cluster_bench] txs: 4
[2024-12-06T20:17:58.578792632Z INFO  solana_accounts_cluster_bench] ids: 4
[2024-12-06T20:17:59.222673640Z INFO  solana_accounts_cluster_bench] creating 4 new
[2024-12-06T20:17:59.223562070Z INFO  solana_accounts_cluster_bench] txs: 4
[2024-12-06T20:17:59.461762024Z INFO  solana_accounts_cluster_bench] ids: 4
[2024-12-06T20:17:59.518297584Z INFO  solana_client::transaction_executor] success: 26 error: 0 timed_out: 0
[2024-12-06T20:18:00.056749794Z INFO  solana_accounts_cluster_bench] creating 4 new
[2024-12-06T20:18:00.057653433Z INFO  solana_accounts_cluster_bench] txs: 4
[2024-12-06T20:18:00.167540598Z INFO  solana_accounts_cluster_bench] get_transaction(parsed) error: Error { request: Some(GetTransaction), kind: SerdeJson(Error("invalid type: null, expected struct EncodedConfirmedTransactionWithStatusMeta", line: 0, column: 0)) }
[2024-12-06T20:18:00.289499723Z INFO  solana_accounts_cluster_bench] ids: 4
[2024-12-06T20:18:00.883973645Z INFO  solana_accounts_cluster_bench] creating 4 new
[2024-12-06T20:18:00.884873657Z INFO  solana_accounts_cluster_bench] txs: 4
[2024-12-06T20:18:01.121465211Z INFO  solana_accounts_cluster_bench] ids: 4
[2024-12-06T20:18:01.121507371Z INFO  solana_accounts_cluster_bench] total_accounts_created: 38 total_accounts_closed: 0 tx_sent_count: 38 loop_count: 10 balance(s): [712343910720]
[2024-12-06T20:18:01.766018865Z INFO  solana_accounts_cluster_bench] creating 4 new
[2024-12-06T20:18:01.766927713Z INFO  solana_accounts_cluster_bench] txs: 4
[2024-12-06T20:18:02.008361226Z INFO  solana_accounts_cluster_bench] ids: 4
[2024-12-06T20:18:02.115333337Z INFO  solana_accounts_cluster_bench] creating 4 new
[2024-12-06T20:18:02.116224482Z INFO  solana_accounts_cluster_bench] txs: 4
[2024-12-06T20:18:02.168248261Z INFO  solana_accounts_cluster_bench] t(0) rpc(TransactionParsed) iters: 145 success: 0 errors: 73
[2024-12-06T20:18:02.168299890Z INFO  solana_accounts_cluster_bench]  rpc average average errors time: 55386 us
[2024-12-06T20:18:02.352400745Z INFO  solana_accounts_cluster_bench] ids: 4
[2024-12-06T20:18:02.949526539Z INFO  solana_accounts_cluster_bench] creating 4 new
[2024-12-06T20:18:02.950424176Z INFO  solana_accounts_cluster_bench] txs: 4
[2024-12-06T20:18:03.181269711Z INFO  solana_accounts_cluster_bench] get_transaction(parsed) error: Error { request: Some(GetTransaction), kind: SerdeJson(Error("invalid type: null, expected struct EncodedConfirmedTransactionWithStatusMeta", line: 0, column: 0)) }
[2024-12-06T20:18:03.187254774Z INFO  solana_accounts_cluster_bench] ids: 4
[2024-12-06T20:18:03.825948951Z INFO  solana_accounts_cluster_bench] creating 4 new
[2024-12-06T20:18:03.826847159Z INFO  solana_accounts_cluster_bench] txs: 4
[2024-12-06T20:18:04.067639381Z INFO  solana_accounts_cluster_bench] ids: 4
[2024-12-06T20:18:04.228683888Z INFO  solana_accounts_cluster_bench] creating 4 new
[2024-12-06T20:18:04.229563711Z INFO  solana_accounts_cluster_bench] txs: 4
[2024-12-06T20:18:04.467061577Z INFO  solana_accounts_cluster_bench] ids: 4
[2024-12-06T20:18:04.467101403Z INFO  solana_accounts_cluster_bench] total_accounts_created: 58 total_accounts_closed: 0 tx_sent_count: 58 loop_count: 15 balance(s): [712302925120]
[2024-12-06T20:18:04.524057372Z INFO  solana_client::transaction_executor] success: 58 error: 0 timed_out: 0
[2024-12-06T20:18:04.577858843Z INFO  solana_accounts_cluster_bench] creating 4 new
[2024-12-06T20:18:04.578737223Z INFO  solana_accounts_cluster_bench] txs: 4
[2024-12-06T20:18:04.819392053Z INFO  solana_accounts_cluster_bench] ids: 4
[2024-12-06T20:18:05.412079262Z INFO  solana_accounts_cluster_bench] creating 4 new
[2024-12-06T20:18:05.412978102Z INFO  solana_accounts_cluster_bench] txs: 4
[2024-12-06T20:18:05.652012650Z INFO  solana_accounts_cluster_bench] ids: 4
[2024-12-06T20:18:06.189595991Z INFO  solana_accounts_cluster_bench] get_transaction(parsed) error: Error { request: Some(GetTransaction), kind: SerdeJson(Error("invalid type: null, expected struct EncodedConfirmedTransactionWithStatusMeta", line: 0, column: 0)) }
[2024-12-06T20:18:06.189653981Z INFO  solana_accounts_cluster_bench] t(0) rpc(TransactionParsed) iters: 217 success: 0 errors: 72
[2024-12-06T20:18:06.189665323Z INFO  solana_accounts_cluster_bench]  rpc average average errors time: 55846 us
[2024-12-06T20:18:06.295748843Z INFO  solana_accounts_cluster_bench] creating 4 new
[2024-12-06T20:18:06.296635690Z INFO  solana_accounts_cluster_bench] txs: 4
[2024-12-06T20:18:06.533442821Z INFO  solana_accounts_cluster_bench] ids: 4
[2024-12-06T20:18:06.643716611Z INFO  solana_accounts_cluster_bench] creating 4 new
[2024-12-06T20:18:06.644614318Z INFO  solana_accounts_cluster_bench] txs: 4
[2024-12-06T20:18:06.880705027Z INFO  solana_accounts_cluster_bench] ids: 4
[2024-12-06T20:18:07.476231503Z INFO  solana_accounts_cluster_bench] creating 4 new
[2024-12-06T20:18:07.477134651Z INFO  solana_accounts_cluster_bench] txs: 4
[2024-12-06T20:18:07.715650071Z INFO  solana_accounts_cluster_bench] ids: 4
[2024-12-06T20:18:07.715691550Z INFO  solana_accounts_cluster_bench] total_accounts_created: 78 total_accounts_closed: 0 tx_sent_count: 78 loop_count: 20 balance(s): [712261939520]
[2024-12-06T20:18:08.296124741Z INFO  solana_accounts_cluster_bench] creating 4 new
[2024-12-06T20:18:08.297019342Z INFO  solana_accounts_cluster_bench] txs: 4
[2024-12-06T20:18:08.533491325Z INFO  solana_accounts_cluster_bench] ids: 4
[2024-12-06T20:18:09.164909168Z INFO  solana_accounts_cluster_bench] creating 4 new
[2024-12-06T20:18:09.165813247Z INFO  solana_accounts_cluster_bench] txs: 4
[2024-12-06T20:18:09.214878320Z INFO  solana_accounts_cluster_bench] get_transaction(parsed) error: Error { request: Some(GetTransaction), kind: SerdeJson(Error("invalid type: null, expected struct EncodedConfirmedTransactionWithStatusMeta", line: 0, column: 0)) }
[2024-12-06T20:18:09.390953940Z INFO  solana_accounts_cluster_bench] ids: 4
[2024-12-06T20:18:09.659257280Z INFO  solana_client::transaction_executor] success: 86 error: 0 timed_out: 0
[2024-12-06T20:18:09.976568994Z INFO  solana_accounts_cluster_bench] creating 4 new
[2024-12-06T20:18:09.977480989Z INFO  solana_accounts_cluster_bench] txs: 4
[2024-12-06T20:18:10.205769237Z INFO  solana_accounts_cluster_bench] t(0) rpc(TransactionParsed) iters: 290 success: 3 errors: 70
[2024-12-06T20:18:10.205809424Z INFO  solana_accounts_cluster_bench]  t(0) rpc(TransactionParsed average success_time: 59839 us
[2024-12-06T20:18:10.205823461Z INFO  solana_accounts_cluster_bench]  rpc average average errors time: 54802 us

Note

Sometimes we get a invalid type: null, expected struct EncodedConfirmedTransactionWithStatusMeta error. Why is this? Is there a race between the time the executor accepts the transactions and the time they can be fetched using client.get_transaction()?

Related: #3242.

@@ -545,6 +633,8 @@ fn run_accounts_bench(
max_created: Arc::new(AtomicU64::default()),
max_closed: Arc::new(AtomicU64::default()),
};
let transaction_signature_tracker =
TransactionSignatureTracker::new(RwLock::new(VecDeque::with_capacity(5000)));
Copy link
Author

Choose a reason for hiding this comment

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

inb4 ‘magic number.’

magic-snl-1027267539

@steveluscher steveluscher changed the title Transaction rpc bench A benchmark suite for the getTransaction RPC call Dec 6, 2024
@steveluscher steveluscher force-pushed the transaction-rpc-bench branch 3 times, most recently from ab0fdbf to 7813e55 Compare December 7, 2024 00:30
alessandrod
alessandrod previously approved these changes Dec 7, 2024
@@ -130,6 +134,30 @@ struct SeedTracker {
max_closed: Arc<AtomicU64>,
}

type TransactionSignatureTracker = Arc<RwLock<VecDeque<Signature>>>;

Choose a reason for hiding this comment

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

nit: I'd struct TransactionSignatureTracker(Arc<RwLock<...>)

it's not very idiomatic to use a trait for this. Also always add an empty
newline between item definitions

t-nelson
t-nelson previously approved these changes Dec 7, 2024
@steveluscher steveluscher dismissed stale reviews from t-nelson and alessandrod via 935673b December 7, 2024 07:10
@steveluscher steveluscher force-pushed the transaction-rpc-bench branch from 7813e55 to 935673b Compare December 7, 2024 07:10
@steveluscher
Copy link
Author

Converted TransactionSignatureTracker to a struct, but I'm not so sure I did it correctly.

@t-nelson
Copy link

t-nelson commented Dec 7, 2024

Converted TransactionSignatureTracker to a struct, but I'm not so sure I did it correctly.

correctly enough. i usually prefer a struct with named field to 1-tuple form, 'cause .0 notation tastes bad. can similarly be avoid with a Deref impl

struct TransactionSignatureTracker(Arc<RwLock<VecDeque<Signature>>>);

impl TransactionSignatureTracker {
fn clone(&self) -> TransactionSignatureTracker {
Copy link

Choose a reason for hiding this comment

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

you can #[derive(Clone)] on the struct instead

@steveluscher steveluscher force-pushed the transaction-rpc-bench branch from 935673b to 565a3c5 Compare December 9, 2024 08:27
@steveluscher
Copy link
Author

Update

  • Derive clone
  • Move Measure call closer to RPC call
  • impl Deref

alessandrod
alessandrod previously approved these changes Dec 9, 2024
t-nelson
t-nelson previously approved these changes Dec 9, 2024
@steveluscher steveluscher dismissed stale reviews from t-nelson and alessandrod via 55acaea December 9, 2024 17:41
@steveluscher
Copy link
Author

Resolved merge conflicts with master ergo review required.

t-nelson
t-nelson previously approved these changes Dec 9, 2024
@steveluscher steveluscher merged commit a826581 into anza-xyz:master Dec 9, 2024
22 of 25 checks passed
@steveluscher steveluscher deleted the transaction-rpc-bench branch December 9, 2024 18:02
@joncinque
Copy link

Looks like this one broke CI: https://buildkite.com/anza/agave/builds/15544#0193ace5-f9fa-475e-91a2-81dd45120c13

Put in #4025 for it

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.

4 participants