Skip to content

Commit 572ad78

Browse files
committed
Log how long it takes to load the benchmark index
1 parent 22751b0 commit 572ad78

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

site/src/job_queue/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ use database::{
1616
};
1717
use parking_lot::RwLock;
1818
use std::sync::Arc;
19+
use std::time::Instant;
1920
use tokio::time::{self, Duration, MissedTickBehavior};
2021

2122
/// Store the latest master commits or do nothing if all of them are
@@ -459,10 +460,15 @@ async fn perform_queue_tick(ctxt: &SiteCtxt) -> anyhow::Result<()> {
459460
return Ok(());
460461
}
461462

463+
let start = Instant::now();
462464
let index = conn
463465
.load_benchmark_request_index()
464466
.await
465467
.context("Failed to load benchmark request index")?;
468+
log::info!(
469+
"Loading the benchmark request index took {}s",
470+
start.elapsed().as_secs_f64()
471+
);
466472

467473
// Put the master commits into the `benchmark_requests` queue
468474
if let Err(error) = create_benchmark_request_master_commits(ctxt, &*conn, &index).await {

0 commit comments

Comments
 (0)