From a1885ac746016e10cb6d754dad7c5d4ee09a3b7d Mon Sep 17 00:00:00 2001 From: David Peter Date: Tue, 22 Feb 2022 08:36:56 +0100 Subject: [PATCH] Add debug/mock mode --- src/app.rs | 6 + src/benchmark/executor.rs | 230 +++++++++++++++++++++++++++++++++++++ src/benchmark/mod.rs | 183 +++-------------------------- src/benchmark/scheduler.rs | 17 +-- src/options.rs | 27 ++++- tests/integration_tests.rs | 94 +++++++++++++++ 6 files changed, 376 insertions(+), 181 deletions(-) create mode 100644 src/benchmark/executor.rs diff --git a/src/app.rs b/src/app.rs index b1f1ef2..a0e76c4 100644 --- a/src/app.rs +++ b/src/app.rs @@ -249,6 +249,12 @@ fn build_app() -> App<'static> { .help("Give a meaningful name to a command. This can be specified multiple times \ if several commands are benchmarked."), ) + .arg( + Arg::new("debug-mode") + .long("debug-mode") + .hide(true) + .help("Enable debug mode which does not actually run commands, but returns fake times when the command is 'sleep