-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
cli: support loading initial datasets in cockroach demo
#28383
Merged
Merged
Conversation
This file contains 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
Nice idea! LGTM. I notice you didn't change / add any help texts (I think) - if you don't mind, it would be good to extend the help text to explain that subcommands mean load a given workload. |
Any registered workloads are automatically added as subcommands. `cockroach demo` demo keeps the old behavior, but `cockroach demo startrek` will load the startrek dataset into the `startrek` database and alter the connection it starts to start in that database. $ ./cockroach demo startrek # # Welcome to the CockroachDB demo database! # # You are connected to a temporary, in-memory CockroachDB # instance. Your changes will not be saved! # # Web UI: http://127.0.0.1:63932 # # Server version: CockroachDB CCL v2.1.0-alpha.20180702-1271-g3fe24ce-dirty (x86_64-apple-darwin17.7.0, built 2018/08/08 16:30:52, go1.10) (same version as client) # Cluster ID: 7d0a580b-ecb2-4f5a-ae0f-bae298dbaf9b # # Enter \? for a brief introduction. # root@127.0.0.1:63931/startrek> select * from episodes limit 1; +----+--------+-----+--------------+----------+ | id | season | num | title | stardate | +----+--------+-----+--------------+----------+ | 1 | 1 | 1 | The Man Trap | 1531.1 | +----+--------+-----+--------------+----------+ (1 row) Still TODO is faster loading than Setup for large workloads, like tpcc. Release note (cli change): `cockroach demo` now supports starting with one of various datasets loaded
Whoops, slipped my mind. Done! |
jordanlewis
approved these changes
Aug 8, 2018
Thanks for the review! Test failure is a flake fixed by #28329, which I don't have in my branch. bors r=jordanlewis |
craig bot
pushed a commit
that referenced
this pull request
Aug 8, 2018
28383: cli: support loading initial datasets in `cockroach demo` r=jordanlewis a=danhhz Any registered workloads are automatically added as subcommands. `cockroach demo` demo keeps the old behavior, but `cockroach demo startrek` will load the startrek dataset into the `startrek` database and alter the connection it starts to start in that database. $ ./cockroach demo startrek # # Welcome to the CockroachDB demo database! # # You are connected to a temporary, in-memory CockroachDB # instance. Your changes will not be saved! # # Web UI: http://127.0.0.1:63932 # # Server version: CockroachDB CCL v2.1.0-alpha.20180702-1271-g3fe24ce-dirty (x86_64-apple-darwin17.7.0, built 2018/08/08 16:30:52, go1.10) (same version as client) # Cluster ID: 7d0a580b-ecb2-4f5a-ae0f-bae298dbaf9b # # Enter \? for a brief introduction. # root@127.0.0.1:63931/startrek> select * from episodes limit 1; +----+--------+-----+--------------+----------+ | id | season | num | title | stardate | +----+--------+-----+--------------+----------+ | 1 | 1 | 1 | The Man Trap | 1531.1 | +----+--------+-----+--------------+----------+ (1 row) Still TODO is faster loading than Setup for large workloads, like tpcc. Release note (cli change): `cockroach demo` now supports starting with one of various datasets loaded Co-authored-by: Daniel Harrison <daniel.harrison@gmail.com>
Build succeeded |
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.
Any registered workloads are automatically added as subcommands.
cockroach demo
demo keeps the old behavior, butcockroach demo startrek
will load the startrek dataset into thestartrek
databaseand alter the connection it starts to start in that database.
Still TODO is faster loading than Setup for large workloads, like tpcc.
Release note (cli change):
cockroach demo
now supports starting withone of various datasets loaded