Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix IndexingStatistics-related tests #4040

Merged
merged 1 commit into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion quickwit/quickwit-indexing/src/actors/indexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1062,7 +1062,9 @@ mod tests {
.await
.unwrap();
universe.sleep(Duration::from_secs(3)).await;
let indexer_counters = indexer_handle.observe().await.state;
let mut indexer_counters = indexer_handle.observe().await.state;
indexer_counters.pipeline_metrics_opt = None;

assert_eq!(
indexer_counters,
IndexerCounters {
Expand Down
3 changes: 2 additions & 1 deletion quickwit/quickwit-indexing/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ use quickwit_cluster::Cluster;
use quickwit_common::pubsub::EventBroker;
use quickwit_config::NodeConfig;
use quickwit_ingest::{IngestApiService, IngesterPool};
use quickwit_proto::indexing::PipelineMetrics;
use quickwit_proto::metastore::MetastoreServiceClient;
use quickwit_storage::StorageResolver;
use tracing::info;
Expand Down Expand Up @@ -53,7 +54,7 @@ use self::merge_policy::MergePolicy;
pub use self::source::check_source_connectivity;

#[derive(utoipa::OpenApi)]
#[openapi(components(schemas(IndexingStatistics)))]
#[openapi(components(schemas(IndexingStatistics, PipelineMetrics)))]
/// Schema used for the OpenAPI generation which are apart of this crate.
pub struct IndexingApiSchemas;

Expand Down
2 changes: 1 addition & 1 deletion quickwit/quickwit-proto/src/indexing/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ impl TryFrom<&str> for IndexingTask {
}
}

#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, utoipa::ToSchema)]
pub struct PipelineMetrics {
pub cpu_thousandth: u16,
pub throughput_mb_per_sec: u16,
Expand Down