Remove useless data

This commit is contained in:
Mubelotix
2025-08-26 11:06:23 +02:00
parent 857bdffb1a
commit ab91ea8b47
2 changed files with 8 additions and 11 deletions

View File

@ -5,8 +5,6 @@ use anyhow::{bail, Context as _};
use tokio::process::Command as TokioCommand; use tokio::process::Command as TokioCommand;
use tokio::time; use tokio::time;
use super::workload::BenchWorkload;
use crate::common::assets::Asset;
use crate::common::client::Client; use crate::common::client::Client;
use crate::common::command::{health_command, run as run_command}; use crate::common::command::{health_command, run as run_command};
@ -65,12 +63,12 @@ pub async fn build() -> anyhow::Result<()> {
Ok(()) Ok(())
} }
#[tracing::instrument(skip(client, master_key, workload), fields(workload = workload.name))] #[tracing::instrument(skip(client, master_key), fields(workload = _workload))]
pub async fn start( pub async fn start(
client: &Client, client: &Client,
master_key: Option<&str>, master_key: Option<&str>,
workload: &BenchWorkload, extra_cli_args: &[String],
asset_folder: &str, _workload: &str,
mut command: TokioCommand, mut command: TokioCommand,
) -> anyhow::Result<tokio::process::Child> { ) -> anyhow::Result<tokio::process::Child> {
command.arg("--db-path").arg("./_xtask_benchmark.ms"); command.arg("--db-path").arg("./_xtask_benchmark.ms");
@ -79,7 +77,7 @@ pub async fn start(
} }
command.arg("--experimental-enable-logs-route"); command.arg("--experimental-enable-logs-route");
for extra_arg in workload.extra_cli_args.iter() { for extra_arg in extra_cli_args.iter() {
command.arg(extra_arg); command.arg(extra_arg);
} }
@ -87,7 +85,7 @@ pub async fn start(
let mut meilisearch = command.spawn().context("Error starting Meilisearch")?; let mut meilisearch = command.spawn().context("Error starting Meilisearch")?;
wait_for_health(client, &mut meilisearch, asset_folder).await?; wait_for_health(client, &mut meilisearch).await?;
Ok(meilisearch) Ok(meilisearch)
} }
@ -95,10 +93,9 @@ pub async fn start(
async fn wait_for_health( async fn wait_for_health(
client: &Client, client: &Client,
meilisearch: &mut tokio::process::Child, meilisearch: &mut tokio::process::Child,
asset_folder: &str,
) -> anyhow::Result<()> { ) -> anyhow::Result<()> {
for i in 0..100 { for i in 0..100 {
let res = run_command(client, &health_command(), &BTreeMap::new(), asset_folder, false).await; let res = run_command(client, &health_command(), &BTreeMap::new(), "", false).await;
if res.is_ok() { if res.is_ok() {
// check that this is actually the current Meilisearch instance that answered us // check that this is actually the current Meilisearch instance that answered us
if let Some(exit_code) = if let Some(exit_code) =

View File

@ -150,8 +150,8 @@ async fn execute_run(
let meilisearch = meili_process::start( let meilisearch = meili_process::start(
meili_client, meili_client,
master_key, master_key,
workload, &workload.extra_cli_args,
&args.common.asset_folder, &workload.name,
run_command, run_command,
) )
.await?; .await?;