-
Notifications
You must be signed in to change notification settings - Fork 68
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
Add a program to submit random transactions #907
Conversation
#[clap(short, long, default_value = "1")] | ||
jobs: usize, | ||
|
||
/// URL of the query service. |
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.
This doesn't have the clap derive. What does that do?
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.
Makes it a (required) positional argument
fn random_transaction(min_size: usize, max_size: usize) -> Transaction { | ||
let mut rng = thread_rng(); | ||
|
||
let vm = rng.next_u64(); |
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.
Wondering if we want to narrow this down to a few VM IDs instead of sampling from the whole range which means we will probably never use the same VM ID twice.
} | ||
|
||
fn random_transaction(min_size: usize, max_size: usize) -> Transaction { | ||
let mut rng = thread_rng(); |
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.
How does this work with multithreading? It might be nice to allow passing in a seed to make the generated transactions deterministic, but we can also add that later.
edit: first question answered here: https://rust-random.github.io/book/guide-parallel.html
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.
LGTM
No description provided.