Skip to content

Commit e4bb4ad

Browse files
committed
Linter fix - format touched files
1 parent 2b775a8 commit e4bb4ad

File tree

6 files changed

+49
-27
lines changed

6 files changed

+49
-27
lines changed

collector/src/bin/collector.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ use collector::artifact_stats::{
3535
use collector::codegen::{codegen_diff, CodegenType};
3636
use collector::compile::benchmark::category::Category;
3737
use collector::compile::benchmark::codegen_backend::CodegenBackend;
38-
use collector::compile::benchmark::target::Target;
3938
use collector::compile::benchmark::profile::Profile;
4039
use collector::compile::benchmark::scenario::Scenario;
40+
use collector::compile::benchmark::target::Target;
4141
use collector::compile::benchmark::{
4242
compile_benchmark_dir, get_compile_benchmarks, ArtifactType, Benchmark, BenchmarkName,
4343
};
@@ -202,7 +202,7 @@ fn profile_compile(
202202
scenarios: &[Scenario],
203203
backends: &[CodegenBackend],
204204
errors: &mut BenchmarkErrors,
205-
targets: &[Target]
205+
targets: &[Target],
206206
) {
207207
eprintln!("Profiling {} with {:?}", toolchain.id, profiler);
208208
if let Profiler::SelfProfile = profiler {

collector/src/compile/benchmark/mod.rs

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ impl Benchmark {
237237
backends: &[CodegenBackend],
238238
toolchain: &Toolchain,
239239
iterations: Option<usize>,
240-
targets: &[Target]
240+
targets: &[Target],
241241
) -> anyhow::Result<()> {
242242
if self.config.disabled {
243243
eprintln!("Skipping {}: disabled", self.name);
@@ -273,7 +273,10 @@ impl Benchmark {
273273
for backend in backends {
274274
for profile in &profiles {
275275
for target in targets {
276-
target_dirs.push(((*backend, *profile, *target), self.make_temp_dir(&self.path)?));
276+
target_dirs.push((
277+
(*backend, *profile, *target),
278+
self.make_temp_dir(&self.path)?,
279+
));
277280
}
278281
}
279282
}
@@ -317,10 +320,16 @@ impl Benchmark {
317320
let thread = s.spawn::<_, anyhow::Result<()>>(move || {
318321
wait_for_future(async move {
319322
let server = server.clone();
320-
self.mk_cargo_process(toolchain, prep_dir.path(), *profile, *backend, *target)
321-
.jobserver(server)
322-
.run_rustc(false)
323-
.await?;
323+
self.mk_cargo_process(
324+
toolchain,
325+
prep_dir.path(),
326+
*profile,
327+
*backend,
328+
*target,
329+
)
330+
.jobserver(server)
331+
.run_rustc(false)
332+
.await?;
324333
Ok::<(), anyhow::Error>(())
325334
})?;
326335
Ok(())

collector/src/compile/execute/bencher.rs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ impl<'a> BenchProcessor<'a> {
101101
};
102102

103103
let target = match target {
104-
Target::X86_64UnknownLinuxGnu => database::Target::X86_64UnknownLinuxGnu
104+
Target::X86_64UnknownLinuxGnu => database::Target::X86_64UnknownLinuxGnu,
105105
};
106106

107107
let mut buf = FuturesUnordered::new();
@@ -206,8 +206,15 @@ impl Processor for BenchProcessor<'_> {
206206
res.0.stats.retain(|key, _| key.starts_with("size:"));
207207
}
208208

209-
self.insert_stats(collection, scenario, profile, data.backend, data.target, res.0)
210-
.await;
209+
self.insert_stats(
210+
collection,
211+
scenario,
212+
profile,
213+
data.backend,
214+
data.target,
215+
res.0,
216+
)
217+
.await;
211218

212219
Ok(Retry::No)
213220
}

database/src/bin/postgres-to-sqlite.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,8 @@ impl Table for PstatSeries {
246246
}
247247

248248
fn postgres_select_statement(&self, _since_weeks_ago: Option<u32>) -> String {
249-
"select id, crate, profile, scenario, backend, target, metric from ".to_string() + self.name()
249+
"select id, crate, profile, scenario, backend, target, metric from ".to_string()
250+
+ self.name()
250251
}
251252

252253
fn sqlite_insert_statement(&self) -> &'static str {

database/src/pool.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
use crate::{ArtifactCollection, ArtifactId, ArtifactIdNumber, CodegenBackend, CompileBenchmark, Target};
1+
use crate::{
2+
ArtifactCollection, ArtifactId, ArtifactIdNumber, CodegenBackend, CompileBenchmark, Target,
3+
};
24
use crate::{CollectionId, Index, Profile, QueuedCommit, Scenario, Step};
35
use chrono::{DateTime, Utc};
46
use hashbrown::HashMap;

database/src/selector.rs

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ use std::{
2828
};
2929

3030
use crate::{
31-
interpolate::Interpolate, metric::Metric, ArtifactId, ArtifactIdIter, Benchmark, CodegenBackend, Connection, Index, Lookup, Profile, Scenario, Target
31+
interpolate::Interpolate, metric::Metric, ArtifactId, ArtifactIdIter, Benchmark,
32+
CodegenBackend, Connection, Index, Lookup, Profile, Scenario, Target,
3233
};
3334

3435
#[derive(Debug)]
@@ -260,19 +261,21 @@ impl BenchmarkQuery for CompileBenchmarkQuery {
260261
&& self.target.matches(target)
261262
&& self.metric.matches(metric)
262263
})
263-
.map(|(&(benchmark, profile, scenario, backend, target, metric), sid)| {
264-
(
265-
CompileTestCase {
266-
benchmark,
267-
profile,
268-
scenario,
269-
backend,
270-
target,
271-
},
272-
metric,
273-
sid,
274-
)
275-
})
264+
.map(
265+
|(&(benchmark, profile, scenario, backend, target, metric), sid)| {
266+
(
267+
CompileTestCase {
268+
benchmark,
269+
profile,
270+
scenario,
271+
backend,
272+
target,
273+
},
274+
metric,
275+
sid,
276+
)
277+
},
278+
)
276279
.collect();
277280

278281
statistic_descriptions.sort_unstable();

0 commit comments

Comments
 (0)