mirror of
https://github.com/logos-blockchain/logos-blockchain-testing.git
synced 2026-02-24 07:03:09 +00:00
runner: honor duration with no workloads
This commit is contained in:
parent
bd57e57e11
commit
bfe8764439
@ -107,6 +107,21 @@ impl Runner {
|
|||||||
where
|
where
|
||||||
Caps: Send + Sync,
|
Caps: Send + Sync,
|
||||||
{
|
{
|
||||||
|
if scenario.workloads().is_empty() {
|
||||||
|
let duration = scenario.duration();
|
||||||
|
if !duration.is_zero() {
|
||||||
|
sleep(duration).await;
|
||||||
|
}
|
||||||
|
|
||||||
|
if let Some(cooldown) = Self::cooldown_duration(context.as_ref()) {
|
||||||
|
if !cooldown.is_zero() {
|
||||||
|
sleep(cooldown).await;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
|
||||||
let mut workloads = Self::spawn_workloads(scenario, context);
|
let mut workloads = Self::spawn_workloads(scenario, context);
|
||||||
let _ = Self::drive_until_timer(&mut workloads, scenario.duration()).await?;
|
let _ = Self::drive_until_timer(&mut workloads, scenario.duration()).await?;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user