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";