Add option to not close chains on benchmark#3447
Merged
Conversation
This was referenced Feb 28, 2025
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
ea144ff to
e9e5ed3
Compare
3ce63b6 to
4d19568
Compare
4d19568 to
e3d282b
Compare
ma2bd
reviewed
Mar 1, 2025
linera-client/src/client_options.rs
Outdated
| /// If provided, will not close the chains after the benchmark is finished. This is useful | ||
| /// when running with many chains, as closing them all might take a while. | ||
| #[arg(long)] | ||
| leak_chains: bool, |
Contributor
There was a problem hiding this comment.
Maybe there is no need to introduce the concept of "leaking chains" and we should just write --do-not-close-chains / do_not_close_chains (or maybe --keep-chains-open)
e9e5ed3 to
b3bfdc0
Compare
e3d282b to
3abd22c
Compare
Contributor
Author
3abd22c to
7936681
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Motivation
Closing chains actually takes a surprisingly long time. The client will actually return fairly quickly, but the validators will be executing stuff for a while after the
CloseChainoperation is done. Also latency spikes while the validator is doing that.It's probably something to be investigated as well, tbh.
Proposal
For now, add an option to the benchmark to just not close the chains that are created for the benchmark (don't close them at the end), so that iteration with a lot of chains is faster.
Test Plan
Run it with the option, see that we exit quicker and the validators are not doing a bunch of stuff after the benchmark is exited.
Release Plan