diff options
author | Henning Baldersheim <balder@oath.com> | 2018-04-20 15:03:45 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@oath.com> | 2018-04-20 15:03:45 +0200 |
commit | 699a462e9b66f2882bffd733cf85ee2226e78219 (patch) | |
tree | e3f58017f43994960baa7c0d4b985f15bcc1a7bd /searchcore/src/tests | |
parent | 7cf59fb74a0d1d08708ab60cdd3470a70e4ba261 (diff) |
Add transport independent docsum metrics
Diffstat (limited to 'searchcore/src/tests')
-rw-r--r-- | searchcore/src/tests/proton/summaryengine/summaryengine.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/searchcore/src/tests/proton/summaryengine/summaryengine.cpp b/searchcore/src/tests/proton/summaryengine/summaryengine.cpp index 408ca27c16e..8206eba6350 100644 --- a/searchcore/src/tests/proton/summaryengine/summaryengine.cpp +++ b/searchcore/src/tests/proton/summaryengine/summaryengine.cpp @@ -8,9 +8,12 @@ #include <vespa/vespalib/data/databuffer.h> #include <vespa/vespalib/util/compressor.h> #include <vespa/searchlib/common/transport.h> +#include <vespa/metrics/metricset.h> #include <vespa/fnet/frt/rpcrequest.h> #include <vespa/log/log.h> +#include <vespa/metrics/metrics.h> + LOG_SETUP("summaryengine_test"); using namespace search::engine; @@ -204,6 +207,9 @@ TEST("requireThatCorrectHandlerIsUsed") { EXPECT_TRUE(assertDocsumReply(engine, "bar", "bar reply")); EXPECT_TRUE(assertDocsumReply(engine, "baz", "baz reply")); EXPECT_TRUE(assertDocsumReply(engine, "not", "bar reply")); // uses the first (sorted on name) + EXPECT_EQUAL(4ul, static_cast<metrics::LongCountMetric *>(engine.getMetrics().getMetric("count"))->getValue()); + EXPECT_EQUAL(4ul, static_cast<metrics::LongCountMetric *>(engine.getMetrics().getMetric("docs"))->getValue()); + EXPECT_LESS(0.0, static_cast<metrics::DoubleAverageMetric *>(engine.getMetrics().getMetric("latency"))->getAverage()); } using vespalib::Slime; |