mirror of
https://github.com/logos-blockchain/logos-blockchain-testing.git
synced 2026-01-10 17:23:07 +00:00
runner: honor duration with no workloads
This commit is contained in:
parent
bd57e57e11
commit
bfe8764439
@ -107,6 +107,21 @@ impl Runner {
|
||||
where
|
||||
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 _ = Self::drive_until_timer(&mut workloads, scenario.duration()).await?;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user