diff options
7 files changed, 76 insertions, 0 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/metrics/CMakeLists.txt b/searchcore/src/vespa/searchcore/proton/metrics/CMakeLists.txt index 43e01420a22..ba6e5fd1ea5 100644 --- a/searchcore/src/vespa/searchcore/proton/metrics/CMakeLists.txt +++ b/searchcore/src/vespa/searchcore/proton/metrics/CMakeLists.txt @@ -5,6 +5,8 @@ vespa_add_library(searchcore_proton_metrics STATIC content_proton_metrics.cpp documentdb_job_trackers.cpp documentdb_tagged_metrics.cpp + document_db_commit_metrics.cpp + document_db_feeding_metrics.cpp executor_metrics.cpp executor_threading_service_metrics.cpp executor_threading_service_stats.cpp diff --git a/searchcore/src/vespa/searchcore/proton/metrics/document_db_commit_metrics.cpp b/searchcore/src/vespa/searchcore/proton/metrics/document_db_commit_metrics.cpp new file mode 100644 index 00000000000..a43b0a5f144 --- /dev/null +++ b/searchcore/src/vespa/searchcore/proton/metrics/document_db_commit_metrics.cpp @@ -0,0 +1,16 @@ +// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. + +#include "document_db_commit_metrics.h" + +namespace proton { + +DocumentDBCommitMetrics::DocumentDBCommitMetrics(metrics::MetricSet* parent) + : MetricSet("commit", {}, "commit metrics for feeding in a document database", parent), + operations("operations", {}, "Operations for commit", this), + latency("latency", {}, "Latency for commit", this) +{ +} + +DocumentDBCommitMetrics::~DocumentDBCommitMetrics() = default; + +} diff --git a/searchcore/src/vespa/searchcore/proton/metrics/document_db_commit_metrics.h b/searchcore/src/vespa/searchcore/proton/metrics/document_db_commit_metrics.h new file mode 100644 index 00000000000..45c826a7ccf --- /dev/null +++ b/searchcore/src/vespa/searchcore/proton/metrics/document_db_commit_metrics.h @@ -0,0 +1,21 @@ +// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +#pragma once + +#include <vespa/metrics/metricset.h> +#include <vespa/metrics/valuemetric.h> + +namespace proton { + +/* + * Metrics for commits during feeding within a document db. + */ +struct DocumentDBCommitMetrics : metrics::MetricSet +{ + metrics::DoubleAverageMetric operations; + metrics::DoubleAverageMetric latency; + + DocumentDBCommitMetrics(metrics::MetricSet* parent); + ~DocumentDBCommitMetrics() override; +}; + +} diff --git a/searchcore/src/vespa/searchcore/proton/metrics/document_db_feeding_metrics.cpp b/searchcore/src/vespa/searchcore/proton/metrics/document_db_feeding_metrics.cpp new file mode 100644 index 00000000000..0c7f8f6f039 --- /dev/null +++ b/searchcore/src/vespa/searchcore/proton/metrics/document_db_feeding_metrics.cpp @@ -0,0 +1,15 @@ +// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. + +#include "document_db_feeding_metrics.h" + +namespace proton { + +DocumentDBFeedingMetrics::DocumentDBFeedingMetrics(metrics::MetricSet* parent) + : MetricSet("feeding", {}, "feeding metrics in a document database", parent), + commit(this) +{ +} + +DocumentDBFeedingMetrics::~DocumentDBFeedingMetrics() = default; + +} diff --git a/searchcore/src/vespa/searchcore/proton/metrics/document_db_feeding_metrics.h b/searchcore/src/vespa/searchcore/proton/metrics/document_db_feeding_metrics.h new file mode 100644 index 00000000000..7353cfbdc04 --- /dev/null +++ b/searchcore/src/vespa/searchcore/proton/metrics/document_db_feeding_metrics.h @@ -0,0 +1,19 @@ +// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +#pragma once + +#include "document_db_commit_metrics.h" + +namespace proton { + +/* + * Metrics for feeding within a document db. + */ +struct DocumentDBFeedingMetrics : metrics::MetricSet +{ + DocumentDBCommitMetrics commit; + + DocumentDBFeedingMetrics(metrics::MetricSet* parent); + ~DocumentDBFeedingMetrics() override; +}; + +} diff --git a/searchcore/src/vespa/searchcore/proton/metrics/documentdb_tagged_metrics.cpp b/searchcore/src/vespa/searchcore/proton/metrics/documentdb_tagged_metrics.cpp index 1d947bb003a..e895a03b190 100644 --- a/searchcore/src/vespa/searchcore/proton/metrics/documentdb_tagged_metrics.cpp +++ b/searchcore/src/vespa/searchcore/proton/metrics/documentdb_tagged_metrics.cpp @@ -268,6 +268,7 @@ DocumentDBTaggedMetrics::DocumentDBTaggedMetrics(const vespalib::string &docType sessionCache(this), documents(this), bucketMove(this), + feeding(this), totalMemoryUsage(this), totalDiskUsage("disk_usage", {}, "The total disk usage (in bytes) for this document db", this), heart_beat_age("heart_beat_age", {}, "How long ago (in seconds) heart beat maintenace job was run", this), diff --git a/searchcore/src/vespa/searchcore/proton/metrics/documentdb_tagged_metrics.h b/searchcore/src/vespa/searchcore/proton/metrics/documentdb_tagged_metrics.h index bdedfeea8b9..c9d321d6752 100644 --- a/searchcore/src/vespa/searchcore/proton/metrics/documentdb_tagged_metrics.h +++ b/searchcore/src/vespa/searchcore/proton/metrics/documentdb_tagged_metrics.h @@ -5,6 +5,7 @@ #include "memory_usage_metrics.h" #include "executor_threading_service_metrics.h" #include "sessionmanager_metrics.h" +#include "document_db_feeding_metrics.h" #include <vespa/metrics/metricset.h> #include <vespa/metrics/valuemetric.h> #include <vespa/searchcore/proton/matching/matching_stats.h> @@ -202,6 +203,7 @@ struct DocumentDBTaggedMetrics : metrics::MetricSet SessionCacheMetrics sessionCache; DocumentsMetrics documents; BucketMoveMetrics bucketMove; + DocumentDBFeedingMetrics feeding; MemoryUsageMetrics totalMemoryUsage; metrics::LongValueMetric totalDiskUsage; metrics::DoubleValueMetric heart_beat_age; |