Skip to content
This repository has been archived by the owner on Aug 26, 2023. It is now read-only.

Commit

Permalink
Log execution time
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukas Wagner committed Apr 5, 2022
1 parent 87a6f09 commit d92a95f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use crate::cliarguments::{CLIArguments, CLICommand};
use colored::*;
use log::*;
use reporter::{cli::CLIReporter, html::HTMLReporter, Reporter};
use std::path::Path;
use std::{path::Path, time::Instant};

use crate::{
config::Config, executor::Executor, mutation::MutationEngine, policy::MutationPolicy,
Expand Down Expand Up @@ -96,6 +96,8 @@ fn mutate(
report_type: &Output,
output_directory: &str,
) -> Result<()> {
let start = Instant::now();

let module = WasmModule::from_file(wasmfile)?;
let mutator = MutationEngine::new(config)?;
let mutations = mutator.discover_mutation_positions(&module)?;
Expand All @@ -116,6 +118,9 @@ fn mutate(
}
}

let duration = start.elapsed();
log::info!("Execution time {:?}s", duration.as_secs());

Ok(())
}

Expand Down

0 comments on commit d92a95f

Please sign in to comment.