From 9db48d9c24fcdd7a807aacfe67cd34455c945555 Mon Sep 17 00:00:00 2001 From: Justin Worthe Date: Sat, 30 Jun 2018 15:38:45 +0200 Subject: Updated benchmark to only take constant map size into account --- src/bin/perf-test.rs | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'src/bin/perf-test.rs') diff --git a/src/bin/perf-test.rs b/src/bin/perf-test.rs index 71044ad..054258f 100644 --- a/src/bin/perf-test.rs +++ b/src/bin/perf-test.rs @@ -5,17 +5,10 @@ use time::{PreciseTime, Duration}; use zombot::*; const STATE_PATH: &str = "tests/state0.json"; -const STATE_BIG_PATH: &str = "tests/bigstate.json"; use std::process; fn main() { - normal_state(); - big_state(); -} - -fn normal_state() { - println!("Normal size state file"); let start_time = PreciseTime::now(); let (settings, state) = match input::json::read_state_from_file(STATE_PATH) { Ok(ok) => ok, @@ -27,17 +20,3 @@ fn normal_state() { let max_time = Duration::milliseconds(1950); strategy::monte_carlo::choose_move(&settings, &state, &start_time, max_time); } - -fn big_state() { - println!("Big state file"); - let start_time = PreciseTime::now(); - let (settings, state) = match input::json::read_state_from_file(STATE_BIG_PATH) { - Ok(ok) => ok, - Err(error) => { - println!("Error while parsing JSON file: {}", error); - process::exit(1); - } - }; - let max_time = Duration::milliseconds(1950); - strategy::monte_carlo::choose_move(&settings, &state, &start_time, max_time); -} -- cgit v1.2.3