diff options
Diffstat (limited to 'cli/bench/main.rs')
-rw-r--r-- | cli/bench/main.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cli/bench/main.rs b/cli/bench/main.rs index 3e7cc61fc..e4cbf3eda 100644 --- a/cli/bench/main.rs +++ b/cli/bench/main.rs @@ -162,7 +162,7 @@ const RESULT_KEYS: &[&str] = fn run_exec_time( deno_exe: &Path, target_dir: &Path, -) -> Result<HashMap<String, HashMap<String, i64>>> { +) -> Result<HashMap<String, HashMap<String, f64>>> { let hyperfine_exe = test_util::prebuilt_tool_path("hyperfine"); let benchmark_file = target_dir.join("hyperfine_results.json"); @@ -203,7 +203,7 @@ fn run_exec_time( true, ); - let mut results = HashMap::<String, HashMap<String, i64>>::new(); + let mut results = HashMap::<String, HashMap<String, f64>>::new(); let hyperfine_results = read_json(benchmark_file)?; for ((name, _, _), data) in EXEC_TIME_BENCHMARKS.iter().zip( hyperfine_results @@ -220,7 +220,7 @@ fn run_exec_time( data .into_iter() .filter(|(key, _)| RESULT_KEYS.contains(&key.as_str())) - .map(|(key, val)| (key, val.as_f64().unwrap() as i64)) + .map(|(key, val)| (key, val.as_f64().unwrap())) .collect(), ); } @@ -382,11 +382,11 @@ struct BenchResult { // TODO(ry) The "benchmark" benchmark should actually be called "exec_time". // When this is changed, the historical data in gh-pages branch needs to be // changed too. - benchmark: HashMap<String, HashMap<String, i64>>, + benchmark: HashMap<String, HashMap<String, f64>>, binary_size: HashMap<String, i64>, bundle_size: HashMap<String, i64>, cargo_deps: usize, - max_latency: HashMap<String, i64>, + max_latency: HashMap<String, f64>, max_memory: HashMap<String, i64>, lsp_exec_time: HashMap<String, i64>, req_per_sec: HashMap<String, i64>, @@ -489,7 +489,7 @@ async fn main() -> Result<()> { new_data.req_per_sec = req_per_sec; let max_latency = stats .iter() - .map(|(name, result)| (name.clone(), result.latency as i64)) + .map(|(name, result)| (name.clone(), result.latency)) .collect(); reporter.write("max_latency", &max_latency); |