Skip to content

Commit

Permalink
feat(cli): add prof and tokio env config (#3824)
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Chi <iskyzh@gmail.com>

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
skyzh and mergify[bot] authored Jul 13, 2022
1 parent b16c25a commit 3e72311
Show file tree
Hide file tree
Showing 11 changed files with 297 additions and 94 deletions.
168 changes: 167 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions src/cmd/src/bin/compactor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@ use tikv_jemallocator::Jemalloc;
static GLOBAL: Jemalloc = Jemalloc;

#[cfg_attr(coverage, no_coverage)]
#[tokio::main]
async fn main() {
fn main() {
use clap::StructOpt;

let opts = risingwave_compactor::CompactorOpts::parse();

risingwave_rt::oneshot_common();
risingwave_rt::init_risingwave_logger(risingwave_rt::LoggerSettings::new_default());

risingwave_compactor::start(opts).await;
risingwave_rt::main_okk(risingwave_compactor::start(opts))
}
6 changes: 2 additions & 4 deletions src/cmd/src/bin/compute_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,15 @@ use tikv_jemallocator::Jemalloc;
static GLOBAL: Jemalloc = Jemalloc;

#[cfg_attr(coverage, no_coverage)]
#[tokio::main]
async fn main() {
fn main() {
use clap::StructOpt;

let opts = risingwave_compute::ComputeNodeOpts::parse();

risingwave_rt::oneshot_common();
risingwave_rt::init_risingwave_logger(risingwave_rt::LoggerSettings::new(
opts.enable_jaeger_tracing,
false,
));

risingwave_compute::start(opts).await
risingwave_rt::main_okk(risingwave_compute::start(opts))
}
7 changes: 2 additions & 5 deletions src/cmd/src/bin/ctl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,12 @@ use tikv_jemallocator::Jemalloc;
static GLOBAL: Jemalloc = Jemalloc;

#[cfg_attr(coverage, no_coverage)]
#[tokio::main]
async fn main() -> Result<()> {
fn main() -> Result<()> {
use clap::StructOpt;

let opts = risingwave_ctl::CliOpts::parse();

risingwave_rt::oneshot_common();
risingwave_rt::init_risingwave_logger(risingwave_rt::LoggerSettings::new_default());
// console_subscriber::init();a

risingwave_ctl::start(opts).await
risingwave_rt::main_okk(risingwave_ctl::start(opts))
}
6 changes: 2 additions & 4 deletions src/cmd/src/bin/frontend_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@ use tikv_jemallocator::Jemalloc;
static GLOBAL: Jemalloc = Jemalloc;

#[cfg_attr(coverage, no_coverage)]
#[tokio::main(flavor = "multi_thread", worker_threads = 4)]
async fn main() {
fn main() {
use clap::StructOpt;

let opts = risingwave_frontend::FrontendOpts::parse();

risingwave_rt::oneshot_common();
risingwave_rt::init_risingwave_logger(risingwave_rt::LoggerSettings::new_default());

risingwave_frontend::start(opts).await
risingwave_rt::main_okk(risingwave_frontend::start(opts))
}
6 changes: 2 additions & 4 deletions src/cmd/src/bin/meta_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@ use tikv_jemallocator::Jemalloc;
static GLOBAL: Jemalloc = Jemalloc;

#[cfg_attr(coverage, no_coverage)]
#[tokio::main]
async fn main() {
fn main() {
use clap::StructOpt;

let opts = risingwave_meta::MetaNodeOpts::parse();

risingwave_rt::oneshot_common();
risingwave_rt::init_risingwave_logger(risingwave_rt::LoggerSettings::new_default());

risingwave_meta::start(opts).await
risingwave_rt::main_okk(risingwave_meta::start(opts))
}
Loading

0 comments on commit 3e72311

Please sign in to comment.