From 5ade5e36df982c7dbf3c4d23e16f5b92da7f3e4e Mon Sep 17 00:00:00 2001 From: Oliver Date: Fri, 8 Aug 2025 23:39:44 -0600 Subject: [PATCH] closes #11 --- src/main.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main.rs b/src/main.rs index 11cb136..517d765 100644 --- a/src/main.rs +++ b/src/main.rs @@ -26,6 +26,11 @@ mod filesystem; mod parser; static METER: LazyLock = LazyLock::new(|| global::meter("Internet_Mapper")); +static BATCH_SIZE: LazyLock> = LazyLock::new(|| + METER + .u64_counter("crawler_batch_size") + .build() +); static BEING_PROCESSED: LazyLock> = LazyLock::new(|| METER .i64_up_down_counter("crawler_pages_being_processed") @@ -96,6 +101,8 @@ async fn main() { global::set_tracer_provider(load_tracing(&CONFIG)); global::set_meter_provider(load_metrics(&CONFIG)); + BATCH_SIZE.add(CONFIG.batch_size as u64, &[]); + // When getting uncrawled pages, name must contain this variable. "" will effectively get ignored. // let crawl_filter = "en.wikipedia.org/"; // let budget = 50;