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;