mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-01-12 22:37:29 +01:00
Avoid compiling when unecessary
This commit is contained in:
parent
04a62d2b97
commit
eaa897d983
@ -94,22 +94,6 @@ pub async fn execute(
|
|||||||
|
|
||||||
let mut tasks = Vec::new();
|
let mut tasks = Vec::new();
|
||||||
for i in 0..workload.run_count {
|
for i in 0..workload.run_count {
|
||||||
let run_command = match binary_path {
|
|
||||||
Some(binary_path) => tokio::process::Command::new(binary_path),
|
|
||||||
None => {
|
|
||||||
let mut command = tokio::process::Command::new("cargo");
|
|
||||||
command
|
|
||||||
.arg("run")
|
|
||||||
.arg("--release")
|
|
||||||
.arg("-p")
|
|
||||||
.arg("meilisearch")
|
|
||||||
.arg("--bin")
|
|
||||||
.arg("meilisearch")
|
|
||||||
.arg("--");
|
|
||||||
command
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
tasks.push(
|
tasks.push(
|
||||||
execute_run(
|
execute_run(
|
||||||
dashboard_client,
|
dashboard_client,
|
||||||
@ -119,7 +103,7 @@ pub async fn execute(
|
|||||||
master_key,
|
master_key,
|
||||||
&workload,
|
&workload,
|
||||||
args,
|
args,
|
||||||
run_command,
|
binary_path,
|
||||||
i,
|
i,
|
||||||
)
|
)
|
||||||
.await?,
|
.await?,
|
||||||
@ -150,12 +134,28 @@ async fn execute_run(
|
|||||||
master_key: Option<&str>,
|
master_key: Option<&str>,
|
||||||
workload: &Workload,
|
workload: &Workload,
|
||||||
args: &BenchDeriveArgs,
|
args: &BenchDeriveArgs,
|
||||||
run_command: tokio::process::Command,
|
binary_path: Option<&Path>,
|
||||||
run_number: u16,
|
run_number: u16,
|
||||||
) -> anyhow::Result<tokio::task::JoinHandle<anyhow::Result<std::fs::File>>> {
|
) -> anyhow::Result<tokio::task::JoinHandle<anyhow::Result<std::fs::File>>> {
|
||||||
meili_process::delete_db();
|
meili_process::delete_db();
|
||||||
|
|
||||||
meili_process::build().await?;
|
let run_command = match binary_path {
|
||||||
|
Some(binary_path) => tokio::process::Command::new(binary_path),
|
||||||
|
None => {
|
||||||
|
meili_process::build().await?;
|
||||||
|
let mut command = tokio::process::Command::new("cargo");
|
||||||
|
command
|
||||||
|
.arg("run")
|
||||||
|
.arg("--release")
|
||||||
|
.arg("-p")
|
||||||
|
.arg("meilisearch")
|
||||||
|
.arg("--bin")
|
||||||
|
.arg("meilisearch")
|
||||||
|
.arg("--");
|
||||||
|
command
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
let meilisearch =
|
let meilisearch =
|
||||||
meili_process::start(meili_client, master_key, workload, &args.asset_folder, run_command)
|
meili_process::start(meili_client, master_key, workload, &args.asset_folder, run_command)
|
||||||
.await?;
|
.await?;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user