From 2303cfc3dcc59f6aad1edaa672b4e7caa6ec3931 Mon Sep 17 00:00:00 2001 From: Lance Lui Date: Fri, 9 Aug 2024 18:20:58 +0000 Subject: [PATCH] missed changes: copy temp files instead of move, crate use formatting --- src/data/java_profile.rs | 2 +- src/data/perf_stat.rs | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/data/java_profile.rs b/src/data/java_profile.rs index 46ec0d08..f87ddecb 100644 --- a/src/data/java_profile.rs +++ b/src/data/java_profile.rs @@ -230,7 +230,7 @@ impl CollectData for JavaProfileRaw { key ); - fs::rename(tmp_loc.clone(), html_loc).ok(); + fs::copy(tmp_loc.clone(), html_loc).ok(); } let mut jps_map = File::create( diff --git a/src/data/perf_stat.rs b/src/data/perf_stat.rs index c97df662..bd90cc50 100644 --- a/src/data/perf_stat.rs +++ b/src/data/perf_stat.rs @@ -17,10 +17,12 @@ use std::sync::Mutex; use crate::data::grv_perf_events; #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] use { - crate::data::amd_genoa_perf_events::GENOA_CTRS, crate::data::amd_milan_perf_events::MILAN_CTRS, - crate::data::amd_perf_events, crate::data::intel_icelake_perf_events::ICX_CTRS, - crate::data::intel_perf_events, crate::data::intel_sapphire_rapids_perf_events::SPR_CTRS, - crate::data::utils::get_cpu_info, indexmap::IndexMap, + crate::data::{ + amd_genoa_perf_events::GENOA_CTRS, amd_milan_perf_events::MILAN_CTRS, amd_perf_events, + intel_icelake_perf_events::ICX_CTRS, intel_perf_events, + intel_sapphire_rapids_perf_events::SPR_CTRS, utils::get_cpu_info, + }, + indexmap::IndexMap, }; pub static PERF_STAT_FILE_NAME: &str = "perf_stat";