From 5c9e8ed3f6076154f8512b01edbfd6d39d8c3da6 Mon Sep 17 00:00:00 2001 From: Giems <109511301+Giems@users.noreply.github.com> Date: Tue, 9 Jul 2024 09:01:34 +0200 Subject: [PATCH] remove metrics from IndexerExecutor --- crates/sui-bridge-indexer/src/main.rs | 2 +- crates/sui-data-ingestion-core/src/executor.rs | 14 ++++++++------ crates/sui-data-ingestion-core/src/tests.rs | 2 +- crates/sui-data-ingestion/src/main.rs | 15 ++++++++------- crates/sui-indexer/src/indexer.rs | 2 +- crates/suins-indexer/src/main.rs | 9 +++++---- 6 files changed, 24 insertions(+), 20 deletions(-) diff --git a/crates/sui-bridge-indexer/src/main.rs b/crates/sui-bridge-indexer/src/main.rs index b536ce16796b2..c4f3059394a7d 100644 --- a/crates/sui-bridge-indexer/src/main.rs +++ b/crates/sui-bridge-indexer/src/main.rs @@ -92,7 +92,7 @@ async fn start_processing_sui_checkpoints( let mut executor = IndexerExecutor::new( progress_store, 1, /* workflow types */ - ingestion_metrics, + // ingestion_metrics, ); let indexer_metrics_cloned = indexer_meterics.clone(); diff --git a/crates/sui-data-ingestion-core/src/executor.rs b/crates/sui-data-ingestion-core/src/executor.rs index 92bfda006852a..4ad9cde1213ec 100644 --- a/crates/sui-data-ingestion-core/src/executor.rs +++ b/crates/sui-data-ingestion-core/src/executor.rs @@ -27,11 +27,12 @@ pub struct IndexerExecutor
{ progress_store: ProgressStoreWrapper
,
pool_progress_sender: mpsc::Sender<(String, CheckpointSequenceNumber)>,
pool_progress_receiver: mpsc::Receiver<(String, CheckpointSequenceNumber)>,
- metrics: DataIngestionMetrics,
+ // metrics: DataIngestionMetrics,
}
impl {
- pub fn new(progress_store: P, number_of_jobs: usize, metrics: DataIngestionMetrics) -> Self {
+ // pub fn new(progress_store: P, number_of_jobs: usize, metrics: DataIngestionMetrics) -> Self {
+ pub fn new(progress_store: P, number_of_jobs: usize) -> Self {
let (pool_progress_sender, pool_progress_receiver) =
mpsc::channel(number_of_jobs * MAX_CHECKPOINTS_IN_PROGRESS);
Self {
@@ -40,7 +41,7 @@ impl {
progress_store: ProgressStoreWrapper::new(progress_store),
pool_progress_sender,
pool_progress_receiver,
- metrics,
+ // metrics,
}
}
@@ -90,7 +91,7 @@ impl {
gc_sender.send(seq_number).await?;
reader_checkpoint_number = seq_number;
}
- self.metrics.data_ingestion_checkpoint.with_label_values(&[&task_name]).set(sequence_number as i64);
+ // self.metrics.data_ingestion_checkpoint.with_label_values(&[&task_name]).set(sequence_number as i64);
}
Some(checkpoint) = checkpoint_recv.recv() => {
for sender in &self.pool_senders {
@@ -114,9 +115,10 @@ pub async fn setup_single_workflow(store, metrics, primary_watermark, cancel.clone()).await?;
diff --git a/crates/suins-indexer/src/main.rs b/crates/suins-indexer/src/main.rs
index 16aa4937a4e3c..53044b9a8417d 100644
--- a/crates/suins-indexer/src/main.rs
+++ b/crates/suins-indexer/src/main.rs
@@ -132,10 +132,11 @@ async fn main() -> Result<()> {
let (_exit_sender, exit_receiver) = oneshot::channel();
let progress_store = FileProgressStore::new(PathBuf::from(backfill_progress_file_path));
- let registry: Registry = start_basic_prometheus_server();
- mysten_metrics::init_metrics(®istry);
- let metrics = DataIngestionMetrics::new(®istry);
- let mut executor = IndexerExecutor::new(progress_store, 1, metrics);
+ // let registry: Registry = start_basic_prometheus_server();
+ // mysten_metrics::init_metrics(®istry);
+ // let metrics = DataIngestionMetrics::new(®istry);
+ // let mut executor = IndexerExecutor::new(progress_store, 1, metrics);
+ let mut executor = IndexerExecutor::new(progress_store, 1);
let indexer_setup =
if let (Some(registry_id), Some(subdomain_wrapper_type), Some(name_record_type)) =