Skip to content

Commit 473a756

Browse files
authored
Merge pull request #1648 from Kobzol/log-db
Log database connection string used in `collector`
2 parents 7d9262a + c84839b commit 473a756

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

collector/src/bin/collector.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,7 @@ fn main_result() -> anyhow::Result<i32> {
624624
db,
625625
no_isolate,
626626
} => {
627+
log_db(&db);
627628
let toolchain = get_local_toolchain(
628629
&[Profile::Opt],
629630
&local.rustc,
@@ -668,6 +669,7 @@ fn main_result() -> anyhow::Result<i32> {
668669
iterations,
669670
self_profile,
670671
} => {
672+
log_db(&db);
671673
let profiles = opts.profiles.0;
672674
let scenarios = opts.scenarios.0;
673675

@@ -716,6 +718,7 @@ fn main_result() -> anyhow::Result<i32> {
716718
bench_rustc,
717719
self_profile,
718720
} => {
721+
log_db(&db);
719722
println!("processing artifacts");
720723
let client = reqwest::blocking::Client::new();
721724
let response: collector::api::next_artifact::Response = client
@@ -793,6 +796,7 @@ fn main_result() -> anyhow::Result<i32> {
793796
}
794797

795798
Commands::BenchPublished { toolchain, db } => {
799+
log_db(&db);
796800
let pool = database::Pool::open(&db.db);
797801
let conn = rt.block_on(pool.connection());
798802
let toolchain = create_toolchain_from_published_version(&toolchain, &target_triple)?;
@@ -942,6 +946,10 @@ fn main_result() -> anyhow::Result<i32> {
942946
}
943947
}
944948

949+
fn log_db(db_option: &DbOption) {
950+
println!("Using database `{}`", db_option.db);
951+
}
952+
945953
/// Record a collection entry into the database, specifying which benchmark steps will be executed.
946954
async fn init_collection(
947955
connection: &mut dyn Connection,

0 commit comments

Comments
 (0)