Skip to content

Commit 9325421

Browse files
committed
fixes from rebase
1 parent d48d3bd commit 9325421

File tree

3 files changed

+15
-18
lines changed

3 files changed

+15
-18
lines changed

database/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1159,7 +1159,7 @@ impl BenchmarkJob {
11591159
self.deque_counter
11601160
}
11611161

1162-
pub fn status(&self) -> BenchmarkJobStatus {
1162+
pub fn status(&self) -> &BenchmarkJobStatus {
11631163
&self.status
11641164
}
11651165
}

database/src/pool.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -996,7 +996,7 @@ mod tests {
996996
let collector_name = "collector-1";
997997
let target = Target::X86_64UnknownLinuxGnu;
998998

999-
db.add_collector_config(collector_name, &target, benchmark_set.0, true)
999+
db.add_collector_config(collector_name, target, benchmark_set.0, true)
10001000
.await
10011001
.unwrap();
10021002

@@ -1005,7 +1005,7 @@ mod tests {
10051005
.await
10061006
.unwrap();
10071007

1008-
complete_request(&*db, tag, collector_name, benchmark_set.0, &target).await;
1008+
complete_request(&*db, tag, collector_name, benchmark_set.0, target).await;
10091009
// record a couple of errors against the tag
10101010
let artifact_id = db.artifact_id(&ArtifactId::Tag(tag.to_string())).await;
10111011

@@ -1021,18 +1021,18 @@ mod tests {
10211021

10221022
db.enqueue_benchmark_job(
10231023
benchmark_request_two.tag().unwrap(),
1024-
&target,
1025-
&CodegenBackend::Llvm,
1026-
&Profile::Opt,
1024+
target,
1025+
CodegenBackend::Llvm,
1026+
Profile::Opt,
10271027
benchmark_set.0,
10281028
)
10291029
.await
10301030
.unwrap();
10311031
db.enqueue_benchmark_job(
10321032
benchmark_request_two.tag().unwrap(),
1033-
&target,
1034-
&CodegenBackend::Llvm,
1035-
&Profile::Debug,
1033+
target,
1034+
CodegenBackend::Llvm,
1035+
Profile::Debug,
10361036
benchmark_set.0,
10371037
)
10381038
.await
@@ -1092,7 +1092,7 @@ mod tests {
10921092
));
10931093
assert_eq!(
10941094
status_page_data.in_progress[0].1[0].benchmark_set(),
1095-
&benchmark_set
1095+
benchmark_set
10961096
);
10971097

10981098
// test the second job
@@ -1114,7 +1114,7 @@ mod tests {
11141114
));
11151115
assert_eq!(
11161116
status_page_data.in_progress[0].1[1].benchmark_set(),
1117-
&benchmark_set
1117+
benchmark_set
11181118
);
11191119

11201120
Ok(ctx)

database/src/pool/postgres.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2091,17 +2091,15 @@ where
20912091
row_to_benchmark_request(it),
20922092
// Duration being a string feels odd, but we don't need to
20932093
// perform any computations on it
2094-
it.get::<_, String>(9),
2094+
it.get::<_, String>(10),
20952095
// The errors, if there are none this will be an empty vector
2096-
it.get::<_, Vec<String>>(10),
2096+
it.get::<_, Vec<String>>(11),
20972097
)
20982098
})
20992099
.collect();
21002100

2101-
let in_progress_tags: Vec<&str> = in_progress_requests
2102-
.iter()
2103-
.map(|it| it.tag().unwrap())
2104-
.collect();
2101+
let in_progress_tags: Vec<&str> =
2102+
in_progress.iter().map(|it| it.0.tag().unwrap()).collect();
21052103

21062104
let in_progress_tags: String = in_progress_tags.join(",");
21072105

@@ -2168,7 +2166,6 @@ where
21682166
in_progress_jobs.push(job);
21692167
}
21702168

2171-
21722169
Ok(PartialStatusPageData {
21732170
completed_requests,
21742171
in_progress,

0 commit comments

Comments
 (0)