summaryrefslogtreecommitdiff
path: root/src/bin/perf-test.rs
diff options
context:
space:
mode:
authorJustin Worthe <justin@worthe-it.co.za>2018-06-30 15:38:45 +0200
committerJustin Worthe <justin@worthe-it.co.za>2018-06-30 15:38:45 +0200
commit9db48d9c24fcdd7a807aacfe67cd34455c945555 (patch)
tree0c93d8acbd9267773007cd0cbe2fe17359de4b94 /src/bin/perf-test.rs
parent28af1786f35801c375a870b9bfbbfe3640aa872d (diff)
Updated benchmark to only take constant map size into account
Diffstat (limited to 'src/bin/perf-test.rs')
-rw-r--r--src/bin/perf-test.rs21
1 files changed, 0 insertions, 21 deletions
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);
-}