main.rs
This file
Path
src/main.rs
61 lines · 1.4 KiB · Rust
Last changed by
SortOrder fieldDavid Peterbefore adoption038f369
History of this fileTake it
The walk stopped after 200 commits: lines older than 6c0ec31 point at it.
Fix user and kernel times on WindowsClemens Wasserbefore adoptionac8c114
lines 1–5why, one step back1#![cfg_attr(2 all(windows, feature = "windows_process_extensions_main_thread_handle"),3 feature(windows_process_extensions_main_thread_handle)4)]5Update deb package version on READMENickolas A Peresbefore adoption6c0ec31
lines 6–34why, one step back6use std::env;78use benchmark::scheduler::Scheduler;9use cli::get_cli_arguments;10use command::Commands;11use export::ExportManager;12use options::Options;1314use anyhow::Result;15use colored::*;1617pub mod benchmark;18pub mod cli;19pub mod command;20pub mod error;21pub mod export;22pub mod options;23pub mod outlier_detection;24pub mod output;25pub mod parameter;26pub mod timer;27pub mod util;2829fn run() -> Result<()> {30 // Enabled ANSI colors on Windows 1031 #[cfg(windows)]32 colored::control::set_virtual_terminal(true).unwrap();3334 let cli_arguments = get_cli_arguments(env::args_os());Multiple output policiesDavid Peterbefore adoption99d24b7
line 35why, one step back35 let mut options = Options::from_cli_arguments(&cli_arguments)?;Update deb package version on READMENickolas A Peresbefore adoption6c0ec31
line 36why, one step back36 let commands = Commands::from_cli_arguments(&cli_arguments)?;SortOrder fieldDavid Peterbefore adoption038f369
lines 37–41why, one step back37 let export_manager = ExportManager::from_cli_arguments(38 &cli_arguments,39 options.time_unit,40 options.sort_order_exports,41 )?;Update deb package version on READMENickolas A Peresbefore adoption6c0ec31
lines 42–47why, one step back4243 options.validate_against_command_list(&commands)?;4445 let mut scheduler = Scheduler::new(&commands, &options, &export_manager);46 scheduler.run_benchmarks()?;47 scheduler.print_relative_speed_comparison();Do not export intermediate results to stdout, closes #640David Peterbefore adoption2793d7b
line 48why, one step back48 scheduler.final_export()?;Update deb package version on READMENickolas A Peresbefore adoption6c0ec31
lines 49–61why, one step back4950 Ok(())51}5253fn main() {54 match run() {55 Ok(_) => {}56 Err(e) => {57 eprintln!("{} {:#}", "Error:".red(), e);58 std::process::exit(1);59 }60 }61}