-
Notifications
You must be signed in to change notification settings - Fork 11.4k
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
rpc benchmark init: directly read DB based on schema #20378
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Skipped Deployments
|
9c98761
to
1069b2c
Compare
1069b2c
to
8b0818c
Compare
8b0818c
to
eb96893
Compare
What is the rational behind these generated queries? Would they be representative to what we are interested in? |
@lxfind the generated queries now are basically "all supported queries based on primary key and indices" and does not consider the representativeness, I plan make it configurable for example taking in a file of weights to make it representative as a followup. |
902755b
to
43ab64b
Compare
43ab64b
to
47dcc16
Compare
d6648cc
to
592ae3d
Compare
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.
👍
crates/sui-rpc-benchmark/src/lib.rs
Outdated
long, | ||
default_value = "postgres://postgres:postgres@localhost:5432/sui" | ||
)] | ||
db_url: String, |
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.
The idea was to use Url
as the field type here so that clap
will handle the parsing validation errors for you -- you can still supply a default value using default_value_t
, I think.
) -> Result<Vec<EnrichedBenchmarkQuery>> { | ||
let mut enriched_queries = Vec::new(); | ||
for query in queries { | ||
let enriched = self.enrich_query(&query).await?; |
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.
Do this concurrently?
while Instant::now() < deadline { | ||
let enriched = enriched_queries | ||
.choose(&mut query_rng) | ||
.ok_or_else(|| anyhow::anyhow!("No queries available"))?; |
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.
.ok_or_else(|| anyhow::anyhow!("No queries available"))?; | |
.context("No queries available")?; |
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.
it's an option so no original Result
to add additional context to?
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.
Context
works on Option
too (to convert it into an anyhow::Result
).
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.
yes, I saw your PR and will amend this change to the latest commit, TIL, thanks!
ac9a7eb
to
2d14e5e
Compare
2d14e5e
to
eb222aa
Compare
eb222aa
to
c3519ba
Compare
Description
main things in this pr
__diesel_schema_migrations
Test plan
sui-indexer-alt-schema
report with local DB
Release notes
Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.
For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.