File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626
2727 - name : Run spicebench
2828 run : |
29- cargo run -p spicebench -- run \
30- --ready-wait 180 \
31- --concurrency 2 \
29+ cargo run -p spicebench -- \
30+ --system-adapter-http-url http://localhost:8080/rpc \
31+ --system-adapter-execution-mode direct-query \
3232 --query-set tpch
Original file line number Diff line number Diff line change @@ -287,7 +287,7 @@ pub struct DataConsistencyArgs {
287287}
288288
289289#[ derive( Parser , Debug ) ]
290- pub struct LoadTestArgs {
290+ pub struct BenchRunArgs {
291291 #[ command( flatten) ]
292292 pub ( crate ) test_args : DatasetTestArgs ,
293293
Original file line number Diff line number Diff line change @@ -16,16 +16,10 @@ limitations under the License.
1616
1717use std:: path:: PathBuf ;
1818
19- use clap:: { ArgAction , Parser , Subcommand , ValueEnum } ;
19+ use clap:: { ArgAction , Parser , ValueEnum } ;
2020
2121mod dataset;
22- pub use dataset:: { DatasetTestArgs , LoadTestArgs } ;
23-
24- #[ derive( Subcommand ) ]
25- pub enum Commands {
26- /// Run a load test against a spiced instance
27- Run ( LoadTestArgs ) ,
28- }
22+ pub use dataset:: { BenchRunArgs , DatasetTestArgs } ;
2923
3024/// Arguments Common to all [`TestCommands`].
3125#[ derive( Parser , Debug , Clone ) ]
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ limitations under the License.
1515*/
1616
1717use super :: get_app_and_start_request;
18- use crate :: { args:: LoadTestArgs , health:: HealthMonitor , spiced_metrics:: MetricsScraper } ;
18+ use crate :: { args:: BenchRunArgs , health:: HealthMonitor , spiced_metrics:: MetricsScraper } ;
1919use std:: time:: Duration ;
2020use test_framework:: {
2121 TestType , anyhow,
@@ -38,7 +38,7 @@ use tokio::signal;
3838use tokio_util:: sync:: CancellationToken ;
3939
4040#[ expect( clippy:: too_many_lines) ]
41- pub ( crate ) async fn run ( args : & LoadTestArgs ) -> anyhow:: Result < ( ) > {
41+ pub ( crate ) async fn run ( args : & BenchRunArgs ) -> anyhow:: Result < ( ) > {
4242 if args. test_args . common . concurrency < 2 {
4343 return Err ( anyhow:: anyhow!(
4444 "Concurrency should be greater than 1 for a load test"
Original file line number Diff line number Diff line change @@ -23,13 +23,13 @@ mod health;
2323mod metrics;
2424mod spiced_metrics;
2525
26- use args:: Commands ;
26+ use args:: BenchRunArgs ;
2727
2828#[ derive( Parser ) ]
2929#[ command( author, version, about, long_about = None ) ]
3030struct Cli {
31- #[ command( subcommand ) ]
32- subcommand : Commands ,
31+ #[ command( flatten ) ]
32+ args : BenchRunArgs ,
3333}
3434
3535#[ tokio:: main]
@@ -40,17 +40,13 @@ async fn main() -> anyhow::Result<()> {
4040 let raw_cli_args: Vec < String > = std:: env:: args ( ) . skip ( 1 ) . collect ( ) ;
4141 let cli = Cli :: parse ( ) ;
4242
43- match cli. subcommand {
44- Commands :: Run ( args) => {
45- if commands:: maybe_dispatch_run_to_system_adapter ( & raw_cli_args, & args. test_args . common )
46- . await ?
47- {
48- return Ok ( ( ) ) ;
49- }
50-
51- commands:: load:: run ( & args) . await ?
52- }
43+ if commands:: maybe_dispatch_run_to_system_adapter ( & raw_cli_args, & cli. args . test_args . common )
44+ . await ?
45+ {
46+ return Ok ( ( ) ) ;
5347 }
5448
49+ commands:: load:: run ( & cli. args ) . await ?;
50+
5551 Ok ( ( ) )
5652}
You can’t perform that action at this time.
0 commit comments