summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArne Juul <arnej@yahoo-inc.com>2018-10-05 12:58:32 +0000
committerArne Juul <arnej@yahoo-inc.com>2018-10-08 13:08:51 +0000
commitb42a5ef01b030c673e9cfb0c32cbde9b459098fc (patch)
treee2f9fcc5041d60f7095dc0da69272bd540714f64
parent3f8389d884735643878dac7b88d3e8c13ea43ea8 (diff)
remove legacy tags, always pass vector
-rw-r--r--metrics/src/tests/countmetrictest.cpp4
-rw-r--r--metrics/src/tests/loadmetrictest.cpp10
-rw-r--r--metrics/src/tests/metric_timer_test.cpp2
-rw-r--r--metrics/src/tests/metricmanagertest.cpp43
-rw-r--r--metrics/src/tests/metricsettest.cpp24
-rw-r--r--metrics/src/tests/metrictest.cpp2
-rw-r--r--metrics/src/tests/snapshottest.cpp34
-rw-r--r--metrics/src/tests/stresstest.cpp16
-rw-r--r--metrics/src/tests/summetrictest.cpp48
-rw-r--r--metrics/src/tests/valuemetrictest.cpp18
-rw-r--r--metrics/src/vespa/metrics/countmetric.h9
-rw-r--r--metrics/src/vespa/metrics/countmetric.hpp9
-rw-r--r--metrics/src/vespa/metrics/loadmetric.hpp8
-rw-r--r--metrics/src/vespa/metrics/metric.cpp30
-rw-r--r--metrics/src/vespa/metrics/metric.h6
-rw-r--r--metrics/src/vespa/metrics/metricmanager.cpp12
-rw-r--r--metrics/src/vespa/metrics/metricset.cpp8
-rw-r--r--metrics/src/vespa/metrics/metricset.h3
-rw-r--r--metrics/src/vespa/metrics/metricsnapshot.cpp2
-rw-r--r--metrics/src/vespa/metrics/summetric.h2
-rw-r--r--metrics/src/vespa/metrics/summetric.hpp2
-rw-r--r--metrics/src/vespa/metrics/valuemetric.h7
-rw-r--r--metrics/src/vespa/metrics/valuemetric.hpp10
-rw-r--r--persistence/src/vespa/persistence/spi/metricpersistenceprovider.cpp17
-rw-r--r--searchcore/src/tests/proton/metrics/metrics_engine/metrics_engine_test.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/metrics/content_proton_metrics.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/metrics/documentdb_tagged_metrics.cpp132
-rw-r--r--searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.cpp8
-rw-r--r--searchcore/src/vespa/searchcore/proton/metrics/executor_threading_service_metrics.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/metrics/legacy_attribute_metrics.cpp14
-rw-r--r--searchcore/src/vespa/searchcore/proton/metrics/legacy_documentdb_metrics.cpp92
-rw-r--r--searchcore/src/vespa/searchcore/proton/metrics/legacy_proton_metrics.cpp22
-rw-r--r--searchcore/src/vespa/searchcore/proton/metrics/legacy_sessionmanager_metrics.cpp12
-rw-r--r--searchcore/src/vespa/searchcore/proton/metrics/memory_usage_metrics.cpp10
-rw-r--r--searchcore/src/vespa/searchcore/proton/metrics/resource_usage_metrics.cpp16
-rw-r--r--searchcore/src/vespa/searchcore/proton/metrics/sessionmanager_metrics.cpp12
-rw-r--r--searchcore/src/vespa/searchcore/proton/metrics/trans_log_server_metrics.cpp6
-rw-r--r--searchcore/src/vespa/searchcore/proton/summaryengine/summaryengine.cpp8
-rw-r--r--searchlib/src/vespa/searchlib/engine/transport_metrics.cpp16
-rw-r--r--storage/src/tests/common/metricstest.cpp2
-rw-r--r--storage/src/tests/storageserver/statereportertest.cpp2
-rw-r--r--storage/src/vespa/storage/bucketdb/bucketmanagermetrics.cpp22
-rw-r--r--storage/src/vespa/storage/bucketdb/storagebucketdbinitializer.cpp18
-rw-r--r--storage/src/vespa/storage/distributor/distributormetricsset.cpp12
-rw-r--r--storage/src/vespa/storage/distributor/idealstatemetricsset.cpp55
-rw-r--r--storage/src/vespa/storage/distributor/idealstatemetricsset.h2
-rw-r--r--storage/src/vespa/storage/distributor/persistence_operation_metric_set.cpp30
-rw-r--r--storage/src/vespa/storage/distributor/visitormetricsset.cpp6
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/filestormetrics.cpp77
-rw-r--r--storage/src/vespa/storage/storageserver/bouncer_metrics.cpp6
-rw-r--r--storage/src/vespa/storage/storageserver/changedbucketownershiphandler.cpp8
-rw-r--r--storage/src/vespa/storage/storageserver/communicationmanagermetrics.cpp18
-rw-r--r--storage/src/vespa/storage/storageserver/mergethrottler.cpp32
-rw-r--r--storage/src/vespa/storage/storageserver/storagemetricsset.cpp32
-rw-r--r--storage/src/vespa/storage/visiting/visitormetrics.cpp16
-rw-r--r--storage/src/vespa/storage/visiting/visitorthreadmetrics.h24
-rw-r--r--storageframework/src/vespa/storageframework/defaultimplementation/component/componentregisterimpl.cpp2
57 files changed, 501 insertions, 545 deletions
diff --git a/metrics/src/tests/countmetrictest.cpp b/metrics/src/tests/countmetrictest.cpp
index 8ef551ead53..af94f78dfdf 100644
--- a/metrics/src/tests/countmetrictest.cpp
+++ b/metrics/src/tests/countmetrictest.cpp
@@ -20,7 +20,7 @@ CPPUNIT_TEST_SUITE_REGISTRATION(CountMetricTest);
void CountMetricTest::testLongCountMetric()
{
- LongCountMetric m("test", "tag", "description");
+ LongCountMetric m("test", {{"tag"}}, "description");
m.set(100);
CPPUNIT_ASSERT_EQUAL(uint64_t(100), m.getValue());
m.inc(5);
@@ -32,7 +32,7 @@ void CountMetricTest::testLongCountMetric()
m.reset();
CPPUNIT_ASSERT_EQUAL(uint64_t(0), m.getValue());
- LongCountMetric n("m2", "", "desc");
+ LongCountMetric n("m2", {}, "desc");
n.set(6);
CPPUNIT_ASSERT_EQUAL(uint64_t(6), n.getValue());
diff --git a/metrics/src/tests/loadmetrictest.cpp b/metrics/src/tests/loadmetrictest.cpp
index 2bdb47add3f..5cbec2c4fae 100644
--- a/metrics/src/tests/loadmetrictest.cpp
+++ b/metrics/src/tests/loadmetrictest.cpp
@@ -48,7 +48,7 @@ LoadMetricTest::testNormalUsage()
LoadTypeSetImpl loadTypes;
loadTypes.add(32, "foo").add(1000, "bar");
LoadMetric<LongValueMetric> metric(
- loadTypes, LongValueMetric("put", "", "Put"));
+ loadTypes, LongValueMetric("put", {}, "Put"));
}
namespace {
@@ -56,8 +56,8 @@ namespace {
LongAverageMetric metric;
MyMetricSet(MetricSet* owner = 0)
- : MetricSet("tick", "", "", owner),
- metric("tack", "", "", this)
+ : MetricSet("tick", {}, "", owner),
+ metric("tack", {}, "", this)
{ }
MetricSet* clone(std::vector<Metric::UP> &ownerList, CopyType copyType,
@@ -80,7 +80,7 @@ LoadMetricTest::testClone(Metric::CopyType copyType)
{
LoadTypeSetImpl loadTypes;
loadTypes.add(32, "foo").add(1000, "bar");
- MetricSet top("top", "", "");
+ MetricSet top("top", {}, "");
MyMetricSet myset;
LoadMetric<MyMetricSet> metric(loadTypes, myset, &top);
metric[loadTypes["foo"]].metric.addValue(5);
@@ -110,7 +110,7 @@ LoadMetricTest::testAdding()
{
LoadTypeSetImpl loadTypes;
loadTypes.add(32, "foo").add(1000, "bar");
- MetricSet top("top", "", "");
+ MetricSet top("top", {}, "");
MyMetricSet myset;
LoadMetric<MyMetricSet> metric(loadTypes, myset, &top);
metric[loadTypes["foo"]].metric.addValue(5);
diff --git a/metrics/src/tests/metric_timer_test.cpp b/metrics/src/tests/metric_timer_test.cpp
index 0721f2202ac..0087da713b9 100644
--- a/metrics/src/tests/metric_timer_test.cpp
+++ b/metrics/src/tests/metric_timer_test.cpp
@@ -27,7 +27,7 @@ using namespace std::literals::chrono_literals;
template <typename MetricType>
void MetricTimerTest::do_test_metric_timer_for_metric_type() {
MetricTimer timer;
- MetricType metric("foo", "", "");
+ MetricType metric("foo", {}, "");
std::this_thread::sleep_for(5ms); // Guaranteed to be monotonic time
timer.stop(metric);
// getDoubleValue() is present for both long and double metric types
diff --git a/metrics/src/tests/metricmanagertest.cpp b/metrics/src/tests/metricmanagertest.cpp
index 8424d3be3fe..b89dbad738b 100644
--- a/metrics/src/tests/metricmanagertest.cpp
+++ b/metrics/src/tests/metricmanagertest.cpp
@@ -68,10 +68,10 @@ struct SubMetricSet : public MetricSet
SubMetricSet::SubMetricSet(const Metric::String & name, MetricSet* owner)
- : MetricSet(name, "sub", "sub desc", owner),
- val1("val1", "tag4 snaptest", "val1 desc", this),
- val2("val2", "tag5", "val2 desc", this),
- valsum("valsum", "tag4 snaptest", "valsum desc", this)
+ : MetricSet(name, {{"sub"}}, "sub desc", owner),
+ val1("val1", {{"tag4"},{"snaptest"}}, "val1 desc", this),
+ val2("val2", {{"tag5"}}, "val2 desc", this),
+ valsum("valsum", {{"tag4"},{"snaptest"}}, "valsum desc", this)
{
valsum.addMetricToSum(val1);
valsum.addMetricToSum(val2);
@@ -91,16 +91,17 @@ struct MultiSubMetricSet
};
MultiSubMetricSet::MultiSubMetricSet(MetricSet* owner)
- : set("multisub", "multisub", "", owner),
- count("count", "snaptest", "counter", &set),
- a("a", &set),
- b("b", &set),
- sum("sum", "snaptest", "", &set)
+ : set("multisub", {{"multisub"}}, "", owner),
+ count("count", {{"snaptest"}}, "counter", &set),
+ a("a", &set),
+ b("b", &set),
+ sum("sum", {{"snaptest"}}, "", &set)
{
sum.addMetricToSum(a);
sum.addMetricToSum(b);
}
- MultiSubMetricSet::~MultiSubMetricSet() { }
+
+MultiSubMetricSet::~MultiSubMetricSet() { }
struct TestMetricSet {
MetricSet set;
@@ -120,15 +121,15 @@ struct TestMetricSet {
};
TestMetricSet::TestMetricSet()
- : set("temp", "test", "desc of test set"),
- val1("val1", "tag1", "val1 desc", &set),
- val2("val2", "tag1 tag2", "val2 desc", &set),
- val3("val3", "tag2 tag3", "val3 desc", &set),
- val4("val4", "tag3", "val4 desc", &set),
- val5("val5", "tag2", "val5 desc", &set),
- val6("val6", "tag4 snaptest", "val6 desc", &set),
- val7("val7", "", "val7 desc", &set),
- val8("val8", "tag6", "val8 desc", &set),
+ : set("temp", {{"test"}}, "desc of test set"),
+ val1("val1", {{"tag1"}}, "val1 desc", &set),
+ val2("val2", {{"tag1"},{"tag2"}}, "val2 desc", &set),
+ val3("val3", {{"tag2"},{"tag3"}}, "val3 desc", &set),
+ val4("val4", {{"tag3"}}, "val4 desc", &set),
+ val5("val5", {{"tag2"}}, "val5 desc", &set),
+ val6("val6", {{"tag4"},{"snaptest"}}, "val6 desc", &set),
+ val7("val7", {}, "val7 desc", &set),
+ val8("val8", {{"tag6"}}, "val8 desc", &set),
val9("sub", &set),
val10(&set)
{ }
@@ -967,7 +968,7 @@ struct DimensionTestMetricSet : MetricSet
DimensionTestMetricSet::DimensionTestMetricSet(MetricSet* owner)
: MetricSet("temp", {{"foo", "megafoo"}, {"bar", "hyperbar"}}, "", owner),
- val1("val1", "tag1", "val1 desc", this),
+ val1("val1", {{"tag1"}}, "val1 desc", this),
val2("val2", {{"baz", "superbaz"}}, "val2 desc", this)
{ }
DimensionTestMetricSet::~DimensionTestMetricSet() { }
@@ -1039,7 +1040,7 @@ struct DimensionOverridableTestMetricSet : MetricSet
DimensionOverridableTestMetricSet(const std::string& dimValue,
MetricSet* owner = nullptr)
: MetricSet("temp", {{"foo", dimValue}}, "", owner),
- val("val", "", "val desc", this)
+ val("val", {}, "val desc", this)
{ }
};
diff --git a/metrics/src/tests/metricsettest.cpp b/metrics/src/tests/metricsettest.cpp
index 3deddfc2507..e4601a7b573 100644
--- a/metrics/src/tests/metricsettest.cpp
+++ b/metrics/src/tests/metricsettest.cpp
@@ -47,12 +47,12 @@ void
MetricSetTest::testNormalUsage()
{
// Set up some metrics to test..
- MetricSet set("a", "foo", "");
- DoubleValueMetric v1("c", "foo", "", &set);
- LongAverageMetric v2("b", "", "", &set);
- LongCountMetric v3("d", "bar", "", &set);
- MetricSet set2("e", "bar", "", &set);
- LongCountMetric v4("f", "foo", "", &set2);
+ MetricSet set("a", {{"foo"}}, "");
+ DoubleValueMetric v1("c", {{"foo"}}, "", &set);
+ LongAverageMetric v2("b", {}, "", &set);
+ LongCountMetric v3("d", {{"bar"}}, "", &set);
+ MetricSet set2("e", {{"bar"}}, "", &set);
+ LongCountMetric v4("f", {{"foo"}}, "", &set2);
// Give them some values
v1.addValue(4.2);
@@ -61,7 +61,7 @@ MetricSetTest::testNormalUsage()
v4.inc(3);
// Check that we can register through registerMetric function too.
- LongCountMetric v5("g", "", "");
+ LongCountMetric v5("g", {}, "");
set.registerMetric(v5);
v5.inc(3);
v5.dec();
@@ -77,7 +77,7 @@ MetricSetTest::testNormalUsage()
CPPUNIT_ASSERT(nonExistingCopy == 0);
// Check that paths are set
- MetricSet topSet("top", "", "");
+ MetricSet topSet("top", {}, "");
topSet.registerMetric(set);
CPPUNIT_ASSERT_EQUAL(vespalib::string("a"), set.getPath());
CPPUNIT_ASSERT_EQUAL(vespalib::string("a.c"), v1.getPath());
@@ -136,10 +136,10 @@ MetricSetTest::supportMultipleMetricsWithSameNameDifferentDimensions()
void
MetricSetTest::uniqueTargetMetricsAreAddedToMetricSet()
{
- MetricSet set1("a", "foo", "");
- LongCountMetric v1("wow", "foo", "", &set1);
- MetricSet set2("e", "bar", "");
- LongCountMetric v2("doge", "foo", "", &set2);
+ MetricSet set1("a", {{"foo"}}, "");
+ LongCountMetric v1("wow", {{"foo"}}, "", &set1);
+ MetricSet set2("e", {{"bar"}}, "");
+ LongCountMetric v2("doge", {{"foo"}}, "", &set2);
// Have to actually assign a value to metrics or they won't be carried over.
v1.inc();
diff --git a/metrics/src/tests/metrictest.cpp b/metrics/src/tests/metrictest.cpp
index d9c39ef5cd2..eb1f5943a87 100644
--- a/metrics/src/tests/metrictest.cpp
+++ b/metrics/src/tests/metrictest.cpp
@@ -102,7 +102,7 @@ MetricTest::manglingDoesNotChangeOriginalMetricName()
void
MetricTest::legacyTagsDoNotCreateMangledName()
{
- LongValueMetric m("test", "foo bar", "");
+ LongValueMetric m("test", {{"foo"},{"bar"}}, "");
CPPUNIT_ASSERT_EQUAL(vespalib::string("test"), m.getName());
CPPUNIT_ASSERT_EQUAL(vespalib::string("test"), m.getMangledName());
}
diff --git a/metrics/src/tests/snapshottest.cpp b/metrics/src/tests/snapshottest.cpp
index 75af75999d1..df9dd0a1e64 100644
--- a/metrics/src/tests/snapshottest.cpp
+++ b/metrics/src/tests/snapshottest.cpp
@@ -45,21 +45,21 @@ struct SubSubMetricSet : public MetricSet {
};
SubSubMetricSet::SubSubMetricSet(vespalib::stringref name, const LoadTypeSet& loadTypes_, MetricSet* owner)
- : MetricSet(name, "", "", owner),
+ : MetricSet(name, {}, "", owner),
loadTypes(loadTypes_),
incVal(1),
- count1("count1", "", "", this),
- count2("count2", "", "", this),
- loadCount(loadTypes, LongCountMetric("loadCount", "", ""), this),
- countSum("countSum", "", "", this),
- value1("value1", "", "", this),
- value2("value2", "", "", this),
- loadValue(loadTypes, DoubleValueMetric("loadValue", "", ""), this),
- valueSum("valueSum", "", "", this),
- average1("average1", "", "", this),
- average2("average2", "", "", this),
- loadAverage(loadTypes, DoubleAverageMetric("loadAverage", "", ""), this),
- averageSum("averageSum", "", "", this)
+ count1("count1", {}, "", this),
+ count2("count2", {}, "", this),
+ loadCount(loadTypes, LongCountMetric("loadCount", {}, ""), this),
+ countSum("countSum", {}, "", this),
+ value1("value1", {}, "", this),
+ value2("value2", {}, "", this),
+ loadValue(loadTypes, DoubleValueMetric("loadValue", {}, ""), this),
+ valueSum("valueSum", {}, "", this),
+ average1("average1", {}, "", this),
+ average2("average2", {}, "", this),
+ loadAverage(loadTypes, DoubleAverageMetric("loadAverage", {}, ""), this),
+ averageSum("averageSum", {}, "", this)
{
countSum.addMetricToSum(count1);
countSum.addMetricToSum(count2);
@@ -120,12 +120,12 @@ struct SubMetricSet : public MetricSet {
};
SubMetricSet::SubMetricSet(vespalib::stringref name, const LoadTypeSet& loadTypes_, MetricSet* owner)
- : MetricSet(name, "", "", owner),
+ : MetricSet(name, {}, "", owner),
loadTypes(loadTypes_),
set1("set1", loadTypes, this),
set2("set2", loadTypes, this),
loadSet(loadTypes, *std::unique_ptr<SubSubMetricSet>(new SubSubMetricSet("loadSet", loadTypes)), this),
- setSum("setSum", "", "", this)
+ setSum("setSum", {}, "", this)
{
setSum.addMetricToSum(set1);
setSum.addMetricToSum(set2);
@@ -167,12 +167,12 @@ struct TestMetricSet : public MetricSet {
TestMetricSet::TestMetricSet(vespalib::stringref name, const LoadTypeSet& loadTypes_, MetricSet* owner)
- : MetricSet(name, "", "", owner),
+ : MetricSet(name, {}, "", owner),
loadTypes(loadTypes_),
set1("set1", loadTypes, this),
set2("set2", loadTypes, this),
loadSet(loadTypes, *std::unique_ptr<SubMetricSet>(new SubMetricSet("loadSet", loadTypes)), this),
- setSum("setSum", "", "", this)
+ setSum("setSum", {}, "", this)
{
setSum.addMetricToSum(set1);
setSum.addMetricToSum(set2);
diff --git a/metrics/src/tests/stresstest.cpp b/metrics/src/tests/stresstest.cpp
index 0c06ca70aec..e20045ad2d4 100644
--- a/metrics/src/tests/stresstest.cpp
+++ b/metrics/src/tests/stresstest.cpp
@@ -38,13 +38,13 @@ struct InnerMetricSet : public MetricSet {
};
InnerMetricSet::InnerMetricSet(const char* name, const LoadTypeSet& lt, MetricSet* owner)
- : MetricSet(name, "", "", owner),
+ : MetricSet(name, {}, "", owner),
_loadTypes(lt),
- _count("count", "", "", this),
- _value1("value1", "", "", this),
- _value2("value2", "", "", this),
- _valueSum("valuesum", "", "", this),
- _load(lt, LongAverageMetric("load", "", ""), this)
+ _count("count", {}, "", this),
+ _value1("value1", {}, "", this),
+ _value2("value2", {}, "", this),
+ _valueSum("valuesum", {}, "", this),
+ _load(lt, LongAverageMetric("load", {}, ""), this)
{
_valueSum.addMetricToSum(_value1);
_valueSum.addMetricToSum(_value2);
@@ -75,10 +75,10 @@ struct OuterMetricSet : public MetricSet {
};
OuterMetricSet::OuterMetricSet(const LoadTypeSet& lt, MetricSet* owner)
- : MetricSet("outer", "", "", owner),
+ : MetricSet("outer", {}, "", owner),
_inner1("inner1", lt, this),
_inner2("inner2", lt, this),
- _innerSum("innersum", "", "", this),
+ _innerSum("innersum", {}, "", this),
_tmp("innertmp", lt, 0),
_load(lt, _tmp, this)
{
diff --git a/metrics/src/tests/summetrictest.cpp b/metrics/src/tests/summetrictest.cpp
index 8cc622d622a..32c5ee2c309 100644
--- a/metrics/src/tests/summetrictest.cpp
+++ b/metrics/src/tests/summetrictest.cpp
@@ -25,11 +25,11 @@ CPPUNIT_TEST_SUITE_REGISTRATION(SumMetricTest);
void
SumMetricTest::testLongCountMetric()
{
- MetricSet parent("parent", "", "");
- SumMetric<LongCountMetric> sum("foo", "", "foodesc", &parent);
+ MetricSet parent("parent", {}, "");
+ SumMetric<LongCountMetric> sum("foo", {}, "foodesc", &parent);
- LongCountMetric v1("ff", "", "", &parent);
- LongCountMetric v2("aa", "", "", &parent);
+ LongCountMetric v1("ff", {}, "", &parent);
+ LongCountMetric v2("aa", {}, "", &parent);
sum.addMetricToSum(v1);
sum.addMetricToSum(v2);
@@ -46,11 +46,11 @@ SumMetricTest::testLongCountMetric()
void
SumMetricTest::testAverageMetric() {
- MetricSet parent("parent", "", "");
- SumMetric<LongAverageMetric> sum("foo", "", "foodesc", &parent);
+ MetricSet parent("parent", {}, "");
+ SumMetric<LongAverageMetric> sum("foo", {}, "foodesc", &parent);
- LongAverageMetric v1("ff", "", "", &parent);
- LongAverageMetric v2("aa", "", "", &parent);
+ LongAverageMetric v1("ff", {}, "", &parent);
+ LongAverageMetric v2("aa", {}, "", &parent);
sum.addMetricToSum(v1);
sum.addMetricToSum(v2);
@@ -69,15 +69,15 @@ SumMetricTest::testAverageMetric() {
void
SumMetricTest::testMetricSet() {
- MetricSet parent("parent", "", "");
- SumMetric<MetricSet> sum("foo", "", "bar", &parent);
+ MetricSet parent("parent", {}, "");
+ SumMetric<MetricSet> sum("foo", {}, "bar", &parent);
- MetricSet set1("a", "", "", &parent);
- MetricSet set2("b", "", "", &parent);
- LongValueMetric v1("c", "", "", &set1);
- LongValueMetric v2("d", "", "", &set2);
- LongCountMetric v3("e", "", "", &set1);
- LongCountMetric v4("f", "", "", &set2);
+ MetricSet set1("a", {}, "", &parent);
+ MetricSet set2("b", {}, "", &parent);
+ LongValueMetric v1("c", {}, "", &set1);
+ LongValueMetric v2("d", {}, "", &set2);
+ LongCountMetric v3("e", {}, "", &set1);
+ LongCountMetric v4("f", {}, "", &set2);
sum.addMetricToSum(set1);
sum.addMetricToSum(set2);
@@ -100,12 +100,12 @@ SumMetricTest::testMetricSet() {
void
SumMetricTest::testRemove()
{
- MetricSet parent("parent", "", "");
- SumMetric<LongCountMetric> sum("foo", "", "foodesc", &parent);
+ MetricSet parent("parent", {}, "");
+ SumMetric<LongCountMetric> sum("foo", {}, "foodesc", &parent);
- LongCountMetric v1("ff", "", "", &parent);
- LongCountMetric v2("aa", "", "", &parent);
- LongCountMetric v3("zz", "", "", &parent);
+ LongCountMetric v1("ff", {}, "", &parent);
+ LongCountMetric v2("aa", {}, "", &parent);
+ LongCountMetric v3("zz", {}, "", &parent);
sum.addMetricToSum(v1);
sum.addMetricToSum(v2);
@@ -125,9 +125,9 @@ void
SumMetricTest::testStartValue()
{
MetricSnapshot snapshot("active");
- SumMetric<LongValueMetric> sum("foo", "", "foodesc",
+ SumMetric<LongValueMetric> sum("foo", {}, "foodesc",
&snapshot.getMetrics());
- LongValueMetric start("start", "", "", 0);
+ LongValueMetric start("start", {}, "", 0);
start.set(50);
sum.setStartValue(start);
@@ -138,7 +138,7 @@ SumMetricTest::testStartValue()
copy.recreateSnapshot(snapshot.getMetrics(), true);
snapshot.addToSnapshot(copy, 100);
- LongValueMetric value("value", "", "", &snapshot.getMetrics());
+ LongValueMetric value("value", {}, "", &snapshot.getMetrics());
sum.addMetricToSum(value);
value.set(10);
diff --git a/metrics/src/tests/valuemetrictest.cpp b/metrics/src/tests/valuemetrictest.cpp
index e8c144c96aa..da730b7c8a9 100644
--- a/metrics/src/tests/valuemetrictest.cpp
+++ b/metrics/src/tests/valuemetrictest.cpp
@@ -46,7 +46,7 @@ CPPUNIT_TEST_SUITE_REGISTRATION(ValueMetricTest);
void ValueMetricTest::testDoubleValueMetric()
{
- DoubleValueMetric m("test", "tag", "description");
+ DoubleValueMetric m("test", {{"tag"}}, "description");
m.addValue(100);
ASSERT_AVERAGE(m, 100, 100, 100, 1, 100);
m.addValue(100);
@@ -58,7 +58,7 @@ void ValueMetricTest::testDoubleValueMetric()
m.reset();
ASSERT_AVERAGE(m, 0, 0, 0, 0, 0);
- DoubleValueMetric n("m2", "", "desc");
+ DoubleValueMetric n("m2", {}, "desc");
n.addValue(60);
ASSERT_AVERAGE(n, 60, 60, 60, 1, 60);
@@ -94,7 +94,7 @@ void ValueMetricTest::testDoubleValueMetric()
void
ValueMetricTest::testDoubleValueMetricNotUpdatedOnNaN()
{
- DoubleValueMetric m("test", "tag", "description");
+ DoubleValueMetric m("test", {{"tag"}}, "description");
m.addValue(std::numeric_limits<double>::quiet_NaN());
CPPUNIT_ASSERT_EQUAL(std::string(), m.toString());
@@ -111,7 +111,7 @@ ValueMetricTest::testDoubleValueMetricNotUpdatedOnNaN()
void
ValueMetricTest::testDoubleValueMetricNotUpdatedOnInfinity()
{
- DoubleValueMetric m("test", "tag", "description");
+ DoubleValueMetric m("test", {{"tag"}}, "description");
m.addValue(std::numeric_limits<double>::infinity());
CPPUNIT_ASSERT_EQUAL(std::string(), m.toString());
@@ -127,7 +127,7 @@ ValueMetricTest::testDoubleValueMetricNotUpdatedOnInfinity()
void ValueMetricTest::testLongValueMetric()
{
- LongValueMetric m("test", "tag", "description");
+ LongValueMetric m("test", {{"tag"}}, "description");
m.addValue(100);
ASSERT_AVERAGE(m, 100, 100, 100, 1, 100);
m.addValue(100);
@@ -139,7 +139,7 @@ void ValueMetricTest::testLongValueMetric()
m.reset();
ASSERT_AVERAGE(m, 0, 0, 0, 0, 0);
- LongValueMetric n("m2", "", "desc");
+ LongValueMetric n("m2", {}, "desc");
n.addValue(60);
ASSERT_AVERAGE(n, 60, 60, 60, 1, 60);
@@ -174,7 +174,7 @@ void ValueMetricTest::testLongValueMetric()
void ValueMetricTest::testSmallAverage()
{
- DoubleValueMetric m("test", "tag", "description");
+ DoubleValueMetric m("test", {{"tag"}}, "description");
m.addValue(0.0001);
m.addValue(0.0002);
m.addValue(0.0003);
@@ -186,7 +186,7 @@ void ValueMetricTest::testSmallAverage()
}
void ValueMetricTest::testAddValueBatch() {
- DoubleValueMetric m("test", "tag", "description");
+ DoubleValueMetric m("test", {{"tag"}}, "description");
m.addValueBatch(100, 3, 80, 120);
ASSERT_AVERAGE(m, 100, 80, 120, 3, 100);
m.addValueBatch(123, 0, 12, 1234);
@@ -222,7 +222,7 @@ namespace {
void ValueMetricTest::testJson() {
MetricManager mm;
- DoubleValueMetric m("test", "tag", "description");
+ DoubleValueMetric m("test", {{"tag"}}, "description");
mm.registerMetric(mm.getMetricLock(), m);
vespalib::string expected("'\n"
diff --git a/metrics/src/vespa/metrics/countmetric.h b/metrics/src/vespa/metrics/countmetric.h
index 912fc52449b..675b5698049 100644
--- a/metrics/src/vespa/metrics/countmetric.h
+++ b/metrics/src/vespa/metrics/countmetric.h
@@ -28,12 +28,6 @@ struct AbstractCountMetric : public Metric {
virtual bool inUse(const MetricValueClass& v) const = 0;
protected:
- AbstractCountMetric(const String& name, const String& tags,
- const String& description, MetricSet* owner = 0)
- : Metric(name, tags, description, owner)
- {
- }
-
AbstractCountMetric(const String& name, Tags dimensions,
const String& description, MetricSet* owner = 0)
: Metric(name, std::move(dimensions), description, owner)
@@ -60,9 +54,6 @@ class CountMetric : public AbstractCountMetric
bool logIfUnset() const { return _values.hasFlag(LOG_IF_UNSET); }
public:
- CountMetric(const String& name, const String& tags,
- const String& description, MetricSet* owner = 0);
-
CountMetric(const String& name, Tags dimensions,
const String& description, MetricSet* owner = 0);
diff --git a/metrics/src/vespa/metrics/countmetric.hpp b/metrics/src/vespa/metrics/countmetric.hpp
index b46d45d690f..810ba7e371d 100644
--- a/metrics/src/vespa/metrics/countmetric.hpp
+++ b/metrics/src/vespa/metrics/countmetric.hpp
@@ -8,15 +8,6 @@
namespace metrics {
template <typename T, bool SumOnAdd>
-CountMetric<T, SumOnAdd>::CountMetric(const String& name, const String& tags,
- const String& desc, MetricSet* owner)
- : AbstractCountMetric(name, tags, desc, owner),
- _values()
-{
- _values.setFlag(LOG_IF_UNSET);
-}
-
-template <typename T, bool SumOnAdd>
CountMetric<T, SumOnAdd>::CountMetric(const String& name, Tags dimensions,
const String& desc, MetricSet* owner)
: AbstractCountMetric(name, std::move(dimensions), desc, owner),
diff --git a/metrics/src/vespa/metrics/loadmetric.hpp b/metrics/src/vespa/metrics/loadmetric.hpp
index 0a66f985867..ce93c761a05 100644
--- a/metrics/src/vespa/metrics/loadmetric.hpp
+++ b/metrics/src/vespa/metrics/loadmetric.hpp
@@ -10,9 +10,9 @@ namespace metrics {
template<typename MetricType>
LoadMetric<MetricType>::LoadMetric(const LoadTypeSet& loadTypes, const MetricType& metric, MetricSet* owner)
- : MetricSet(metric.getName(), "", metric.getDescription(), owner),
+ : MetricSet(metric.getName(), {}, metric.getDescription(), owner),
_metrics(),
- _sum("sum", "loadsum sum", "Sum of all load metrics", this)
+ _sum("sum", {{"loadsum"},{"sum"}}, "Sum of all load metrics", this)
{
_metrics.resize(loadTypes.size());
// Currently, we only set tags and description on the metric set
@@ -35,9 +35,9 @@ LoadMetric<MetricType>::LoadMetric(const LoadTypeSet& loadTypes, const MetricTyp
template<typename MetricType>
LoadMetric<MetricType>::LoadMetric(const LoadMetric<MetricType>& other, MetricSet* owner)
- : MetricSet(other.getName(), "", other.getDescription(), owner),
+ : MetricSet(other.getName(), {}, other.getDescription(), owner),
_metrics(),
- _sum("sum", "loadsum sum", "Sum of all load metrics", this)
+ _sum("sum", {{"loadsum"},{"sum"}}, "Sum of all load metrics", this)
{
_metrics.resize(2 * other._metrics.size());
setTags(other.getTags());
diff --git a/metrics/src/vespa/metrics/metric.cpp b/metrics/src/vespa/metrics/metric.cpp
index 05483a5be11..82f9c848ece 100644
--- a/metrics/src/vespa/metrics/metric.cpp
+++ b/metrics/src/vespa/metrics/metric.cpp
@@ -37,20 +37,15 @@ MetricVisitor::visitMetric(const Metric&, bool)
}
namespace {
- Metric::Tags legacyTagStringToKeyedTags(const std::string& tagStr) {
- vespalib::StringTokenizer tokenizer(tagStr, " \t\r\f");
- Metric::Tags tags;
- std::transform(tokenizer.getTokens().begin(),
- tokenizer.getTokens().end(),
- std::back_inserter(tags),
- [](const std::string& s) { return Tag(s, ""); });
- return tags;
- }
std::string namePattern = "[a-zA-Z][_a-zA-Z0-9]*";
}
vespalib::Regexp Metric::_namePattern(namePattern);
+Tag::Tag(vespalib::stringref k)
+ : _key(NameRepo::tagKeyId(k)),
+ _value(0)
+{ }
Tag::Tag(vespalib::stringref k, vespalib::stringref v)
: _key(NameRepo::tagKeyId(k)),
_value(NameRepo::tagValueId(v))
@@ -61,21 +56,6 @@ Tag & Tag::operator = (const Tag &) = default;
Tag::~Tag() {}
Metric::Metric(const String& name,
- const String& tags,
- const String& description,
- MetricSet* owner)
- : _name(NameRepo::metricId(name)),
- _mangledName(_name),
- _description(NameRepo::descriptionId(description)),
- _tags(legacyTagStringToKeyedTags(tags)),
- _owner(nullptr) // Set later by registry
-{
- verifyConstructionParameters();
- assignMangledNameWithDimensions();
- registerWithOwnerIfRequired(owner);
-}
-
-Metric::Metric(const String& name,
Tags dimensions,
const String& description,
MetricSet* owner)
@@ -111,7 +91,7 @@ Metric::~Metric() { }
bool
Metric::tagsSpecifyAtLeastOneDimension(const Tags& tags) const
{
- auto hasNonEmptyTagValue = [](const Tag& t) { return !t.value().empty(); };
+ auto hasNonEmptyTagValue = [](const Tag& t) { return t.hasValue(); };
return std::any_of(tags.begin(), tags.end(), hasNonEmptyTagValue);
}
diff --git a/metrics/src/vespa/metrics/metric.h b/metrics/src/vespa/metrics/metric.h
index dc9e45e89af..c92cad8c0cd 100644
--- a/metrics/src/vespa/metrics/metric.h
+++ b/metrics/src/vespa/metrics/metric.h
@@ -86,6 +86,7 @@ struct Tag
const vespalib::string& key() const { return NameRepo::tagKey(_key); }
const vespalib::string& value() const { return NameRepo::tagValue(_value); }
+ Tag(vespalib::stringref k);
Tag(vespalib::stringref k, vespalib::stringref v);
Tag(const Tag &);
Tag & operator = (const Tag &);
@@ -93,6 +94,8 @@ struct Tag
Tag & operator = (Tag &&) = default;
~Tag();
+ bool hasValue() const { return _value.id() != 0; }
+
private:
TagKeyId _key;
TagValueId _value;
@@ -109,9 +112,6 @@ public:
static vespalib::Regexp _namePattern;
- Metric(const String& name, const String& tags,
- const String& description, MetricSet* owner = 0);
-
Metric(const String& name,
Tags dimensions,
const String& description,
diff --git a/metrics/src/vespa/metrics/metricmanager.cpp b/metrics/src/vespa/metrics/metricmanager.cpp
index 544998e25cd..5b716e2698f 100644
--- a/metrics/src/vespa/metrics/metricmanager.cpp
+++ b/metrics/src/vespa/metrics/metricmanager.cpp
@@ -75,12 +75,12 @@ MetricManager::MetricManager(std::unique_ptr<Timer> timer)
_forceEventLogging(false),
_snapshotUnsetMetrics(false),
_consumerConfigChanged(false),
- _metricManagerMetrics("metricmanager", "", "Metrics for the metric manager upkeep tasks"),
- _periodicHookLatency("periodichooklatency", "", "Time in ms used to update a single periodic hook", &_metricManagerMetrics),
- _snapshotHookLatency("snapshothooklatency", "", "Time in ms used to update a single snapshot hook", &_metricManagerMetrics),
- _resetLatency("resetlatency", "", "Time in ms used to reset all metrics.", &_metricManagerMetrics),
- _snapshotLatency("snapshotlatency", "", "Time in ms used to take a snapshot", &_metricManagerMetrics),
- _sleepTimes("sleeptime", "", "Time in ms worker thread is sleeping", &_metricManagerMetrics)
+ _metricManagerMetrics("metricmanager", {}, "Metrics for the metric manager upkeep tasks"),
+ _periodicHookLatency("periodichooklatency", {}, "Time in ms used to update a single periodic hook", &_metricManagerMetrics),
+ _snapshotHookLatency("snapshothooklatency", {}, "Time in ms used to update a single snapshot hook", &_metricManagerMetrics),
+ _resetLatency("resetlatency", {}, "Time in ms used to reset all metrics.", &_metricManagerMetrics),
+ _snapshotLatency("snapshotlatency", {}, "Time in ms used to take a snapshot", &_metricManagerMetrics),
+ _sleepTimes("sleeptime", {}, "Time in ms worker thread is sleeping", &_metricManagerMetrics)
{
registerMetric(getMetricLock(), _metricManagerMetrics);
}
diff --git a/metrics/src/vespa/metrics/metricset.cpp b/metrics/src/vespa/metrics/metricset.cpp
index 6ffae806322..a8e22c8dfc4 100644
--- a/metrics/src/vespa/metrics/metricset.cpp
+++ b/metrics/src/vespa/metrics/metricset.cpp
@@ -14,14 +14,6 @@ LOG_SETUP(".metrics.metricsset");
namespace metrics {
-MetricSet::MetricSet(const String& name, const String& tags,
- const String& description, MetricSet* owner)
- : Metric(name, tags, description, owner),
- _metricOrder(),
- _registrationAltered(false)
-{
-}
-
MetricSet::MetricSet(const String& name, Tags dimensions,
const String& description, MetricSet* owner)
: Metric(name, std::move(dimensions), description, owner),
diff --git a/metrics/src/vespa/metrics/metricset.h b/metrics/src/vespa/metrics/metricset.h
index a8fea2fc290..da3f2c26cde 100644
--- a/metrics/src/vespa/metrics/metricset.h
+++ b/metrics/src/vespa/metrics/metricset.h
@@ -22,9 +22,6 @@ class MetricSet : public Metric
// it was reset
public:
- MetricSet(const String& name, const String& tags,
- const String& description, MetricSet* owner = 0);
-
MetricSet(const String& name, Tags dimensions,
const String& description, MetricSet* owner = 0);
diff --git a/metrics/src/vespa/metrics/metricsnapshot.cpp b/metrics/src/vespa/metrics/metricsnapshot.cpp
index ac3c41215aa..86a33f0993f 100644
--- a/metrics/src/vespa/metrics/metricsnapshot.cpp
+++ b/metrics/src/vespa/metrics/metricsnapshot.cpp
@@ -12,7 +12,7 @@ MetricSnapshot::MetricSnapshot(const Metric::String& name)
_period(0),
_fromTime(0),
_toTime(0),
- _snapshot(new MetricSet("top", "", "")),
+ _snapshot(new MetricSet("top", {}, "")),
_metrics()
{
}
diff --git a/metrics/src/vespa/metrics/summetric.h b/metrics/src/vespa/metrics/summetric.h
index 3dc58d32bef..a9827bcca7d 100644
--- a/metrics/src/vespa/metrics/summetric.h
+++ b/metrics/src/vespa/metrics/summetric.h
@@ -42,7 +42,7 @@ private:
std::vector<const AddendMetric*> _metricsToSum;
public:
- SumMetric(const String& name, const String& tags, const String& description, MetricSet* owner = 0);
+ SumMetric(const String& name, Tags tags, const String& description, MetricSet* owner = 0);
SumMetric(const SumMetric<AddendMetric>& other, std::vector<Metric::UP> & ownerList, MetricSet* owner = 0);
~SumMetric();
diff --git a/metrics/src/vespa/metrics/summetric.hpp b/metrics/src/vespa/metrics/summetric.hpp
index 8e558eb94ee..fc3c3a5e019 100644
--- a/metrics/src/vespa/metrics/summetric.hpp
+++ b/metrics/src/vespa/metrics/summetric.hpp
@@ -24,7 +24,7 @@ SumMetric<AddendMetric>::visit(MetricVisitor& visitor,
}
template<typename AddendMetric>
-SumMetric<AddendMetric>::SumMetric(const String& name, const String& tags,
+SumMetric<AddendMetric>::SumMetric(const String& name, Tags tags,
const String& description, MetricSet* owner)
: Metric(name, tags, description, owner),
_startValue(),
diff --git a/metrics/src/vespa/metrics/valuemetric.h b/metrics/src/vespa/metrics/valuemetric.h
index 57baa36c26a..44a4e551cba 100644
--- a/metrics/src/vespa/metrics/valuemetric.h
+++ b/metrics/src/vespa/metrics/valuemetric.h
@@ -28,10 +28,6 @@ struct AbstractValueMetric : public Metric {
virtual bool summedAverage() const = 0;
protected:
- AbstractValueMetric(const String& name, const String& tags,
- const String& description, MetricSet* owner)
- : Metric(name, tags, description, owner) {}
-
AbstractValueMetric(const String& name, Tags dimensions,
const String& description, MetricSet* owner)
: Metric(name, std::move(dimensions), description, owner) {}
@@ -83,9 +79,6 @@ class ValueMetric : public AbstractValueMetric {
bool checkFinite(AvgVal, std::false_type) { return true; }
public:
- ValueMetric(const String &name, const String &tags,
- const String &description, MetricSet *owner = 0);
-
ValueMetric(const ValueMetric<AvgVal, TotVal, SumOnAdd> &,
CopyType, MetricSet *owner);
diff --git a/metrics/src/vespa/metrics/valuemetric.hpp b/metrics/src/vespa/metrics/valuemetric.hpp
index 8fe8769e9ad..8b2ee532614 100644
--- a/metrics/src/vespa/metrics/valuemetric.hpp
+++ b/metrics/src/vespa/metrics/valuemetric.hpp
@@ -11,16 +11,6 @@ namespace metrics {
template<typename AvgVal, typename TotVal, bool SumOnAdd>
ValueMetric<AvgVal, TotVal, SumOnAdd>::ValueMetric(
- const String& name, const String& tags,
- const String& description, MetricSet* owner)
- : AbstractValueMetric(name, tags, description, owner),
- _values()
-{
- _values.setFlag(LOG_IF_UNSET);
-}
-
-template<typename AvgVal, typename TotVal, bool SumOnAdd>
-ValueMetric<AvgVal, TotVal, SumOnAdd>::ValueMetric(
const String& name, const Tags dimensions,
const String& description, MetricSet* owner)
: AbstractValueMetric(name, std::move(dimensions), description, owner),
diff --git a/persistence/src/vespa/persistence/spi/metricpersistenceprovider.cpp b/persistence/src/vespa/persistence/spi/metricpersistenceprovider.cpp
index 58e662a2b1d..d62285da6d3 100644
--- a/persistence/src/vespa/persistence/spi/metricpersistenceprovider.cpp
+++ b/persistence/src/vespa/persistence/spi/metricpersistenceprovider.cpp
@@ -33,21 +33,22 @@ using std::make_unique;
Impl::ResultMetrics::~ResultMetrics() { }
Impl::ResultMetrics::ResultMetrics(const char* opName)
- : metrics::MetricSet(opName, "", ""),
+ : metrics::MetricSet(opName, {}, ""),
_metric(Result::ERROR_COUNT)
{
- _metric[Result::NONE] = make_unique<DoubleAverageMetric>("success", "", "", this);
- _metric[Result::TRANSIENT_ERROR] = make_unique<DoubleAverageMetric>("transient_error", "", "", this);
- _metric[Result::PERMANENT_ERROR] = make_unique<DoubleAverageMetric>("permanent_error", "", "", this);
- _metric[Result::TIMESTAMP_EXISTS] = make_unique<DoubleAverageMetric>("timestamp_exists", "", "", this);
- _metric[Result::FATAL_ERROR] = make_unique<DoubleAverageMetric>("fatal_error", "", "", this);
- _metric[Result::RESOURCE_EXHAUSTED] = make_unique<DoubleAverageMetric>("resource_exhausted", "", "", this);
+ metrics::Metric::Tags noTags;
+ _metric[Result::NONE] = make_unique<DoubleAverageMetric>("success", noTags, "", this);
+ _metric[Result::TRANSIENT_ERROR] = make_unique<DoubleAverageMetric>("transient_error", noTags, "", this);
+ _metric[Result::PERMANENT_ERROR] = make_unique<DoubleAverageMetric>("permanent_error", noTags, "", this);
+ _metric[Result::TIMESTAMP_EXISTS] = make_unique<DoubleAverageMetric>("timestamp_exists", noTags, "", this);
+ _metric[Result::FATAL_ERROR] = make_unique<DoubleAverageMetric>("fatal_error", noTags, "", this);
+ _metric[Result::RESOURCE_EXHAUSTED] = make_unique<DoubleAverageMetric>("resource_exhausted", noTags, "", this);
// Assert that the above initialized all entries in vector
for (size_t i=0; i<_metric.size(); ++i) assert(_metric[i].get());
}
Impl::MetricPersistenceProvider(PersistenceProvider& next)
- : metrics::MetricSet("spi", "", ""),
+ : metrics::MetricSet("spi", {}, ""),
_next(&next),
_functionMetrics(23)
{
diff --git a/searchcore/src/tests/proton/metrics/metrics_engine/metrics_engine_test.cpp b/searchcore/src/tests/proton/metrics/metrics_engine/metrics_engine_test.cpp
index 1aaeb1707b3..e10fd41ffed 100644
--- a/searchcore/src/tests/proton/metrics/metrics_engine/metrics_engine_test.cpp
+++ b/searchcore/src/tests/proton/metrics/metrics_engine/metrics_engine_test.cpp
@@ -16,7 +16,7 @@ LOG_SETUP("metrics_engine_test");
using namespace proton;
struct DummyMetricSet : public metrics::MetricSet {
- DummyMetricSet(const vespalib::string &name) : metrics::MetricSet(name, "", "", nullptr) {}
+ DummyMetricSet(const vespalib::string &name) : metrics::MetricSet(name, {}, "", nullptr) {}
};
struct AttributeMetricsFixture {
diff --git a/searchcore/src/vespa/searchcore/proton/metrics/content_proton_metrics.cpp b/searchcore/src/vespa/searchcore/proton/metrics/content_proton_metrics.cpp
index 7b1ed5d6522..5ea89860307 100644
--- a/searchcore/src/vespa/searchcore/proton/metrics/content_proton_metrics.cpp
+++ b/searchcore/src/vespa/searchcore/proton/metrics/content_proton_metrics.cpp
@@ -5,7 +5,7 @@
namespace proton {
ContentProtonMetrics::ProtonExecutorMetrics::ProtonExecutorMetrics(metrics::MetricSet *parent)
- : metrics::MetricSet("executor", "", "Metrics for top-level executors shared among all document databases", parent),
+ : metrics::MetricSet("executor", {}, "Metrics for top-level executors shared among all document databases", parent),
proton("proton", this),
flush("flush", this),
match("match", this),
@@ -18,7 +18,7 @@ ContentProtonMetrics::ProtonExecutorMetrics::ProtonExecutorMetrics(metrics::Metr
ContentProtonMetrics::ProtonExecutorMetrics::~ProtonExecutorMetrics() = default;
ContentProtonMetrics::ContentProtonMetrics()
- : metrics::MetricSet("content.proton", "", "Search engine metrics", nullptr),
+ : metrics::MetricSet("content.proton", {}, "Search engine metrics", nullptr),
transactionLog(this),
resourceUsage(this),
executor(this)
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 c618614ea52..9561c605bd8 100644
--- a/searchcore/src/vespa/searchcore/proton/metrics/documentdb_tagged_metrics.cpp
+++ b/searchcore/src/vespa/searchcore/proton/metrics/documentdb_tagged_metrics.cpp
@@ -9,27 +9,27 @@ namespace proton {
using matching::MatchingStats;
DocumentDBTaggedMetrics::JobMetrics::JobMetrics(metrics::MetricSet* parent)
- : MetricSet("job", "", "Job load average for various jobs in a document database", parent),
- attributeFlush("attribute_flush", "", "Flushing of attribute vector(s) to disk", this),
- memoryIndexFlush("memory_index_flush", "", "Flushing of memory index to disk", this),
- diskIndexFusion("disk_index_fusion", "", "Fusion of disk indexes", this),
- documentStoreFlush("document_store_flush", "", "Flushing of document store to disk", this),
- documentStoreCompact("document_store_compact", "",
+ : MetricSet("job", {}, "Job load average for various jobs in a document database", parent),
+ attributeFlush("attribute_flush", {}, "Flushing of attribute vector(s) to disk", this),
+ memoryIndexFlush("memory_index_flush", {}, "Flushing of memory index to disk", this),
+ diskIndexFusion("disk_index_fusion", {}, "Fusion of disk indexes", this),
+ documentStoreFlush("document_store_flush", {}, "Flushing of document store to disk", this),
+ documentStoreCompact("document_store_compact", {},
"Compaction of document store on disk", this),
- bucketMove("bucket_move", "",
+ bucketMove("bucket_move", {},
"Moving of buckets between 'ready' and 'notready' sub databases", this),
- lidSpaceCompact("lid_space_compact", "",
+ lidSpaceCompact("lid_space_compact", {},
"Compaction of lid space in document meta store and attribute vectors", this),
- removedDocumentsPrune("removed_documents_prune", "",
+ removedDocumentsPrune("removed_documents_prune", {},
"Pruning of removed documents in 'removed' sub database", this),
- total("total", "", "The job load average total of all job metrics", this)
+ total("total", {}, "The job load average total of all job metrics", this)
{
}
DocumentDBTaggedMetrics::JobMetrics::~JobMetrics() = default;
DocumentDBTaggedMetrics::SubDBMetrics::SubDBMetrics(const vespalib::string &name, MetricSet *parent)
- : MetricSet(name, "", "Sub database metrics", parent),
+ : MetricSet(name, {}, "Sub database metrics", parent),
lidSpace(this),
documentStore(this),
attributes(this)
@@ -39,14 +39,14 @@ DocumentDBTaggedMetrics::SubDBMetrics::SubDBMetrics(const vespalib::string &name
DocumentDBTaggedMetrics::SubDBMetrics::~SubDBMetrics() = default;
DocumentDBTaggedMetrics::SubDBMetrics::LidSpaceMetrics::LidSpaceMetrics(MetricSet *parent)
- : MetricSet("lid_space", "", "Local document id (lid) space metrics for this document sub DB", parent),
- lidLimit("lid_limit", "", "The size of the allocated lid space", this),
- usedLids("used_lids", "", "The number of lids used", this),
- lowestFreeLid("lowest_free_lid", "", "The lowest free lid", this),
- highestUsedLid("highest_used_lid", "", "The highest used lid", this),
- lidBloatFactor("lid_bloat_factor", "", "The bloat factor of this lid space, indicating the total amount of holes in the allocated lid space "
+ : MetricSet("lid_space", {}, "Local document id (lid) space metrics for this document sub DB", parent),
+ lidLimit("lid_limit", {}, "The size of the allocated lid space", this),
+ usedLids("used_lids", {}, "The number of lids used", this),
+ lowestFreeLid("lowest_free_lid", {}, "The lowest free lid", this),
+ highestUsedLid("highest_used_lid", {}, "The highest used lid", this),
+ lidBloatFactor("lid_bloat_factor", {}, "The bloat factor of this lid space, indicating the total amount of holes in the allocated lid space "
"((lid_limit - used_lids) / lid_limit)", this),
- lidFragmentationFactor("lid_fragmentation_factor", "",
+ lidFragmentationFactor("lid_fragmentation_factor", {},
"The fragmentation factor of this lid space, indicating the amount of holes in the currently used part of the lid space "
"((highest_used_lid - used_lids) / highest_used_lid)", this)
{
@@ -55,22 +55,22 @@ DocumentDBTaggedMetrics::SubDBMetrics::LidSpaceMetrics::LidSpaceMetrics(MetricSe
DocumentDBTaggedMetrics::SubDBMetrics::LidSpaceMetrics::~LidSpaceMetrics() = default;
DocumentDBTaggedMetrics::SubDBMetrics::DocumentStoreMetrics::CacheMetrics::CacheMetrics(MetricSet *parent)
- : MetricSet("cache", "", "Document store cache metrics", parent),
- memoryUsage("memory_usage", "", "Memory usage of the cache (in bytes)", this),
- elements("elements", "", "Number of elements in the cache", this),
- hitRate("hit_rate", "", "Rate of hits in the cache compared to number of lookups", this),
- lookups("lookups", "", "Number of lookups in the cache (hits + misses)", this),
- invalidations("invalidations", "", "Number of invalidations (erased elements) in the cache. ", this)
+ : MetricSet("cache", {}, "Document store cache metrics", parent),
+ memoryUsage("memory_usage", {}, "Memory usage of the cache (in bytes)", this),
+ elements("elements", {}, "Number of elements in the cache", this),
+ hitRate("hit_rate", {}, "Rate of hits in the cache compared to number of lookups", this),
+ lookups("lookups", {}, "Number of lookups in the cache (hits + misses)", this),
+ invalidations("invalidations", {}, "Number of invalidations (erased elements) in the cache. ", this)
{
}
DocumentDBTaggedMetrics::SubDBMetrics::DocumentStoreMetrics::CacheMetrics::~CacheMetrics() = default;
DocumentDBTaggedMetrics::SubDBMetrics::DocumentStoreMetrics::DocumentStoreMetrics(MetricSet *parent)
- : MetricSet("document_store", "", "Document store metrics for this document sub DB", parent),
- diskUsage("disk_usage", "", "Disk space usage in bytes", this),
- diskBloat("disk_bloat", "", "Disk space bloat in bytes", this),
- maxBucketSpread("max_bucket_spread", "", "Max bucket spread in underlying files (sum(unique buckets in each chunk)/unique buckets in file)", this),
+ : MetricSet("document_store", {}, "Document store metrics for this document sub DB", parent),
+ diskUsage("disk_usage", {}, "Disk space usage in bytes", this),
+ diskBloat("disk_bloat", {}, "Disk space bloat in bytes", this),
+ maxBucketSpread("max_bucket_spread", {}, "Max bucket spread in underlying files (sum(unique buckets in each chunk)/unique buckets in file)", this),
memoryUsage(this),
cache(this)
{
@@ -79,7 +79,7 @@ DocumentDBTaggedMetrics::SubDBMetrics::DocumentStoreMetrics::DocumentStoreMetric
DocumentDBTaggedMetrics::SubDBMetrics::DocumentStoreMetrics::~DocumentStoreMetrics() = default;
DocumentDBTaggedMetrics::AttributeMetrics::AttributeMetrics(MetricSet *parent)
- : MetricSet("attribute", "", "Attribute vector metrics for this document db", parent),
+ : MetricSet("attribute", {}, "Attribute vector metrics for this document db", parent),
resourceUsage(this),
totalMemoryUsage(this)
{
@@ -88,22 +88,22 @@ DocumentDBTaggedMetrics::AttributeMetrics::AttributeMetrics(MetricSet *parent)
DocumentDBTaggedMetrics::AttributeMetrics::~AttributeMetrics() = default;
DocumentDBTaggedMetrics::AttributeMetrics::ResourceUsageMetrics::ResourceUsageMetrics(MetricSet *parent)
- : MetricSet("resource_usage", "", "Usage metrics for various attribute vector resources", parent),
- enumStore("enum_store", "", "The highest relative amount of enum store address space used among "
+ : MetricSet("resource_usage", {}, "Usage metrics for various attribute vector resources", parent),
+ enumStore("enum_store", {}, "The highest relative amount of enum store address space used among "
"all enumerated attribute vectors in this document db (value in the range [0, 1])", this),
- multiValue("multi_value", "", "The highest relative amount of multi-value address space used among "
+ multiValue("multi_value", {}, "The highest relative amount of multi-value address space used among "
"all multi-value attribute vectors in this document db (value in the range [0, 1])", this),
- feedingBlocked("feeding_blocked", "", "Whether feeding is blocked due to attribute resource limits being reached (value is either 0 or 1)", this)
+ feedingBlocked("feeding_blocked", {}, "Whether feeding is blocked due to attribute resource limits being reached (value is either 0 or 1)", this)
{
}
DocumentDBTaggedMetrics::AttributeMetrics::ResourceUsageMetrics::~ResourceUsageMetrics() = default;
DocumentDBTaggedMetrics::IndexMetrics::IndexMetrics(MetricSet *parent)
- : MetricSet("index", "", "Index metrics (memory and disk) for this document db", parent),
- diskUsage("disk_usage", "", "Disk space usage in bytes", this),
+ : MetricSet("index", {}, "Index metrics (memory and disk) for this document db", parent),
+ diskUsage("disk_usage", {}, "Disk space usage in bytes", this),
memoryUsage(this),
- docsInMemory("docs_in_memory", "", "Number of documents in memory index", this)
+ docsInMemory("docs_in_memory", {}, "Number of documents in memory index", this)
{
}
@@ -124,14 +124,14 @@ DocumentDBTaggedMetrics::MatchingMetrics::update(const MatchingStats &stats)
}
DocumentDBTaggedMetrics::MatchingMetrics::MatchingMetrics(MetricSet *parent)
- : MetricSet("matching", "", "Matching metrics", parent),
- docsMatched("docs_matched", "", "Number of documents matched", this),
- docsRanked("docs_ranked", "", "Number of documents ranked (first phase)", this),
- docsReRanked("docs_reranked", "", "Number of documents re-ranked (second phase)", this),
- queries("queries", "", "Number of queries executed", this),
- softDoomFactor("soft_doom_factor", "", "Factor used to compute soft-timeout", this),
- queryCollateralTime("query_collateral_time", "", "Average time (sec) spent setting up and tearing down queries", this),
- queryLatency("query_latency", "", "Average latency (sec) when matching a query", this)
+ : MetricSet("matching", {}, "Matching metrics", parent),
+ docsMatched("docs_matched", {}, "Number of documents matched", this),
+ docsRanked("docs_ranked", {}, "Number of documents ranked (first phase)", this),
+ docsReRanked("docs_reranked", {}, "Number of documents re-ranked (second phase)", this),
+ queries("queries", {}, "Number of queries executed", this),
+ softDoomFactor("soft_doom_factor", {}, "Factor used to compute soft-timeout", this),
+ queryCollateralTime("query_collateral_time", {}, "Average time (sec) spent setting up and tearing down queries", this),
+ queryLatency("query_latency", {}, "Average latency (sec) when matching a query", this)
{
}
@@ -141,16 +141,16 @@ DocumentDBTaggedMetrics::MatchingMetrics::RankProfileMetrics::RankProfileMetrics
size_t numDocIdPartitions,
MetricSet *parent)
: MetricSet("rank_profile", {{"rankProfile", name}}, "Rank profile metrics", parent),
- docsMatched("docs_matched", "", "Number of documents matched", this),
- docsRanked("docs_ranked", "", "Number of documents ranked (first phase)", this),
- docsReRanked("docs_reranked", "", "Number of documents re-ranked (second phase)", this),
- queries("queries", "", "Number of queries executed", this),
- limitedQueries("limited_queries", "", "Number of queries limited in match phase", this),
- matchTime("match_time", "", "Average time (sec) for matching a query", this),
- groupingTime("grouping_time", "", "Average time (sec) spent on grouping", this),
- rerankTime("rerank_time", "", "Average time (sec) spent on 2nd phase ranking", this),
- queryCollateralTime("query_collateral_time", "", "Average time (sec) spent setting up and tearing down queries", this),
- queryLatency("query_latency", "", "Average latency (sec) when matching a query", this)
+ docsMatched("docs_matched", {}, "Number of documents matched", this),
+ docsRanked("docs_ranked", {}, "Number of documents ranked (first phase)", this),
+ docsReRanked("docs_reranked", {}, "Number of documents re-ranked (second phase)", this),
+ queries("queries", {}, "Number of queries executed", this),
+ limitedQueries("limited_queries", {}, "Number of queries limited in match phase", this),
+ matchTime("match_time", {}, "Average time (sec) for matching a query", this),
+ groupingTime("grouping_time", {}, "Average time (sec) spent on grouping", this),
+ rerankTime("rerank_time", {}, "Average time (sec) spent on 2nd phase ranking", this),
+ queryCollateralTime("query_collateral_time", {}, "Average time (sec) spent setting up and tearing down queries", this),
+ queryLatency("query_latency", {}, "Average latency (sec) when matching a query", this)
{
for (size_t i = 0; i < numDocIdPartitions; ++i) {
vespalib::string partition(vespalib::make_string("docid_part%02ld", i));
@@ -162,11 +162,11 @@ DocumentDBTaggedMetrics::MatchingMetrics::RankProfileMetrics::~RankProfileMetric
DocumentDBTaggedMetrics::MatchingMetrics::RankProfileMetrics::DocIdPartition::DocIdPartition(const vespalib::string &name, MetricSet *parent) :
MetricSet("docid_partition", {{"docidPartition", name}}, "DocId Partition profile metrics", parent),
- docsMatched("docs_matched", "", "Number of documents matched", this),
- docsRanked("docs_ranked", "", "Number of documents ranked (first phase)", this),
- docsReRanked("docs_reranked", "", "Number of documents re-ranked (second phase)", this),
- activeTime("active_time", "", "Time (sec) spent doing actual work", this),
- waitTime("wait_time", "", "Time (sec) spent waiting for other external threads and resources", this)
+ docsMatched("docs_matched", {}, "Number of documents matched", this),
+ docsRanked("docs_ranked", {}, "Number of documents ranked (first phase)", this),
+ docsReRanked("docs_reranked", {}, "Number of documents re-ranked (second phase)", this),
+ activeTime("active_time", {}, "Time (sec) spent doing actual work", this),
+ waitTime("wait_time", {}, "Time (sec) spent waiting for other external threads and resources", this)
{ }
DocumentDBTaggedMetrics::MatchingMetrics::RankProfileMetrics::DocIdPartition::~DocIdPartition() = default;
@@ -215,7 +215,7 @@ DocumentDBTaggedMetrics::MatchingMetrics::RankProfileMetrics::update(const Match
}
DocumentDBTaggedMetrics::SessionCacheMetrics::SessionCacheMetrics(metrics::MetricSet *parent)
- : metrics::MetricSet("session_cache", "", "Metrics for session caches (search / grouping requests)", parent),
+ : metrics::MetricSet("session_cache", {}, "Metrics for session caches (search / grouping requests)", parent),
search("search", this),
grouping("grouping", this)
{
@@ -224,11 +224,11 @@ DocumentDBTaggedMetrics::SessionCacheMetrics::SessionCacheMetrics(metrics::Metri
DocumentDBTaggedMetrics::SessionCacheMetrics::~SessionCacheMetrics() = default;
DocumentDBTaggedMetrics::DocumentsMetrics::DocumentsMetrics(metrics::MetricSet *parent)
- : metrics::MetricSet("documents", "", "Metrics for various document counts in this document db", parent),
- active("active", "", "The number of active / searchable documents in this document db", this),
- ready("ready", "", "The number of ready documents in this document db", this),
- total("total", "", "The total number of documents in this documents db (ready + not-ready)", this),
- removed("removed", "", "The number of removed documents in this document db", this)
+ : metrics::MetricSet("documents", {}, "Metrics for various document counts in this document db", parent),
+ active("active", {}, "The number of active / searchable documents in this document db", this),
+ ready("ready", {}, "The number of ready documents in this document db", this),
+ total("total", {}, "The total number of documents in this documents db (ready + not-ready)", this),
+ removed("removed", {}, "The number of removed documents in this document db", this)
{
}
@@ -247,7 +247,7 @@ DocumentDBTaggedMetrics::DocumentDBTaggedMetrics(const vespalib::string &docType
sessionCache(this),
documents(this),
totalMemoryUsage(this),
- totalDiskUsage("disk_usage", "", "The total disk usage (in bytes) for this document db", this)
+ totalDiskUsage("disk_usage", {}, "The total disk usage (in bytes) for this document db", this)
{
}
diff --git a/searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.cpp b/searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.cpp
index c5296aa3b1f..710c072aa53 100644
--- a/searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.cpp
+++ b/searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.cpp
@@ -13,10 +13,10 @@ ExecutorMetrics::update(const vespalib::ThreadStackExecutorBase::Stats &stats)
}
ExecutorMetrics::ExecutorMetrics(const std::string &name, metrics::MetricSet *parent)
- : metrics::MetricSet(name, "", "Instance specific thread executor metrics", parent),
- maxPending("maxpending", "", "Maximum number of pending (active + queued) tasks", this),
- accepted("accepted", "", "Number of accepted tasks", this),
- rejected("rejected", "", "Number of rejected tasks", this)
+ : metrics::MetricSet(name, {}, "Instance specific thread executor metrics", parent),
+ maxPending("maxpending", {}, "Maximum number of pending (active + queued) tasks", this),
+ accepted("accepted", {}, "Number of accepted tasks", this),
+ rejected("rejected", {}, "Number of rejected tasks", this)
{
}
diff --git a/searchcore/src/vespa/searchcore/proton/metrics/executor_threading_service_metrics.cpp b/searchcore/src/vespa/searchcore/proton/metrics/executor_threading_service_metrics.cpp
index 2b7908633c9..e7c11bd7dd5 100644
--- a/searchcore/src/vespa/searchcore/proton/metrics/executor_threading_service_metrics.cpp
+++ b/searchcore/src/vespa/searchcore/proton/metrics/executor_threading_service_metrics.cpp
@@ -6,7 +6,7 @@
namespace proton {
ExecutorThreadingServiceMetrics::ExecutorThreadingServiceMetrics(const std::string &name, metrics::MetricSet *parent)
- : metrics::MetricSet(name, "", "Instance specific threading service metrics", parent),
+ : metrics::MetricSet(name, {}, "Instance specific threading service metrics", parent),
master("master", this),
index("index", this),
summary("summary", this),
diff --git a/searchcore/src/vespa/searchcore/proton/metrics/legacy_attribute_metrics.cpp b/searchcore/src/vespa/searchcore/proton/metrics/legacy_attribute_metrics.cpp
index 25dfb3d71ab..7d182e5ccc5 100644
--- a/searchcore/src/vespa/searchcore/proton/metrics/legacy_attribute_metrics.cpp
+++ b/searchcore/src/vespa/searchcore/proton/metrics/legacy_attribute_metrics.cpp
@@ -5,9 +5,9 @@
namespace proton {
LegacyAttributeMetrics::List::Entry::Entry(const std::string &name)
- : metrics::MetricSet(name, "", "Attribute vector metrics", 0),
- memoryUsage("memoryusage", "", "Memory usage", this),
- bitVectors("bitvectors", "", "Number of bitvectors", this)
+ : metrics::MetricSet(name, {}, "Attribute vector metrics", 0),
+ memoryUsage("memoryusage", {}, "Memory usage", this),
+ bitVectors("bitvectors", {}, "Number of bitvectors", this)
{
}
@@ -56,7 +56,7 @@ LegacyAttributeMetrics::List::release()
}
LegacyAttributeMetrics::List::List(metrics::MetricSet *parent)
- : metrics::MetricSet("list", "", "Metrics per attribute vector", parent),
+ : metrics::MetricSet("list", {}, "Metrics per attribute vector", parent),
metrics()
{
}
@@ -64,10 +64,10 @@ LegacyAttributeMetrics::List::List(metrics::MetricSet *parent)
LegacyAttributeMetrics::List::~List() = default;
LegacyAttributeMetrics::LegacyAttributeMetrics(metrics::MetricSet *parent)
- : metrics::MetricSet("attributes", "", "Attribute metrics", parent),
+ : metrics::MetricSet("attributes", {}, "Attribute metrics", parent),
list(this),
- memoryUsage("memoryusage", "", "Memory usage for attributes", this),
- bitVectors("bitvectors", "", "Number of bitvectors for attributes", this)
+ memoryUsage("memoryusage", {}, "Memory usage for attributes", this),
+ bitVectors("bitvectors", {}, "Number of bitvectors for attributes", this)
{
}
diff --git a/searchcore/src/vespa/searchcore/proton/metrics/legacy_documentdb_metrics.cpp b/searchcore/src/vespa/searchcore/proton/metrics/legacy_documentdb_metrics.cpp
index 3b24dcdc1d1..d4180c4ec5f 100644
--- a/searchcore/src/vespa/searchcore/proton/metrics/legacy_documentdb_metrics.cpp
+++ b/searchcore/src/vespa/searchcore/proton/metrics/legacy_documentdb_metrics.cpp
@@ -13,21 +13,21 @@ namespace proton {
using matching::MatchingStats;
LegacyDocumentDBMetrics::IndexMetrics::IndexMetrics(MetricSet *parent)
- : MetricSet("index", "", "Index metrics", parent),
- memoryUsage("memoryusage", "", "Memory usage for memory indexes", this),
- docsInMemory("docsinmemory", "", "Number of documents in memory", this),
- diskUsage("diskusage", "", "Disk usage for disk indexes", this)
+ : MetricSet("index", {}, "Index metrics", parent),
+ memoryUsage("memoryusage", {}, "Memory usage for memory indexes", this),
+ docsInMemory("docsinmemory", {}, "Number of documents in memory", this),
+ diskUsage("diskusage", {}, "Disk usage for disk indexes", this)
{ }
LegacyDocumentDBMetrics::IndexMetrics::~IndexMetrics() {}
LegacyDocumentDBMetrics::DocstoreMetrics::DocstoreMetrics(MetricSet *parent)
- : MetricSet("docstore", "", "Document store metrics", parent),
- memoryUsage("memoryusage", "", "Memory usage for docstore", this),
- cacheLookups("cachelookups", "", "Number of lookups in summary cache", this),
- cacheHitRate("cachehitrate", "", "Rate of cache hits in summary cache", this),
- cacheElements("cacheelements", "", "Number of elements in summary cache", this),
- cacheMemoryUsed("cachememoryused", "", "Memory used by summary cache", this)
+ : MetricSet("docstore", {}, "Document store metrics", parent),
+ memoryUsage("memoryusage", {}, "Memory usage for docstore", this),
+ cacheLookups("cachelookups", {}, "Number of lookups in summary cache", this),
+ cacheHitRate("cachehitrate", {}, "Rate of cache hits in summary cache", this),
+ cacheElements("cacheelements", {}, "Number of elements in summary cache", this),
+ cacheMemoryUsed("cachememoryused", {}, "Memory used by summary cache", this)
{ }
LegacyDocumentDBMetrics::DocstoreMetrics::~DocstoreMetrics() {}
@@ -47,26 +47,26 @@ LegacyDocumentDBMetrics::MatchingMetrics::update(const MatchingStats &stats)
}
LegacyDocumentDBMetrics::MatchingMetrics::MatchingMetrics(MetricSet *parent)
- : MetricSet("matching", "", "Matching metrics", parent),
- docsMatched("docsmatched", "", "Number of documents matched", this),
- docsRanked("docsranked", "", "Number of documents ranked (first phase)", this),
- docsReRanked("docsreranked", "", "Number of documents re-ranked (second phase)", this),
- queries("queries", "", "Number of queries executed", this),
- softDoomFactor("softdoomfactor", "", "Factor used to compute soft-timeout", this),
- queryCollateralTime("querycollateraltime", "", "Average time spent setting up and tearing down queries", this),
- queryLatency("querylatency", "", "Average latency when matching a query", this)
+ : MetricSet("matching", {}, "Matching metrics", parent),
+ docsMatched("docsmatched", {}, "Number of documents matched", this),
+ docsRanked("docsranked", {}, "Number of documents ranked (first phase)", this),
+ docsReRanked("docsreranked", {}, "Number of documents re-ranked (second phase)", this),
+ queries("queries", {}, "Number of queries executed", this),
+ softDoomFactor("softdoomfactor", {}, "Factor used to compute soft-timeout", this),
+ queryCollateralTime("querycollateraltime", {}, "Average time spent setting up and tearing down queries", this),
+ queryLatency("querylatency", {}, "Average latency when matching a query", this)
{ }
LegacyDocumentDBMetrics::MatchingMetrics::~MatchingMetrics() {}
LegacyDocumentDBMetrics::MatchingMetrics::RankProfileMetrics::RankProfileMetrics(
const std::string &name, size_t numDocIdPartitions, MetricSet *parent)
- : MetricSet(name, "", "Rank profile metrics", parent),
- queries("queries", "", "Number of queries executed", this),
- limited_queries("limitedqueries", "", "Number of queries limited in match phase", this),
- matchTime("match_time", "", "Average time for matching a query", this),
- groupingTime("grouping_time", "", "Average time spent on grouping", this),
- rerankTime("rerank_time", "", "Average time spent on 2nd phase ranking", this)
+ : MetricSet(name, {}, "Rank profile metrics", parent),
+ queries("queries", {}, "Number of queries executed", this),
+ limited_queries("limitedqueries", {}, "Number of queries limited in match phase", this),
+ matchTime("match_time", {}, "Average time for matching a query", this),
+ groupingTime("grouping_time", {}, "Average time spent on grouping", this),
+ rerankTime("rerank_time", {}, "Average time spent on 2nd phase ranking", this)
{
for (size_t i=0; i < numDocIdPartitions; i++) {
vespalib::string s(make_string("docid_part%02ld", i));
@@ -77,12 +77,12 @@ LegacyDocumentDBMetrics::MatchingMetrics::RankProfileMetrics::RankProfileMetrics
LegacyDocumentDBMetrics::MatchingMetrics::RankProfileMetrics::~RankProfileMetrics() {}
LegacyDocumentDBMetrics::MatchingMetrics::RankProfileMetrics::DocIdPartition::DocIdPartition(const std::string &name, MetricSet *parent) :
- MetricSet(name, "", "DocId Partition profile metrics", parent),
- docsMatched("docsmatched", "", "Number of documents matched", this),
- docsRanked("docsranked", "", "Number of documents ranked (first phase)", this),
- docsReRanked("docsreranked", "", "Number of documents re-ranked (second phase)", this),
- active_time("activetime", "", "Time spent doing actual work", this),
- wait_time("waittime", "", "Time spent waiting for other external threads and resources", this)
+ MetricSet(name, {}, "DocId Partition profile metrics", parent),
+ docsMatched("docsmatched", {}, "Number of documents matched", this),
+ docsRanked("docsranked", {}, "Number of documents ranked (first phase)", this),
+ docsReRanked("docsreranked", {}, "Number of documents re-ranked (second phase)", this),
+ active_time("activetime", {}, "Time spent doing actual work", this),
+ wait_time("waittime", {}, "Time spent waiting for other external threads and resources", this)
{ }
LegacyDocumentDBMetrics::MatchingMetrics::RankProfileMetrics::DocIdPartition::~DocIdPartition() {}
@@ -126,14 +126,14 @@ LegacyDocumentDBMetrics::MatchingMetrics::RankProfileMetrics::update(const Match
}
LegacyDocumentDBMetrics::SubDBMetrics::DocumentMetaStoreMetrics::DocumentMetaStoreMetrics(MetricSet *parent)
- : MetricSet("docmetastore", "", "Document meta store metrics", parent),
- lidLimit("lidlimit", "", "The size of the allocated lid space", this),
- usedLids("usedlids", "", "The number of lids used", this),
- lowestFreeLid("lowestfreelid", "", "The lowest free lid", this),
- highestUsedLid("highestusedlid", "", "The highest used lid", this),
- lidBloatFactor("lidbloatfactor", "", "The bloat factor of this lid space, indicating the total amount of holes in the allocated lid space "
+ : MetricSet("docmetastore", {}, "Document meta store metrics", parent),
+ lidLimit("lidlimit", {}, "The size of the allocated lid space", this),
+ usedLids("usedlids", {}, "The number of lids used", this),
+ lowestFreeLid("lowestfreelid", {}, "The lowest free lid", this),
+ highestUsedLid("highestusedlid", {}, "The highest used lid", this),
+ lidBloatFactor("lidbloatfactor", {}, "The bloat factor of this lid space, indicating the total amount of holes in the allocated lid space "
"((lidlimit - usedlids) / lidlimit)", this),
- lidFragmentationFactor("lid_fragmentation_factor", "",
+ lidFragmentationFactor("lid_fragmentation_factor", {},
"The fragmentation factor of this lid space, indicating the amount of holes in the currently used part of the lid space "
"((highestusedlid - usedlids) / highestusedlid)", this)
{
@@ -142,7 +142,7 @@ LegacyDocumentDBMetrics::SubDBMetrics::DocumentMetaStoreMetrics::DocumentMetaSto
LegacyDocumentDBMetrics::SubDBMetrics::DocumentMetaStoreMetrics::~DocumentMetaStoreMetrics() {}
LegacyDocumentDBMetrics::SubDBMetrics::SubDBMetrics(const vespalib::string &name, MetricSet *parent)
- : MetricSet(name, "", "Sub database metrics", parent),
+ : MetricSet(name, {}, "Sub database metrics", parent),
attributes(this),
docMetaStore(this)
{ }
@@ -150,7 +150,7 @@ LegacyDocumentDBMetrics::SubDBMetrics::SubDBMetrics(const vespalib::string &name
LegacyDocumentDBMetrics::SubDBMetrics::~SubDBMetrics() {}
LegacyDocumentDBMetrics::LegacyDocumentDBMetrics(const std::string &docTypeName, size_t maxNumThreads)
- : MetricSet(make_string("%s", docTypeName.c_str()), "", "Document DB Metrics", 0),
+ : MetricSet(make_string("%s", docTypeName.c_str()), {}, "Document DB Metrics", 0),
index(this),
attributes(this),
docstore(this),
@@ -162,13 +162,13 @@ LegacyDocumentDBMetrics::LegacyDocumentDBMetrics(const std::string &docTypeName,
ready("ready", this),
notReady("notready", this),
removed("removed", this),
- memoryUsage("memoryusage", "", "Memory usage for this Document DB", this),
- numDocs("numdocs", "", "Number of ready/indexed documents in this Document DB (aka number of documents in the 'ready' sub db)", this),
- numActiveDocs("numactivedocs", "", "Number of active/searchable documents in this Document DB (aka number of active/searchable documents in the 'ready' sub db)", this),
- numIndexedDocs("numindexeddocs", "", "Number of ready/indexed documents in this Document DB (aka number of documents in the 'ready' sub db)", this),
- numStoredDocs("numstoreddocs", "", "Total number of documents stored in this Document DB (aka number of documents in the 'ready' and 'notready' sub dbs)", this),
- numRemovedDocs("numremoveddocs", "", "Number of removed documents in this Document DB (aka number of documents in the 'removed' sub db)", this),
- numBadConfigs("numBadConfigs", "", "Number of bad configs for this Document DB", this),
+ memoryUsage("memoryusage", {}, "Memory usage for this Document DB", this),
+ numDocs("numdocs", {}, "Number of ready/indexed documents in this Document DB (aka number of documents in the 'ready' sub db)", this),
+ numActiveDocs("numactivedocs", {}, "Number of active/searchable documents in this Document DB (aka number of active/searchable documents in the 'ready' sub db)", this),
+ numIndexedDocs("numindexeddocs", {}, "Number of ready/indexed documents in this Document DB (aka number of documents in the 'ready' sub db)", this),
+ numStoredDocs("numstoreddocs", {}, "Total number of documents stored in this Document DB (aka number of documents in the 'ready' and 'notready' sub dbs)", this),
+ numRemovedDocs("numremoveddocs", {}, "Number of removed documents in this Document DB (aka number of documents in the 'removed' sub db)", this),
+ numBadConfigs("numBadConfigs", {}, "Number of bad configs for this Document DB", this),
_maxNumThreads(maxNumThreads)
{
memoryUsage.addMetricToSum(index.memoryUsage);
diff --git a/searchcore/src/vespa/searchcore/proton/metrics/legacy_proton_metrics.cpp b/searchcore/src/vespa/searchcore/proton/metrics/legacy_proton_metrics.cpp
index 9b7015a9f61..5c0285967e9 100644
--- a/searchcore/src/vespa/searchcore/proton/metrics/legacy_proton_metrics.cpp
+++ b/searchcore/src/vespa/searchcore/proton/metrics/legacy_proton_metrics.cpp
@@ -5,34 +5,34 @@
namespace proton {
LegacyProtonMetrics::DocumentTypeMetrics::DocumentTypeMetrics(metrics::MetricSet *parent)
- : metrics::MetricSet("doctypes", "", "Metrics per document type", parent)
+ : metrics::MetricSet("doctypes", {}, "Metrics per document type", parent)
{
}
LegacyProtonMetrics::DocumentTypeMetrics::~DocumentTypeMetrics() { }
LegacyProtonMetrics::LegacyProtonMetrics()
- : metrics::MetricSet("proton", "", "Search engine metrics", 0),
+ : metrics::MetricSet("proton", {}, "Search engine metrics", 0),
docTypes(this),
executor("executor", this),
flushExecutor("flushexecutor", this),
matchExecutor("matchexecutor", this),
summaryExecutor("summaryexecutor", this),
- memoryUsage("memoryusage", "logdefault", "Total tracked memory usage", this),
- diskUsage("diskusage", "logdefault", "Total tracked disk usage for disk indexes", this),
- docsInMemory("docsinmemory", "logdefault", "Total Number of documents in memory", this),
- numDocs("numdocs", "logdefault", "Total number of ready/indexed documents among all document dbs (equal as numindexeddocs)", this),
- numActiveDocs("numactivedocs", "logdefault",
+ memoryUsage("memoryusage", {{"logdefault"}}, "Total tracked memory usage", this),
+ diskUsage("diskusage", {{"logdefault"}}, "Total tracked disk usage for disk indexes", this),
+ docsInMemory("docsinmemory", {{"logdefault"}}, "Total Number of documents in memory", this),
+ numDocs("numdocs", {{"logdefault"}}, "Total number of ready/indexed documents among all document dbs (equal as numindexeddocs)", this),
+ numActiveDocs("numactivedocs", {{"logdefault"}},
"Total number of active/searchable documents among all document dbs", this),
- numIndexedDocs("numindexeddocs", "logdefault",
+ numIndexedDocs("numindexeddocs", {{"logdefault"}},
"Total number of ready/indexed documents among all document dbs (equal as numdocs)", this),
- numStoredDocs("numstoreddocs", "logdefault",
+ numStoredDocs("numstoreddocs", {{"logdefault"}},
"Total number of stored documents among all document dbs", this),
- numRemovedDocs("numremoveddocs", "logdefault",
+ numRemovedDocs("numremoveddocs", {{"logdefault"}},
"Total number of removed documents among all document dbs", this)
{
// supply start value to support sum without any document types
- metrics::LongValueMetric start("start", "", "", 0);
+ metrics::LongValueMetric start("start", {}, "", 0);
memoryUsage.setStartValue(start);
diskUsage.setStartValue(start);
docsInMemory.setStartValue(start);
diff --git a/searchcore/src/vespa/searchcore/proton/metrics/legacy_sessionmanager_metrics.cpp b/searchcore/src/vespa/searchcore/proton/metrics/legacy_sessionmanager_metrics.cpp
index 097398f42ad..6d780739848 100644
--- a/searchcore/src/vespa/searchcore/proton/metrics/legacy_sessionmanager_metrics.cpp
+++ b/searchcore/src/vespa/searchcore/proton/metrics/legacy_sessionmanager_metrics.cpp
@@ -5,12 +5,12 @@
namespace proton {
LegacySessionManagerMetrics::LegacySessionManagerMetrics(metrics::MetricSet *parent)
- : metrics::MetricSet("sessionmanager", "", "Grouping session manager metrics", parent),
- numInsert("numinsert", "", "Number of inserted sessions", this),
- numPick("numpick", "", "Number if picked sessions", this),
- numDropped("numdropped", "", "Number of dropped cached sessions", this),
- numCached("numcached", "", "Number of currently cached sessions", this),
- numTimedout("numtimedout", "", "Number of timed out sessions", this)
+ : metrics::MetricSet("sessionmanager", {}, "Grouping session manager metrics", parent),
+ numInsert("numinsert", {}, "Number of inserted sessions", this),
+ numPick("numpick", {}, "Number if picked sessions", this),
+ numDropped("numdropped", {}, "Number of dropped cached sessions", this),
+ numCached("numcached", {}, "Number of currently cached sessions", this),
+ numTimedout("numtimedout", {}, "Number of timed out sessions", this)
{
}
diff --git a/searchcore/src/vespa/searchcore/proton/metrics/memory_usage_metrics.cpp b/searchcore/src/vespa/searchcore/proton/metrics/memory_usage_metrics.cpp
index 7a5d62b52f7..b675e80920f 100644
--- a/searchcore/src/vespa/searchcore/proton/metrics/memory_usage_metrics.cpp
+++ b/searchcore/src/vespa/searchcore/proton/metrics/memory_usage_metrics.cpp
@@ -6,11 +6,11 @@
namespace proton {
MemoryUsageMetrics::MemoryUsageMetrics(metrics::MetricSet *parent)
- : metrics::MetricSet("memory_usage", "", "The memory usage for a given component", parent),
- _allocatedBytes("allocated_bytes", "", "The number of allocated bytes", this),
- _usedBytes("used_bytes", "", "The number of used bytes (<= allocatedbytes)", this),
- _deadBytes("dead_bytes", "", "The number of dead bytes (<= usedbytes)", this),
- _onHoldBytes("onhold_bytes", "", "The number of bytes on hold", this)
+ : metrics::MetricSet("memory_usage", {}, "The memory usage for a given component", parent),
+ _allocatedBytes("allocated_bytes", {}, "The number of allocated bytes", this),
+ _usedBytes("used_bytes", {}, "The number of used bytes (<= allocatedbytes)", this),
+ _deadBytes("dead_bytes", {}, "The number of dead bytes (<= usedbytes)", this),
+ _onHoldBytes("onhold_bytes", {}, "The number of bytes on hold", this)
{
}
diff --git a/searchcore/src/vespa/searchcore/proton/metrics/resource_usage_metrics.cpp b/searchcore/src/vespa/searchcore/proton/metrics/resource_usage_metrics.cpp
index d944287243a..43e4e4d3f75 100644
--- a/searchcore/src/vespa/searchcore/proton/metrics/resource_usage_metrics.cpp
+++ b/searchcore/src/vespa/searchcore/proton/metrics/resource_usage_metrics.cpp
@@ -5,14 +5,14 @@
namespace proton {
ResourceUsageMetrics::ResourceUsageMetrics(metrics::MetricSet *parent)
- : MetricSet("resource_usage", "", "Usage metrics for various resources in this search engine", parent),
- disk("disk", "", "The relative amount of disk space used on this machine (value in the range [0, 1])", this),
- diskUtilization("disk_utilization", "", "The relative amount of disk used compared to the disk resource limit", this),
- memory("memory", "", "The relative amount of memory used by this process (value in the range [0, 1])", this),
- memoryUtilization("memory_utilization", "", "The relative amount of memory used compared to the memory resource limit", this),
- memoryMappings("memory_mappings", "", "The number of mapped memory areas", this),
- openFileDescriptors("open_file_descriptors", "", "The number of open files", this),
- feedingBlocked("feeding_blocked", "", "Whether feeding is blocked due to resource limits being reached (value is either 0 or 1)", this)
+ : MetricSet("resource_usage", {}, "Usage metrics for various resources in this search engine", parent),
+ disk("disk", {}, "The relative amount of disk space used on this machine (value in the range [0, 1])", this),
+ diskUtilization("disk_utilization", {}, "The relative amount of disk used compared to the disk resource limit", this),
+ memory("memory", {}, "The relative amount of memory used by this process (value in the range [0, 1])", this),
+ memoryUtilization("memory_utilization", {}, "The relative amount of memory used compared to the memory resource limit", this),
+ memoryMappings("memory_mappings", {}, "The number of mapped memory areas", this),
+ openFileDescriptors("open_file_descriptors", {}, "The number of open files", this),
+ feedingBlocked("feeding_blocked", {}, "Whether feeding is blocked due to resource limits being reached (value is either 0 or 1)", this)
{
}
diff --git a/searchcore/src/vespa/searchcore/proton/metrics/sessionmanager_metrics.cpp b/searchcore/src/vespa/searchcore/proton/metrics/sessionmanager_metrics.cpp
index 5fc41acf33c..82ec8ad485b 100644
--- a/searchcore/src/vespa/searchcore/proton/metrics/sessionmanager_metrics.cpp
+++ b/searchcore/src/vespa/searchcore/proton/metrics/sessionmanager_metrics.cpp
@@ -6,12 +6,12 @@
namespace proton {
SessionManagerMetrics::SessionManagerMetrics(const vespalib::string &name, metrics::MetricSet *parent)
- : metrics::MetricSet(name, "", vespalib::make_string("Session manager cache metrics for %s", name.c_str()), parent),
- numInsert("num_insert", "", "Number of inserted sessions", this),
- numPick("num_pick", "", "Number if picked sessions", this),
- numDropped("num_dropped", "", "Number of dropped cached sessions", this),
- numCached("num_cached", "", "Number of currently cached sessions", this),
- numTimedout("num_timedout", "", "Number of timed out sessions", this)
+ : metrics::MetricSet(name, {}, vespalib::make_string("Session manager cache metrics for %s", name.c_str()), parent),
+ numInsert("num_insert", {}, "Number of inserted sessions", this),
+ numPick("num_pick", {}, "Number if picked sessions", this),
+ numDropped("num_dropped", {}, "Number of dropped cached sessions", this),
+ numCached("num_cached", {}, "Number of currently cached sessions", this),
+ numTimedout("num_timedout", {}, "Number of timed out sessions", this)
{
}
diff --git a/searchcore/src/vespa/searchcore/proton/metrics/trans_log_server_metrics.cpp b/searchcore/src/vespa/searchcore/proton/metrics/trans_log_server_metrics.cpp
index c2624719d81..a6e8ac54e86 100644
--- a/searchcore/src/vespa/searchcore/proton/metrics/trans_log_server_metrics.cpp
+++ b/searchcore/src/vespa/searchcore/proton/metrics/trans_log_server_metrics.cpp
@@ -11,9 +11,9 @@ TransLogServerMetrics::DomainMetrics::DomainMetrics(metrics::MetricSet *parent,
const vespalib::string &documentType)
: metrics::MetricSet("transactionlog", {{"documenttype", documentType}},
"Transaction log metrics for a document type", parent),
- entries("entries", "", "The current number of entries in the transaction log", this),
- diskUsage("disk_usage", "", "The disk usage (in bytes) of the transaction log", this),
- replayTime("replay_time", "", "The replay time (in seconds) of the transaction log during start-up", this)
+ entries("entries", {}, "The current number of entries in the transaction log", this),
+ diskUsage("disk_usage", {}, "The disk usage (in bytes) of the transaction log", this),
+ replayTime("replay_time", {}, "The replay time (in seconds) of the transaction log during start-up", this)
{
}
diff --git a/searchcore/src/vespa/searchcore/proton/summaryengine/summaryengine.cpp b/searchcore/src/vespa/searchcore/proton/summaryengine/summaryengine.cpp
index 7497ae0bf2f..9744b24a74c 100644
--- a/searchcore/src/vespa/searchcore/proton/summaryengine/summaryengine.cpp
+++ b/searchcore/src/vespa/searchcore/proton/summaryengine/summaryengine.cpp
@@ -47,10 +47,10 @@ uint32_t getNumDocs(const DocsumReply &reply) {
namespace proton {
SummaryEngine::DocsumMetrics::DocsumMetrics()
- : metrics::MetricSet("docsum", "", "Docsum metrics", nullptr),
- count("count", "logdefault", "Docsum requests handled", this),
- docs("docs", "logdefault", "Total docsums returned", this),
- latency("latency", "logdefault", "Docsum request latency", this)
+ : metrics::MetricSet("docsum", {}, "Docsum metrics", nullptr),
+ count("count", {{"logdefault"}}, "Docsum requests handled", this),
+ docs("docs", {{"logdefault"}}, "Total docsums returned", this),
+ latency("latency", {{"logdefault"}}, "Docsum request latency", this)
{
}
diff --git a/searchlib/src/vespa/searchlib/engine/transport_metrics.cpp b/searchlib/src/vespa/searchlib/engine/transport_metrics.cpp
index d291f968379..62d2b9d5489 100644
--- a/searchlib/src/vespa/searchlib/engine/transport_metrics.cpp
+++ b/searchlib/src/vespa/searchlib/engine/transport_metrics.cpp
@@ -5,26 +5,26 @@
namespace search::engine {
TransportMetrics::QueryMetrics::QueryMetrics(metrics::MetricSet *parent)
- : metrics::MetricSet("query", "", "Query metrics", parent),
- count("count", "logdefault", "Query requests handled", this),
- latency("latency", "logdefault", "Query request latency", this)
+ : metrics::MetricSet("query", {}, "Query metrics", parent),
+ count("count", {{"logdefault"}}, "Query requests handled", this),
+ latency("latency", {{"logdefault"}}, "Query request latency", this)
{
}
TransportMetrics::QueryMetrics::~QueryMetrics() = default;
TransportMetrics::DocsumMetrics::DocsumMetrics(metrics::MetricSet *parent)
- : metrics::MetricSet("docsum", "", "Docsum metrics", parent),
- count("count", "logdefault", "Docsum requests handled", this),
- docs("docs", "logdefault", "Total docsums returned", this),
- latency("latency", "logdefault", "Docsum request latency", this)
+ : metrics::MetricSet("docsum", {}, "Docsum metrics", parent),
+ count("count", {{"logdefault"}}, "Docsum requests handled", this),
+ docs("docs", {{"logdefault"}}, "Total docsums returned", this),
+ latency("latency", {{"logdefault"}}, "Docsum request latency", this)
{
}
TransportMetrics::DocsumMetrics::~DocsumMetrics() = default;
TransportMetrics::TransportMetrics()
- : metrics::MetricSet("transport", "", "Transport server metrics", nullptr),
+ : metrics::MetricSet("transport", {}, "Transport server metrics", nullptr),
updateLock(),
query(this),
docsum(this)
diff --git a/storage/src/tests/common/metricstest.cpp b/storage/src/tests/common/metricstest.cpp
index 9d2f566f770..867d132031e 100644
--- a/storage/src/tests/common/metricstest.cpp
+++ b/storage/src/tests/common/metricstest.cpp
@@ -97,7 +97,7 @@ void MetricsTest::setUp() {
_metricManager.reset(new metrics::MetricManager(
std::unique_ptr<metrics::MetricManager::Timer>(
new MetricClock(*_clock))));
- _topSet.reset(new metrics::MetricSet("vds", "", ""));
+ _topSet.reset(new metrics::MetricSet("vds", {}, ""));
{
metrics::MetricLockGuard guard(_metricManager->getMetricLock());
_metricManager->registerMetric(guard, *_topSet);
diff --git a/storage/src/tests/storageserver/statereportertest.cpp b/storage/src/tests/storageserver/statereportertest.cpp
index f4bf7685225..d0cdf41823b 100644
--- a/storage/src/tests/storageserver/statereportertest.cpp
+++ b/storage/src/tests/storageserver/statereportertest.cpp
@@ -88,7 +88,7 @@ void StateReporterTest::setUp() {
_metricManager.reset(new metrics::MetricManager(
std::unique_ptr<metrics::MetricManager::Timer>(
new MetricClock(*_clock))));
- _topSet.reset(new metrics::MetricSet("vds", "", ""));
+ _topSet.reset(new metrics::MetricSet("vds", {}, ""));
{
metrics::MetricLockGuard guard(_metricManager->getMetricLock());
_metricManager->registerMetric(guard, *_topSet);
diff --git a/storage/src/vespa/storage/bucketdb/bucketmanagermetrics.cpp b/storage/src/vespa/storage/bucketdb/bucketmanagermetrics.cpp
index b95fb6b814c..a0f5f2f7ec9 100644
--- a/storage/src/vespa/storage/bucketdb/bucketmanagermetrics.cpp
+++ b/storage/src/vespa/storage/bucketdb/bucketmanagermetrics.cpp
@@ -10,12 +10,12 @@ using vespalib::IllegalStateException;
using vespalib::make_string;
DataStoredMetrics::DataStoredMetrics(const std::string& name, metrics::MetricSet* owner)
- : metrics::MetricSet(name, "partofsum yamasdefault", "", owner),
- buckets("buckets", "", "buckets managed", this),
- docs("docs", "", "documents stored", this),
- bytes("bytes", "", "bytes stored", this),
- active("activebuckets", "", "Number of active buckets on the node", this),
- ready("readybuckets", "", "Number of ready buckets on the node", this)
+ : metrics::MetricSet(name, {{"partofsum"},{"yamasdefault"}}, "", owner),
+ buckets("buckets", {}, "buckets managed", this),
+ docs("docs", {}, "documents stored", this),
+ bytes("bytes", {}, "bytes stored", this),
+ active("activebuckets", {}, "Number of active buckets on the node", this),
+ ready("readybuckets", {}, "Number of ready buckets on the node", this)
{
docs.logOnlyIfSet();
bytes.logOnlyIfSet();
@@ -26,15 +26,15 @@ DataStoredMetrics::DataStoredMetrics(const std::string& name, metrics::MetricSet
DataStoredMetrics::~DataStoredMetrics() { }
BucketManagerMetrics::BucketManagerMetrics()
- : metrics::MetricSet("datastored", "", ""),
+ : metrics::MetricSet("datastored", {}, ""),
disks(),
- total("alldisks", "sum", "Sum of data stored metrics for all disks", this),
- simpleBucketInfoRequestSize("simplebucketinforeqsize", "",
+ total("alldisks", {{"sum"}}, "Sum of data stored metrics for all disks", this),
+ simpleBucketInfoRequestSize("simplebucketinforeqsize", {},
"Amount of buckets returned in simple bucket info requests",
this),
- fullBucketInfoRequestSize("fullbucketinforeqsize", "",
+ fullBucketInfoRequestSize("fullbucketinforeqsize", {},
"Amount of distributors answered at once in full bucket info requests.", this),
- fullBucketInfoLatency("fullbucketinfolatency", "",
+ fullBucketInfoLatency("fullbucketinfolatency", {},
"Amount of time spent to process a full bucket info request", this)
{ }
diff --git a/storage/src/vespa/storage/bucketdb/storagebucketdbinitializer.cpp b/storage/src/vespa/storage/bucketdb/storagebucketdbinitializer.cpp
index d553b41de7c..84352df5ec9 100644
--- a/storage/src/vespa/storage/bucketdb/storagebucketdbinitializer.cpp
+++ b/storage/src/vespa/storage/bucketdb/storagebucketdbinitializer.cpp
@@ -93,26 +93,26 @@ StorageBucketDBInitializer::System::getBucketDatabase(document::BucketSpace buck
}
StorageBucketDBInitializer::Metrics::Metrics(framework::Component& component)
- : metrics::MetricSet("dbinit", "",
+ : metrics::MetricSet("dbinit", {},
"Metrics for the storage bucket database initializer"),
- _wrongDisk("wrongdisk", "",
+ _wrongDisk("wrongdisk", {},
"Number of buckets found on non-ideal disk.", this),
- _insertedCount("insertedcount", "",
+ _insertedCount("insertedcount", {},
"Number of buckets inserted into database in list step.", this),
- _joinedCount("joinedcount", "",
+ _joinedCount("joinedcount", {},
"Number of buckets found in list step already found "
"(added from other disks).", this),
- _infoReadCount("infocount", "",
+ _infoReadCount("infocount", {},
"Number of buckets we have read bucket information from.", this),
- _infoSetByLoad("infosetbyload", "",
+ _infoSetByLoad("infosetbyload", {},
"Number of buckets we did not need to request bucket info for "
"due to load already having updated them.", this),
- _dirsListed("dirslisted", "",
+ _dirsListed("dirslisted", {},
"Directories listed in list step of initialization.", this),
_startTime(component.getClock()),
- _listLatency("listlatency", "",
+ _listLatency("listlatency", {},
"Time used until list phase is done. (in ms)", this),
- _initLatency("initlatency", "",
+ _initLatency("initlatency", {},
"Time used until initialization is complete. (in ms)", this)
{
component.registerMetric(*this);
diff --git a/storage/src/vespa/storage/distributor/distributormetricsset.cpp b/storage/src/vespa/storage/distributor/distributormetricsset.cpp
index 761c5c45889..b7725559b1d 100644
--- a/storage/src/vespa/storage/distributor/distributormetricsset.cpp
+++ b/storage/src/vespa/storage/distributor/distributormetricsset.cpp
@@ -8,7 +8,7 @@ namespace storage {
using metrics::MetricSet;
DistributorMetricSet::DistributorMetricSet(const metrics::LoadTypeSet& lt)
- : MetricSet("distributor", "distributor", ""),
+ : MetricSet("distributor", {{"distributor"}}, ""),
puts(lt, PersistenceOperationMetricSet("puts"), this),
updates(lt, PersistenceOperationMetricSet("updates"), this),
update_puts(lt, PersistenceOperationMetricSet("update_puts"), this),
@@ -19,18 +19,20 @@ DistributorMetricSet::DistributorMetricSet(const metrics::LoadTypeSet& lt)
stats(lt, PersistenceOperationMetricSet("stats"), this),
multioperations(lt, PersistenceOperationMetricSet("multioperations"), this),
visits(lt, VisitorMetricSet(), this),
- stateTransitionTime("state_transition_time", "",
+ stateTransitionTime("state_transition_time", {},
"Time it takes to complete a cluster state transition. If a "
"state transition is preempted before completing, its elapsed "
"time is counted as part of the total time spent for the final, "
"completed state transition", this),
- recoveryModeTime("recoverymodeschedulingtime", "",
+ recoveryModeTime("recoverymodeschedulingtime", {},
"Time spent scheduling operations in recovery mode "
"after receiving new cluster state", this),
- docsStored("docsstored", "logdefault yamasdefault",
+ docsStored("docsstored",
+ {{"logdefault"},{"yamasdefault"}},
"Number of documents stored in all buckets controlled by "
"this distributor", this),
- bytesStored("bytesstored", "logdefault yamasdefault",
+ bytesStored("bytesstored",
+ {{"logdefault"},{"yamasdefault"}},
"Number of bytes stored in all buckets controlled by "
"this distributor", this)
{
diff --git a/storage/src/vespa/storage/distributor/idealstatemetricsset.cpp b/storage/src/vespa/storage/distributor/idealstatemetricsset.cpp
index 6d9607f2cd9..d72f4a80ef4 100644
--- a/storage/src/vespa/storage/distributor/idealstatemetricsset.cpp
+++ b/storage/src/vespa/storage/distributor/idealstatemetricsset.cpp
@@ -5,11 +5,17 @@ namespace storage {
namespace distributor {
-OperationMetricSet::OperationMetricSet(const std::string& name, const std::string& tags, const std::string& description, MetricSet* owner)
+OperationMetricSet::OperationMetricSet(const std::string& name, metrics::Metric::Tags tags, const std::string& description, MetricSet* owner)
: MetricSet(name, tags, description, owner),
- pending("pending", "logdefault yamasdefault", "The number of operations pending", this),
- ok("done_ok", "logdefault yamasdefault", "The number of operations successfully performed", this),
- failed("done_failed", "logdefault yamasdefault", "The number of operations that failed", this)
+ pending("pending",
+ {{"logdefault"},{"yamasdefault"}},
+ "The number of operations pending", this),
+ ok("done_ok",
+ {{"logdefault"},{"yamasdefault"}},
+ "The number of operations successfully performed", this),
+ failed("done_failed",
+ {{"logdefault"},{"yamasdefault"}},
+ "The number of operations that failed", this)
{ }
OperationMetricSet::~OperationMetricSet() { }
@@ -19,47 +25,58 @@ IdealStateMetricSet::createOperationMetrics() {
typedef IdealStateOperation ISO;
operations.resize(ISO::OPERATION_COUNT);
operations[ISO::DELETE_BUCKET] = std::shared_ptr<OperationMetricSet>(
- new OperationMetricSet("delete_bucket", "logdefault yamasdefault",
+ new OperationMetricSet("delete_bucket",
+ {{"logdefault"},{"yamasdefault"}},
"Operations to delete excess buckets on storage nodes", this));
operations[ISO::MERGE_BUCKET] = std::shared_ptr<OperationMetricSet>(
- new OperationMetricSet("merge_bucket", "logdefault yamasdefault",
+ new OperationMetricSet("merge_bucket",
+ {{"logdefault"},{"yamasdefault"}},
"Operations to merge buckets that are out of sync", this));
operations[ISO::SPLIT_BUCKET] = std::shared_ptr<OperationMetricSet>(
- new OperationMetricSet("split_bucket", "logdefault yamasdefault",
+ new OperationMetricSet("split_bucket",
+ {{"logdefault"},{"yamasdefault"}},
"Operations to split buckets that are larger than the configured size", this));
operations[ISO::JOIN_BUCKET] = std::shared_ptr<OperationMetricSet>(
- new OperationMetricSet("join_bucket", "logdefault yamasdefault",
+ new OperationMetricSet("join_bucket",
+ {{"logdefault"},{"yamasdefault"}},
"Operations to join buckets that in sum are smaller than the configured size", this));
operations[ISO::SET_BUCKET_STATE] = std::shared_ptr<OperationMetricSet>(
new OperationMetricSet("set_bucket_state",
- "logdefault yamasdefault",
+ {{"logdefault"},{"yamasdefault"}},
"Operations to set active/ready state for bucket copies", this));
operations[ISO::GARBAGE_COLLECTION] = std::shared_ptr<OperationMetricSet>(
new OperationMetricSet("garbage_collection",
- "logdefault yamasdefault",
+ {{"logdefault"},{"yamasdefault"}},
"Operations to garbage collect data from buckets", this));
}
IdealStateMetricSet::IdealStateMetricSet()
- : MetricSet("idealstate", "idealstate", "Statistics for ideal state generation"),
- idealstate_diff("idealstate_diff", "logdefault yamasdefault",
+ : MetricSet("idealstate", {{"idealstate"}}, "Statistics for ideal state generation"),
+ idealstate_diff("idealstate_diff",
+ {{"logdefault"},{"yamasdefault"}},
"A number representing the current difference from the ideal "
"state. This is a number that decreases steadily as the system "
"is getting closer to the ideal state", this),
- buckets_toofewcopies("buckets_toofewcopies", "logdefault yamasdefault",
+ buckets_toofewcopies("buckets_toofewcopies",
+ {{"logdefault"},{"yamasdefault"}},
"The number of buckets the distributor controls that have less "
"than the desired redundancy", this),
- buckets_toomanycopies("buckets_toomanycopies", "logdefault yamasdefault",
+ buckets_toomanycopies("buckets_toomanycopies",
+ {{"logdefault"},{"yamasdefault"}},
"The number of buckets the distributor controls that have more "
"than the desired redundancy", this),
- buckets("buckets", "logdefault yamasdefault", "The number of buckets the distributor controls", this),
- buckets_notrusted("buckets_notrusted", "logdefault yamasdefault",
+ buckets("buckets",
+ {{"logdefault"},{"yamasdefault"}},
+ "The number of buckets the distributor controls", this),
+ buckets_notrusted("buckets_notrusted",
+ {{"logdefault"},{"yamasdefault"}},
"The number of buckets that have no trusted copies.", this),
- buckets_rechecking("buckets_rechecking", "logdefault yamasdefault",
+ buckets_rechecking("buckets_rechecking",
+ {{"logdefault"},{"yamasdefault"}},
"The number of buckets that we are rechecking for "
"ideal state operations", this),
- startOperationsLatency("start_operations_latency", "", "Time used in startOperations()", this),
- nodesPerMerge("nodes_per_merge", "", "The number of nodes involved in a single merge operation.", this)
+ startOperationsLatency("start_operations_latency", {}, "Time used in startOperations()", this),
+ nodesPerMerge("nodes_per_merge", {}, "The number of nodes involved in a single merge operation.", this)
{
createOperationMetrics();
}
diff --git a/storage/src/vespa/storage/distributor/idealstatemetricsset.h b/storage/src/vespa/storage/distributor/idealstatemetricsset.h
index cd88ab672d3..7bb472b4a2c 100644
--- a/storage/src/vespa/storage/distributor/idealstatemetricsset.h
+++ b/storage/src/vespa/storage/distributor/idealstatemetricsset.h
@@ -15,7 +15,7 @@ public:
metrics::LongCountMetric ok;
metrics::LongCountMetric failed;
- OperationMetricSet(const std::string& name, const std::string& tags, const std::string& description, MetricSet* owner);
+ OperationMetricSet(const std::string& name, metrics::Metric::Tags tags, const std::string& description, MetricSet* owner);
~OperationMetricSet();
};
diff --git a/storage/src/vespa/storage/distributor/persistence_operation_metric_set.cpp b/storage/src/vespa/storage/distributor/persistence_operation_metric_set.cpp
index 30fa2797ef4..d3ae5d547ed 100644
--- a/storage/src/vespa/storage/distributor/persistence_operation_metric_set.cpp
+++ b/storage/src/vespa/storage/distributor/persistence_operation_metric_set.cpp
@@ -10,24 +10,24 @@ namespace storage {
using metrics::MetricSet;
PersistenceFailuresMetricSet::PersistenceFailuresMetricSet(MetricSet* owner)
- : MetricSet("failures", "", "Detailed failure statistics", owner),
- sum("total", "logdefault yamasdefault", "Sum of all failures", this),
- notready("notready", "", "The number of operations discarded because distributor was not ready", this),
- notconnected("notconnected", "", "The number of operations discarded because there were no available storage nodes to send to", this),
- wrongdistributor("wrongdistributor", "", "The number of operations discarded because they were sent to the wrong distributor", this),
- safe_time_not_reached("safe_time_not_reached", "",
+ : MetricSet("failures", {}, "Detailed failure statistics", owner),
+ sum("total", {{"logdefault"},{"yamasdefault"}}, "Sum of all failures", this),
+ notready("notready", {}, "The number of operations discarded because distributor was not ready", this),
+ notconnected("notconnected", {}, "The number of operations discarded because there were no available storage nodes to send to", this),
+ wrongdistributor("wrongdistributor", {}, "The number of operations discarded because they were sent to the wrong distributor", this),
+ safe_time_not_reached("safe_time_not_reached", {},
"The number of operations that were transiently"
" failed due to them arriving before the safe "
"time point for bucket ownership handovers has "
"passed", this),
- storagefailure("storagefailure", "", "The number of operations that failed in storage", this),
- timeout("timeout", "", "The number of operations that failed because the operation timed out towards storage", this),
- busy("busy", "", "The number of messages from storage that failed because the storage node was busy", this),
- inconsistent_bucket("inconsistent_bucket", "",
+ storagefailure("storagefailure", {}, "The number of operations that failed in storage", this),
+ timeout("timeout", {}, "The number of operations that failed because the operation timed out towards storage", this),
+ busy("busy", {}, "The number of messages from storage that failed because the storage node was busy", this),
+ inconsistent_bucket("inconsistent_bucket", {},
"The number of operations failed due to buckets "
"being in an inconsistent state or not found", this),
- notfound("notfound", "", "The number of operations that failed because the document did not exist", this),
- concurrent_mutations("concurrent_mutations", "", "The number of operations that were transiently failed due "
+ notfound("notfound", {}, "The number of operations that failed because the document did not exist", this),
+ concurrent_mutations("concurrent_mutations", {}, "The number of operations that were transiently failed due "
"to a mutating operation already being in progress for its document ID", this)
{
sum.addMetricToSum(notready);
@@ -55,9 +55,9 @@ PersistenceFailuresMetricSet::clone(std::vector<Metric::UP>& ownerList, CopyType
}
PersistenceOperationMetricSet::PersistenceOperationMetricSet(const std::string& name, MetricSet* owner)
- : MetricSet(name, "", vespalib::make_string("Statistics for the %s command", name.c_str()), owner),
- latency("latency", "yamasdefault", vespalib::make_string("The average latency of %s operations", name.c_str()), this),
- ok("ok", "logdefault yamasdefault", vespalib::make_string("The number of successful %s operations performed", name.c_str()), this),
+ : MetricSet(name, {}, vespalib::make_string("Statistics for the %s command", name.c_str()), owner),
+ latency("latency", {{"yamasdefault"}}, vespalib::make_string("The average latency of %s operations", name.c_str()), this),
+ ok("ok", {{"logdefault"},{"yamasdefault"}}, vespalib::make_string("The number of successful %s operations performed", name.c_str()), this),
failures(this)
{ }
diff --git a/storage/src/vespa/storage/distributor/visitormetricsset.cpp b/storage/src/vespa/storage/distributor/visitormetricsset.cpp
index 999ab2d577f..84b1174962c 100644
--- a/storage/src/vespa/storage/distributor/visitormetricsset.cpp
+++ b/storage/src/vespa/storage/distributor/visitormetricsset.cpp
@@ -10,13 +10,13 @@ using metrics::MetricSet;
VisitorMetricSet::VisitorMetricSet(MetricSet* owner)
: PersistenceOperationMetricSet("visitor", owner),
- buckets_per_visitor("buckets_per_visitor", "",
+ buckets_per_visitor("buckets_per_visitor", {},
"The number of sub buckets visited as part of a "
"single client visitor command", this),
- docs_per_visitor("docs_per_visitor", "",
+ docs_per_visitor("docs_per_visitor", {},
"The number of documents visited on content nodes as "
"part of a single client visitor command", this),
- bytes_per_visitor("bytes_per_visitor", "",
+ bytes_per_visitor("bytes_per_visitor", {},
"The number of bytes visited on content nodes as part "
"of a single client visitor command", this)
{
diff --git a/storage/src/vespa/storage/persistence/filestorage/filestormetrics.cpp b/storage/src/vespa/storage/persistence/filestorage/filestormetrics.cpp
index 52d95e9a3ed..0be046b2e9e 100644
--- a/storage/src/vespa/storage/persistence/filestorage/filestormetrics.cpp
+++ b/storage/src/vespa/storage/persistence/filestorage/filestormetrics.cpp
@@ -10,11 +10,11 @@ using metrics::MetricSet;
using metrics::LoadTypeSet;
FileStorThreadMetrics::Op::Op(const std::string& id, const std::string& name, MetricSet* owner)
- : MetricSet(id, "", name + " load in filestor thread", owner),
+ : MetricSet(id, {}, name + " load in filestor thread", owner),
_name(name),
- count("count", "yamasdefault", "Number of requests processed.", this),
- latency("latency", "yamasdefault", "Latency of successful requests.", this),
- failed("failed", "yamasdefault", "Number of failed requests.", this)
+ count("count", {{"yamasdefault"}}, "Number of requests processed.", this),
+ latency("latency", {{"yamasdefault"}}, "Latency of successful requests.", this),
+ failed("failed", {{"yamasdefault"}}, "Number of failed requests.", this)
{ }
FileStorThreadMetrics::Op::~Op() = default;
@@ -34,7 +34,7 @@ FileStorThreadMetrics::Op::clone(std::vector<Metric::UP>& ownerList,
template <typename BaseOp>
FileStorThreadMetrics::OpWithRequestSize<BaseOp>::OpWithRequestSize(const std::string& id, const std::string& name, MetricSet* owner)
: BaseOp(id, name, owner),
- request_size("request_size", "", "Size of requests, in bytes", this)
+ request_size("request_size", {}, "Size of requests, in bytes", this)
{
}
@@ -59,8 +59,9 @@ FileStorThreadMetrics::OpWithRequestSize<BaseOp>::clone(
FileStorThreadMetrics::OpWithNotFound::OpWithNotFound(const std::string& id, const std::string& name, MetricSet* owner)
: Op(id, name, owner),
- notFound("not_found", "", "Number of requests that could not be "
- "completed due to source document not found.", this)
+ notFound("not_found", {},
+ "Number of requests that could not be completed due to source document not found.",
+ this)
{ }
FileStorThreadMetrics::OpWithNotFound::~OpWithNotFound() = default;
@@ -81,7 +82,7 @@ FileStorThreadMetrics::OpWithNotFound::clone(std::vector<Metric::UP>& ownerList,
FileStorThreadMetrics::Update::Update(MetricSet* owner)
: OpWithRequestSize("update", "Update", owner),
- latencyRead("latency_read", "", "Latency of the source read in the request.", this)
+ latencyRead("latency_read", {}, "Latency of the source read in the request.", this)
{ }
FileStorThreadMetrics::Update::~Update() = default;
@@ -100,7 +101,7 @@ FileStorThreadMetrics::Update::clone(std::vector<Metric::UP>& ownerList,
FileStorThreadMetrics::Visitor::Visitor(MetricSet* owner)
: Op("visit", "Visit", owner),
- documentsPerIterate("docs", "", "Number of entries read per iterate call", this)
+ documentsPerIterate("docs", {}, "Number of entries read per iterate call", this)
{ }
FileStorThreadMetrics::Visitor::~Visitor() = default;
@@ -118,9 +119,9 @@ FileStorThreadMetrics::Visitor::clone(std::vector<Metric::UP>& ownerList,
}
FileStorThreadMetrics::FileStorThreadMetrics(const std::string& name, const std::string& desc, const LoadTypeSet& lt)
- : MetricSet(name, "filestor partofsum", desc),
- operations("operations", "", "Number of operations processed.", this),
- failedOperations("failedoperations", "", "Number of operations throwing exceptions.", this),
+ : MetricSet(name, {{"filestor"},{"partofsum"}}, desc),
+ operations("operations", {}, "Number of operations processed.", this),
+ failedOperations("failedoperations", {}, "Number of operations throwing exceptions.", this),
put(lt, OpWithRequestSize<Op>("put", "Put"), this),
get(lt, OpWithRequestSize<OpWithNotFound>("get", "Get"), this),
remove(lt, OpWithRequestSize<OpWithNotFound>("remove", "Remove"), this),
@@ -128,13 +129,13 @@ FileStorThreadMetrics::FileStorThreadMetrics(const std::string& name, const std:
statBucket(lt, Op("stat_bucket", "Stat bucket"), this),
update(lt, Update(), this),
revert(lt, OpWithNotFound("revert", "Revert"), this),
- createIterator("createiterator", "", this),
+ createIterator("createiterator", {}, this),
visit(lt, Visitor(), this),
multiOp(lt, Op("multioperations", "The number of multioperations that have been created"), this),
createBuckets("createbuckets", "Number of buckets that has been created.", this),
deleteBuckets("deletebuckets", "Number of buckets that has been deleted.", this),
repairs("bucketverified", "Number of times buckets have been checked.", this),
- repairFixed("bucketfixed", "", "Number of times bucket has been fixed because of corruption", this),
+ repairFixed("bucketfixed", {}, "Number of times bucket has been fixed because of corruption", this),
recheckBucketInfo("recheckbucketinfo",
"Number of times bucket info has been explicitly "
"rechecked due to buckets being marked modified by "
@@ -151,24 +152,24 @@ FileStorThreadMetrics::FileStorThreadMetrics(const std::string& name, const std:
mergeBuckets("mergebuckets", "Number of times buckets have been merged.", this),
getBucketDiff("getbucketdiff", "Number of getbucketdiff commands that have been processed.", this),
applyBucketDiff("applybucketdiff", "Number of applybucketdiff commands that have been processed.", this),
- bytesMerged("bytesmerged", "", "Total number of bytes merged into this node.", this),
- getBucketDiffReply("getbucketdiffreply", "", "Number of getbucketdiff replies that have been processed.", this),
- applyBucketDiffReply("applybucketdiffreply", "", "Number of applybucketdiff replies that have been processed.", this),
- mergeLatencyTotal("mergelatencytotal", "",
+ bytesMerged("bytesmerged", {}, "Total number of bytes merged into this node.", this),
+ getBucketDiffReply("getbucketdiffreply", {}, "Number of getbucketdiff replies that have been processed.", this),
+ applyBucketDiffReply("applybucketdiffreply", {}, "Number of applybucketdiff replies that have been processed.", this),
+ mergeLatencyTotal("mergelatencytotal", {},
"Latency of total merge operation, from master node receives "
"it, until merge is complete and master node replies.", this),
- mergeMetadataReadLatency("mergemetadatareadlatency", "",
+ mergeMetadataReadLatency("mergemetadatareadlatency", {},
"Latency of time used in a merge step to check metadata of "
"current node to see what data it has.", this),
- mergeDataReadLatency("mergedatareadlatency", "",
+ mergeDataReadLatency("mergedatareadlatency", {},
"Latency of time used in a merge step to read data other "
"nodes need.", this),
- mergeDataWriteLatency("mergedatawritelatency", "",
+ mergeDataWriteLatency("mergedatawritelatency", {},
"Latency of time used in a merge step to write data needed to "
"current node.", this),
- mergeAverageDataReceivedNeeded("mergeavgdatareceivedneeded", "", "Amount of data transferred from previous node "
+ mergeAverageDataReceivedNeeded("mergeavgdatareceivedneeded", {}, "Amount of data transferred from previous node "
"in chain that we needed to apply locally.", this),
- batchingSize("batchingsize", "", "Number of operations batched per bucket (only counts "
+ batchingSize("batchingsize", {}, "Number of operations batched per bucket (only counts "
"batches of size > 1)", this)
{ }
@@ -176,9 +177,9 @@ FileStorThreadMetrics::~FileStorThreadMetrics() = default;
FileStorStripeMetrics::FileStorStripeMetrics(const std::string& name, const std::string& description,
const LoadTypeSet& loadTypes)
- : MetricSet(name, "partofsum", description),
+ : MetricSet(name, {{"partofsum"}}, description),
averageQueueWaitingTime(loadTypes,
- metrics::DoubleAverageMetric("averagequeuewait", "",
+ metrics::DoubleAverageMetric("averagequeuewait", {},
"Average time an operation spends in input queue."),
this)
{
@@ -188,19 +189,19 @@ FileStorStripeMetrics::~FileStorStripeMetrics() = default;
FileStorDiskMetrics::FileStorDiskMetrics(const std::string& name, const std::string& description,
const metrics::LoadTypeSet& loadTypes, MetricSet* owner)
- : MetricSet(name, "partofsum", description, owner),
- sumThreads("allthreads", "sum", "", this),
- sumStripes("allstripes", "sum", "", this),
+ : MetricSet(name, {{"partofsum"}}, description, owner),
+ sumThreads("allthreads", {{"sum"}}, "", this),
+ sumStripes("allstripes", {{"sum"}}, "", this),
averageQueueWaitingTime(loadTypes,
- metrics::DoubleAverageMetric("averagequeuewait", "",
+ metrics::DoubleAverageMetric("averagequeuewait", {},
"Average time an operation spends in input queue."),
this),
- queueSize("queuesize", "", "Size of input message queue.", this),
- pendingMerges("pendingmerge", "", "Number of buckets currently being merged.", this),
- waitingForLockHitRate("waitingforlockrate", "",
+ queueSize("queuesize", {}, "Size of input message queue.", this),
+ pendingMerges("pendingmerge", {}, "Number of buckets currently being merged.", this),
+ waitingForLockHitRate("waitingforlockrate", {},
"Amount of times a filestor thread has needed to wait for "
"lock to take next message in queue.", this),
- lockWaitTime("lockwaittime", "", "Amount of time waiting used waiting for lock.", this)
+ lockWaitTime("lockwaittime", {}, "Amount of time waiting used waiting for lock.", this)
{
pendingMerges.unsetOnZeroValue();
waitingForLockHitRate.unsetOnZeroValue();
@@ -236,11 +237,11 @@ FileStorDiskMetrics::initDiskMetrics(const LoadTypeSet& loadTypes, uint32_t numS
}
FileStorMetrics::FileStorMetrics(const LoadTypeSet&)
- : MetricSet("filestor", "filestor", ""),
- sum("alldisks", "sum", "", this),
- directoryEvents("directoryevents", "", "Number of directory events received.", this),
- partitionEvents("partitionevents", "", "Number of partition events received.", this),
- diskEvents("diskevents", "", "Number of disk events received.", this)
+ : MetricSet("filestor", {{"filestor"}}, ""),
+ sum("alldisks", {{"sum"}}, "", this),
+ directoryEvents("directoryevents", {}, "Number of directory events received.", this),
+ partitionEvents("partitionevents", {}, "Number of partition events received.", this),
+ diskEvents("diskevents", {}, "Number of disk events received.", this)
{ }
FileStorMetrics::~FileStorMetrics() = default;
diff --git a/storage/src/vespa/storage/storageserver/bouncer_metrics.cpp b/storage/src/vespa/storage/storageserver/bouncer_metrics.cpp
index 2ee39ad22ec..c0fac35263e 100644
--- a/storage/src/vespa/storage/storageserver/bouncer_metrics.cpp
+++ b/storage/src/vespa/storage/storageserver/bouncer_metrics.cpp
@@ -5,12 +5,12 @@
namespace storage {
BouncerMetrics::BouncerMetrics()
- : MetricSet("bouncer", "", "Metrics for Bouncer component", nullptr),
- clock_skew_aborts("clock_skew_aborts", "", "Number of client operations that were aborted due to "
+ : MetricSet("bouncer", {}, "Metrics for Bouncer component", nullptr),
+ clock_skew_aborts("clock_skew_aborts", {}, "Number of client operations that were aborted due to "
"clock skew between sender and receiver exceeding acceptable range", this)
{
}
BouncerMetrics::~BouncerMetrics() = default;
-} \ No newline at end of file
+}
diff --git a/storage/src/vespa/storage/storageserver/changedbucketownershiphandler.cpp b/storage/src/vespa/storage/storageserver/changedbucketownershiphandler.cpp
index 166aa25bc68..66e0209d4b7 100644
--- a/storage/src/vespa/storage/storageserver/changedbucketownershiphandler.cpp
+++ b/storage/src/vespa/storage/storageserver/changedbucketownershiphandler.cpp
@@ -89,10 +89,10 @@ allDistributorsDownInState(const lib::ClusterState& state) {
}
ChangedBucketOwnershipHandler::Metrics::Metrics(metrics::MetricSet* owner)
- : metrics::MetricSet("changedbucketownershiphandler", "", "", owner),
- averageAbortProcessingTime("avg_abort_processing_time", "", "Average time spent aborting operations for changed buckets", this),
- idealStateOpsAborted("ideal_state_ops_aborted", "", "Number of outdated ideal state operations aborted", this),
- externalLoadOpsAborted("external_load_ops_aborted", "", "Number of outdated external load operations aborted", this)
+ : metrics::MetricSet("changedbucketownershiphandler", {}, "", owner),
+ averageAbortProcessingTime("avg_abort_processing_time", {}, "Average time spent aborting operations for changed buckets", this),
+ idealStateOpsAborted("ideal_state_ops_aborted", {}, "Number of outdated ideal state operations aborted", this),
+ externalLoadOpsAborted("external_load_ops_aborted", {}, "Number of outdated external load operations aborted", this)
{}
ChangedBucketOwnershipHandler::Metrics::~Metrics() { }
diff --git a/storage/src/vespa/storage/storageserver/communicationmanagermetrics.cpp b/storage/src/vespa/storage/storageserver/communicationmanagermetrics.cpp
index 5d2caddb200..5f2bed07f66 100644
--- a/storage/src/vespa/storage/storageserver/communicationmanagermetrics.cpp
+++ b/storage/src/vespa/storage/storageserver/communicationmanagermetrics.cpp
@@ -7,24 +7,24 @@ using namespace metrics;
namespace storage {
CommunicationManagerMetrics::CommunicationManagerMetrics(const LoadTypeSet& loadTypes, MetricSet* owner)
- : MetricSet("communication", "", "Metrics for the communication manager", owner),
- queueSize("messagequeue", "", "Size of input message queue.", this),
+ : MetricSet("communication", {}, "Metrics for the communication manager", owner),
+ queueSize("messagequeue", {}, "Size of input message queue.", this),
messageProcessTime(loadTypes,
- DoubleAverageMetric("messageprocesstime", "",
+ DoubleAverageMetric("messageprocesstime", {},
"Time transport thread uses to process a single message"),
this),
exceptionMessageProcessTime(loadTypes,
- DoubleAverageMetric("exceptionmessageprocesstime", "",
+ DoubleAverageMetric("exceptionmessageprocesstime", {},
"Time transport thread uses to process a single message "
"that fails with an exception thrown into communication manager"),
this),
- failedDueToTooLittleMemory("toolittlememory", "", "Number of messages failed due to too little memory available", this),
- convertToStorageAPIFailures("convertfailures", "",
+ failedDueToTooLittleMemory("toolittlememory", {}, "Number of messages failed due to too little memory available", this),
+ convertToStorageAPIFailures("convertfailures", {},
"Number of messages that failed to get converted to storage API messages", this),
- bucketSpaceMappingFailures("bucket_space_mapping_failures", "",
+ bucketSpaceMappingFailures("bucket_space_mapping_failures", {},
"Number of messages that could not be resolved to a known bucket space", this),
- sendCommandLatency("sendcommandlatency", "", "Average ms used to send commands to MBUS", this),
- sendReplyLatency("sendreplylatency", "", "Average ms used to send replies to MBUS", this)
+ sendCommandLatency("sendcommandlatency", {}, "Average ms used to send commands to MBUS", this),
+ sendReplyLatency("sendreplylatency", {}, "Average ms used to send replies to MBUS", this)
{
}
diff --git a/storage/src/vespa/storage/storageserver/mergethrottler.cpp b/storage/src/vespa/storage/storageserver/mergethrottler.cpp
index a9d54c196c9..92ed01ca5d9 100644
--- a/storage/src/vespa/storage/storageserver/mergethrottler.cpp
+++ b/storage/src/vespa/storage/storageserver/mergethrottler.cpp
@@ -67,26 +67,26 @@ MergeThrottler::ChainedMergeState::ChainedMergeState(const api::StorageMessage::
MergeThrottler::ChainedMergeState::~ChainedMergeState() {}
MergeThrottler::Metrics::Metrics(metrics::MetricSet* owner)
- : metrics::MetricSet("mergethrottler", "", "", owner),
- averageQueueWaitingTime("averagequeuewaitingtime", "", "Average time a merge spends in the throttler queue", this),
- bounced_due_to_back_pressure("bounced_due_to_back_pressure", "", "Number of merges bounced due to resource exhaustion back-pressure", this),
+ : metrics::MetricSet("mergethrottler", {}, "", owner),
+ averageQueueWaitingTime("averagequeuewaitingtime", {}, "Average time a merge spends in the throttler queue", this),
+ bounced_due_to_back_pressure("bounced_due_to_back_pressure", {}, "Number of merges bounced due to resource exhaustion back-pressure", this),
chaining("mergechains", this),
local("locallyexecutedmerges", this)
{ }
MergeThrottler::Metrics::~Metrics() {}
MergeThrottler::MergeFailureMetrics::MergeFailureMetrics(metrics::MetricSet* owner)
- : metrics::MetricSet("failures", "", "Detailed failure statistics", owner),
- sum("total", "", "Sum of all failures", this),
- notready("notready", "", "The number of merges discarded because distributor was not ready", this),
- timeout("timeout", "", "The number of merges that failed because they timed out towards storage", this),
- aborted("aborted", "", "The number of merges that failed because the storage node was (most likely) shutting down", this),
- wrongdistribution("wrongdistribution", "", "The number of merges that were discarded (flushed) because they were initiated at an older cluster state than the current", this),
- bucketnotfound("bucketnotfound", "", "The number of operations that failed because the bucket did not exist", this),
- busy("busy", "", "The number of merges that failed because the storage node was busy", this),
- exists("exists", "", "The number of merges that were rejected due to a merge operation for their bucket already being processed", this),
- rejected("rejected", "", "The number of merges that were rejected", this),
- other("other", "", "The number of other failures", this)
+ : metrics::MetricSet("failures", {}, "Detailed failure statistics", owner),
+ sum("total", {}, "Sum of all failures", this),
+ notready("notready", {}, "The number of merges discarded because distributor was not ready", this),
+ timeout("timeout", {}, "The number of merges that failed because they timed out towards storage", this),
+ aborted("aborted", {}, "The number of merges that failed because the storage node was (most likely) shutting down", this),
+ wrongdistribution("wrongdistribution", {}, "The number of merges that were discarded (flushed) because they were initiated at an older cluster state than the current", this),
+ bucketnotfound("bucketnotfound", {}, "The number of operations that failed because the bucket did not exist", this),
+ busy("busy", {}, "The number of merges that failed because the storage node was busy", this),
+ exists("exists", {}, "The number of merges that were rejected due to a merge operation for their bucket already being processed", this),
+ rejected("rejected", {}, "The number of merges that were rejected", this),
+ other("other", {}, "The number of other failures", this)
{
sum.addMetricToSum(notready);
sum.addMetricToSum(timeout);
@@ -102,8 +102,8 @@ MergeThrottler::MergeFailureMetrics::~MergeFailureMetrics() { }
MergeThrottler::MergeOperationMetrics::MergeOperationMetrics(const std::string& name, metrics::MetricSet* owner)
- : metrics::MetricSet(name, "", vespalib::make_string("Statistics for %s", name.c_str()), owner),
- ok("ok", "", vespalib::make_string("The number of successful merges for '%s'", name.c_str()), this),
+ : metrics::MetricSet(name, {}, vespalib::make_string("Statistics for %s", name.c_str()), owner),
+ ok("ok", {}, vespalib::make_string("The number of successful merges for '%s'", name.c_str()), this),
failures(this)
{
}
diff --git a/storage/src/vespa/storage/storageserver/storagemetricsset.cpp b/storage/src/vespa/storage/storageserver/storagemetricsset.cpp
index fde33d524b8..4ea9a9f9296 100644
--- a/storage/src/vespa/storage/storageserver/storagemetricsset.cpp
+++ b/storage/src/vespa/storage/storageserver/storagemetricsset.cpp
@@ -6,39 +6,39 @@
namespace storage {
MessageMemoryUseMetricSet::MessageMemoryUseMetricSet(metrics::MetricSet* owner)
- : metrics::MetricSet("message_memory_use", "memory", "Message use from storage messages", owner),
- total("total", "memory", "Message use from storage messages", this),
- lowpri("lowpri", "memory", "Message use from low priority storage messages", this),
- normalpri("normalpri", "memory", "Message use from normal priority storage messages", this),
- highpri("highpri", "memory", "Message use from high priority storage messages", this),
- veryhighpri("veryhighpri", "memory", "Message use from very high priority storage messages", this)
+ : metrics::MetricSet("message_memory_use", {{"memory"}}, "Message use from storage messages", owner),
+ total("total", {{"memory"}}, "Message use from storage messages", this),
+ lowpri("lowpri", {{"memory"}}, "Message use from low priority storage messages", this),
+ normalpri("normalpri", {{"memory"}}, "Message use from normal priority storage messages", this),
+ highpri("highpri", {{"memory"}}, "Message use from high priority storage messages", this),
+ veryhighpri("veryhighpri", {{"memory"}}, "Message use from very high priority storage messages", this)
{ }
MessageMemoryUseMetricSet::~MessageMemoryUseMetricSet() {}
DocumentSerializationMetricSet::DocumentSerializationMetricSet(metrics::MetricSet* owner)
- : metrics::MetricSet("document_serialization", "docserialization",
+ : metrics::MetricSet("document_serialization", {{"docserialization"}},
"Counts of document serialization of various types", owner),
usedCachedSerializationCount(
- "cached_serialization_count", "docserialization",
+ "cached_serialization_count", {{"docserialization"}},
"Number of times we didn't need to serialize the document as "
"we already had serialized version cached", this),
compressedDocumentCount(
- "compressed_serialization_count", "docserialization",
+ "compressed_serialization_count", {{"docserialization"}},
"Number of times we compressed document when serializing",
this),
compressionDidntHelpCount(
- "compressed_didnthelp_count", "docserialization",
+ "compressed_didnthelp_count", {{"docserialization"}},
"Number of times we compressed document when serializing, but "
"the compressed version was bigger, so it was dumped", this),
uncompressableCount(
- "uncompressable_serialization_count", "docserialization",
+ "uncompressable_serialization_count", {{"docserialization"}},
"Number of times we didn't attempt compression as document "
"had already been tagged uncompressable", this),
serializedUncompressed(
- "uncompressed_serialization_count", "docserialization",
+ "uncompressed_serialization_count", {{"docserialization"}},
"Number of times we serialized a document uncompressed", this),
inputWronglySerialized(
- "input_wrongly_serialized_count", "docserialization",
+ "input_wrongly_serialized_count", {{"docserialization"}},
"Number of times we reserialized a document because the "
"compression it had in cache did not match what was configured",
this)
@@ -46,11 +46,11 @@ DocumentSerializationMetricSet::DocumentSerializationMetricSet(metrics::MetricSe
DocumentSerializationMetricSet::~DocumentSerializationMetricSet() { }
StorageMetricSet::StorageMetricSet()
- : metrics::MetricSet("server", "memory",
+ : metrics::MetricSet("server", {{"memory"}},
"Metrics for VDS applications"),
- memoryUse("memoryusage", "memory", "", this),
+ memoryUse("memoryusage", {{"memory"}}, "", this),
memoryUse_messages(this),
- memoryUse_visiting("memoryusage_visiting", "memory",
+ memoryUse_visiting("memoryusage_visiting", {{"memory"}},
"Message use from visiting", this),
documentSerialization(this)
{ }
diff --git a/storage/src/vespa/storage/visiting/visitormetrics.cpp b/storage/src/vespa/storage/visiting/visitormetrics.cpp
index e6903dc6f11..191f9fabc60 100644
--- a/storage/src/vespa/storage/visiting/visitormetrics.cpp
+++ b/storage/src/vespa/storage/visiting/visitormetrics.cpp
@@ -7,26 +7,26 @@
namespace storage {
VisitorMetrics::VisitorMetrics()
- : metrics::MetricSet("visitor", "visitor", ""),
- queueSize("cv_queuesize", "", "Size of create visitor queue", this),
- queueSkips("cv_skipqueue", "",
+ : metrics::MetricSet("visitor", {{"visitor"}}, ""),
+ queueSize("cv_queuesize", {}, "Size of create visitor queue", this),
+ queueSkips("cv_skipqueue", {},
"Number of times we could skip queue as we had free visitor "
"spots", this),
- queueFull("cv_queuefull", "",
+ queueFull("cv_queuefull", {},
"Number of create visitor messages failed as queue is full",
this),
- queueWaitTime("cv_queuewaittime", "",
+ queueWaitTime("cv_queuewaittime", {},
"Milliseconds waiting in create visitor queue, for visitors "
"that was added to visitor queue but scheduled later", this),
- queueTimeoutWaitTime("cv_queuetimeoutwaittime", "",
+ queueTimeoutWaitTime("cv_queuetimeoutwaittime", {},
"Milliseconds waiting in create visitor queue, for visitors "
"that timed out while in the visitor quueue", this),
- queueEvictedWaitTime("cv_queueevictedwaittime", "",
+ queueEvictedWaitTime("cv_queueevictedwaittime", {},
"Milliseconds waiting in create visitor queue, for visitors "
"that was evicted from queue due to higher priority visitors "
"coming", this),
threads(),
- sum("allthreads", "sum", "", this)
+ sum("allthreads", {{"sum"}}, "", this)
{
queueSize.unsetOnZeroValue();
}
diff --git a/storage/src/vespa/storage/visiting/visitorthreadmetrics.h b/storage/src/vespa/storage/visiting/visitorthreadmetrics.h
index 991674eaec1..c21fe09cdb4 100644
--- a/storage/src/vespa/storage/visiting/visitorthreadmetrics.h
+++ b/storage/src/vespa/storage/visiting/visitorthreadmetrics.h
@@ -33,68 +33,68 @@ struct VisitorThreadMetrics : public metrics::MetricSet
VisitorThreadMetrics(const std::string& name,
const std::string& desc,
const metrics::LoadTypeSet& loadTypes)
- : metrics::MetricSet(name, "visitor partofsum thread", desc),
- queueSize("queuesize", "",
+ : metrics::MetricSet(name, {{"visitor"},{"partofsum"},{"thread"}}, desc),
+ queueSize("queuesize", {},
"Size of input message queue.", this),
averageQueueWaitingTime(
loadTypes,
DOUBLE("averagequeuewait",
- "",
+ {},
"Average time an operation spends in input queue."),
this),
averageVisitorLifeTime(
loadTypes,
DOUBLE("averagevisitorlifetime",
- "",
+ {},
"Average lifetime of a visitor"),
this),
averageVisitorCreationTime(
loadTypes,
DOUBLE("averagevisitorcreationtime",
- "",
+ {},
"Average time spent creating a visitor instance"),
this),
averageMessageSendTime(
loadTypes,
DOUBLE("averagemessagesendtime",
- "",
+ {},
"Average time it takes for messages to be sent to "
"their target (and be replied to)"),
this),
averageProcessingTime(
loadTypes,
DOUBLE("averageprocessingtime",
- "",
+ {},
"Average time visitor uses in handleDocuments() call"),
this),
createdVisitors(
loadTypes,
COUNT("created",
- "",
+ {},
"Number of visitors created."),
this),
abortedVisitors(
loadTypes,
COUNT("aborted",
- "",
+ {},
"Number of visitors aborted."),
this),
completedVisitors(
loadTypes,
COUNT("completed",
- "",
+ {},
"Number of visitors completed"),
this),
failedVisitors(
loadTypes,
COUNT("failed",
- "",
+ {},
"Number of visitors failed"),
this),
visitorDestinationFailureReplies(
loadTypes,
COUNT("destination_failure_replies",
- "",
+ {},
"Number of failure replies received from "
"the visitor destination"),
this)
diff --git a/storageframework/src/vespa/storageframework/defaultimplementation/component/componentregisterimpl.cpp b/storageframework/src/vespa/storageframework/defaultimplementation/component/componentregisterimpl.cpp
index ae448664f14..fd16f43050a 100644
--- a/storageframework/src/vespa/storageframework/defaultimplementation/component/componentregisterimpl.cpp
+++ b/storageframework/src/vespa/storageframework/defaultimplementation/component/componentregisterimpl.cpp
@@ -10,7 +10,7 @@ namespace storage::framework::defaultimplementation {
ComponentRegisterImpl::ComponentRegisterImpl()
: _componentLock(),
_components(),
- _topMetricSet("vds", "", ""),
+ _topMetricSet("vds", {}, ""),
_hooks(),
_metricManager(nullptr),
_clock(nullptr),