summaryrefslogtreecommitdiff
path: root/graph-checker/src
diff options
context:
space:
mode:
Diffstat (limited to 'graph-checker/src')
-rw-r--r--graph-checker/src/main.rs11
1 files changed, 10 insertions, 1 deletions
diff --git a/graph-checker/src/main.rs b/graph-checker/src/main.rs
index 215b69e..2f3de7a 100644
--- a/graph-checker/src/main.rs
+++ b/graph-checker/src/main.rs
@@ -28,9 +28,12 @@ async fn main() -> Result<(), sqlx::Error> {
let start = Instant::now();
+ println!("Started");
const BATCH_SIZE: usize = 10000;
+ let mut count = 0;
loop {
let graphs = gi.take(BATCH_SIZE);
+ let batch = Instant::now();
let tasks: Vec<_> = graphs
.map(|g| {
let db = db.clone();
@@ -46,7 +49,13 @@ async fn main() -> Result<(), sqlx::Error> {
})
.collect();
let part = futures::future::join_all(tasks).await;
- if part.len() < BATCH_SIZE {
+ let sz = part.len();
+ count += sz;
+ println!(
+ "Counted {count} in {}s",
+ batch.elapsed().as_nanos() as f64 / 1e9
+ );
+ if sz < BATCH_SIZE {
break;
}
}