diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2018-04-21 22:36:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-21 22:36:24 +0200 |
commit | 8545327c3b81679860eec19d8ac5ab5fec953734 (patch) | |
tree | 570c0a87eb8491dc6921982dc0e3c30053b528db /searchcore/src/tests/proton/summaryengine/summaryengine.cpp | |
parent | f1c7a5bdb741586598b4ea1b964aff407e1a3065 (diff) | |
parent | 5f241b23e800b3c9ec6c2d195649a9f6a7c63b88 (diff) |
Merge pull request #5649 from vespa-engine/balder/transport-independent-docsum-metrics
Balder/transport independent docsum metrics
Diffstat (limited to 'searchcore/src/tests/proton/summaryengine/summaryengine.cpp')
-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; |