mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
Run cargo clippy --fix and cargo fmt
This commit is contained in:
parent
22e151d0f0
commit
5401eaf85f
28 changed files with 94 additions and 107 deletions
|
|
@ -27,17 +27,11 @@ impl TaskSetCpuList {
|
|||
let indicator = self.0.iter().map(|indicator| match indicator {
|
||||
TaskSetCpuIndicator::Single(i) => i.to_string(),
|
||||
TaskSetCpuIndicator::Range(range) => {
|
||||
format!(
|
||||
"{}-{}",
|
||||
range.start,
|
||||
range.clone().into_iter().last().unwrap()
|
||||
)
|
||||
format!("{}-{}", range.start, range.clone().last().unwrap())
|
||||
}
|
||||
});
|
||||
|
||||
Itertools::intersperse_with(indicator, || ",".to_string())
|
||||
.into_iter()
|
||||
.collect()
|
||||
Itertools::intersperse_with(indicator, || ",".to_string()).collect()
|
||||
}
|
||||
|
||||
pub fn new(
|
||||
|
|
@ -163,7 +157,7 @@ pub fn simple_load_test_runs(
|
|||
workers: &[(usize, Priority)],
|
||||
) -> Vec<(usize, Priority, TaskSetCpuList)> {
|
||||
workers
|
||||
.into_iter()
|
||||
.iter()
|
||||
.copied()
|
||||
.map(|(workers, priority)| {
|
||||
(
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ pub fn html_all_runs(all_results: &[TrackerCoreCountResults]) -> String {
|
|||
load_test_key_names = load_test_key_names.iter()
|
||||
.map(|name| format!("<th>Load test {}</th>", name))
|
||||
.join("\n"),
|
||||
body = results.into_iter().map(|r| {
|
||||
body = results.iter_mut().map(|r| {
|
||||
formatdoc! {
|
||||
"
|
||||
<tr>
|
||||
|
|
|
|||
|
|
@ -59,9 +59,7 @@ impl<C> RunConfig<C> {
|
|||
.run(command, &self.tracker_vcpus, &mut tracker_config_file)
|
||||
{
|
||||
Ok(handle) => ChildWrapper(handle),
|
||||
Err(err) => {
|
||||
return Err(RunErrorResults::new(self).set_error(err.into(), "run tracker"))
|
||||
}
|
||||
Err(err) => return Err(RunErrorResults::new(self).set_error(err, "run tracker")),
|
||||
};
|
||||
|
||||
::std::thread::sleep(Duration::from_secs(1));
|
||||
|
|
@ -74,7 +72,7 @@ impl<C> RunConfig<C> {
|
|||
Ok(handle) => ChildWrapper(handle),
|
||||
Err(err) => {
|
||||
return Err(RunErrorResults::new(self)
|
||||
.set_error(err.into(), "run load test")
|
||||
.set_error(err, "run load test")
|
||||
.set_tracker_outputs(tracker))
|
||||
}
|
||||
};
|
||||
|
|
@ -328,7 +326,7 @@ impl FromStr for ProcessStats {
|
|||
type Err = ();
|
||||
|
||||
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
||||
let mut parts = s.trim().split_whitespace();
|
||||
let mut parts = s.split_whitespace();
|
||||
|
||||
let avg_cpu_utilization = parts.next().ok_or(())?.parse().map_err(|_| ())?;
|
||||
let peak_rss_kb: f32 = parts.next().ok_or(())?.parse().map_err(|_| ())?;
|
||||
|
|
|
|||
|
|
@ -73,13 +73,13 @@ pub fn run_sets<C, F, I>(
|
|||
(minutes / 60, minutes % 60)
|
||||
};
|
||||
|
||||
println!("");
|
||||
println!();
|
||||
println!("Total number of load test runs: {}", total_num_runs);
|
||||
println!(
|
||||
"Estimated duration: {} hours, {} minutes",
|
||||
estimated_hours, estimated_minutes
|
||||
);
|
||||
println!("");
|
||||
println!();
|
||||
|
||||
let results = set_configs
|
||||
.into_iter()
|
||||
|
|
@ -115,7 +115,7 @@ pub fn run_sets<C, F, I>(
|
|||
&load_test_gen,
|
||||
load_test_parameters,
|
||||
implementation,
|
||||
&tracker_run,
|
||||
tracker_run,
|
||||
tracker_vcpus.clone(),
|
||||
load_test_vcpus,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue