-
Notifications
You must be signed in to change notification settings - Fork 251
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
A benchmark suite for the getTransaction
RPC call
#3987
Conversation
accounts-cluster-bench/src/main.rs
Outdated
@@ -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))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getTransaction
RPC call
ab0fdbf
to
7813e55
Compare
accounts-cluster-bench/src/main.rs
Outdated
@@ -130,6 +134,30 @@ struct SeedTracker { | |||
max_closed: Arc<AtomicU64>, | |||
} | |||
|
|||
type TransactionSignatureTracker = Arc<RwLock<VecDeque<Signature>>>; |
There was a problem hiding this comment.
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
935673b
7813e55
to
935673b
Compare
Converted |
correctly enough. i usually prefer a struct with named field to 1-tuple form, 'cause |
accounts-cluster-bench/src/main.rs
Outdated
struct TransactionSignatureTracker(Arc<RwLock<VecDeque<Signature>>>); | ||
|
||
impl TransactionSignatureTracker { | ||
fn clone(&self) -> TransactionSignatureTracker { |
There was a problem hiding this comment.
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
935673b
to
565a3c5
Compare
Update
|
55acaea
Resolved merge conflicts with |
Looks like this one broke CI: https://buildkite.com/anza/agave/builds/15544#0193ace5-f9fa-475e-91a2-81dd45120c13 Put in #4025 for it |
Summary of Changes
Note
Sometimes we get a
invalid type: null, expected struct EncodedConfirmedTransactionWithStatusMeta
error. Why is this? Is there a race between the time theexecutor
accepts the transactions and the time they can be fetched usingclient.get_transaction()
?Related: #3242.