diff options
6 files changed, 41 insertions, 38 deletions
diff --git a/searchlib/src/vespa/searchlib/attribute/createarraystd.cpp b/searchlib/src/vespa/searchlib/attribute/createarraystd.cpp index 0c312a6fe6a..a9b2a50cac3 100644 --- a/searchlib/src/vespa/searchlib/attribute/createarraystd.cpp +++ b/searchlib/src/vespa/searchlib/attribute/createarraystd.cpp @@ -5,7 +5,7 @@ #include "attributevector.hpp" #include "multivalueattribute.hpp" #include "multinumericattribute.hpp" -#include "multistringattribute.h" +#include "multistringattribute.hpp" namespace search { diff --git a/searchlib/src/vespa/searchlib/attribute/createsetstd.cpp b/searchlib/src/vespa/searchlib/attribute/createsetstd.cpp index 721af2891e3..262ec2c23df 100644 --- a/searchlib/src/vespa/searchlib/attribute/createsetstd.cpp +++ b/searchlib/src/vespa/searchlib/attribute/createsetstd.cpp @@ -5,7 +5,7 @@ #include "attributevector.hpp" #include "multivalueattribute.hpp" #include "multinumericattribute.hpp" -#include "multistringattribute.h" +#include "multistringattribute.hpp" namespace search { diff --git a/searchlib/src/vespa/searchlib/attribute/numericbase.h b/searchlib/src/vespa/searchlib/attribute/numericbase.h index 2554102b511..ee6effa810a 100644 --- a/searchlib/src/vespa/searchlib/attribute/numericbase.h +++ b/searchlib/src/vespa/searchlib/attribute/numericbase.h @@ -3,9 +3,9 @@ #pragma once #include "attributevector.h" -#include <vespa/searchlib/common/sort.h> #include "enumstorebase.h" #include "loadedenumvalue.h" +#include <vespa/searchlib/common/sort.h> namespace search { @@ -28,7 +28,7 @@ protected: virtual void fillEnumIdx(ReaderBase &attrReader, const EnumIndexVector &eidxs, EnumVector &enumHist); virtual void fillPostingsFixupEnum(const attribute::LoadedEnumAttributeVector &loaded); virtual void fixupEnumRefCounts(const EnumVector &enumHist); - virtual bool onAddDoc(DocId) { return true; } + bool onAddDoc(DocId) override { return true; } template<typename T> class Equal @@ -58,8 +58,7 @@ protected: protected: Range(const QueryTermSimple & queryTerm, bool avoidUndefinedInRange=false); Int64Range getRange() const { - return Int64Range(static_cast<int64_t>(_low), - static_cast<int64_t>(_high)); + return Int64Range(static_cast<int64_t>(_low), static_cast<int64_t>(_high)); } bool isValid() const { return _valid; } bool match(T v) const { return (_low <= v) && (v <= _high); } @@ -76,8 +75,7 @@ protected: BaseType numMin = std::numeric_limits<BaseType>::min(); BaseType numMax = std::numeric_limits<BaseType>::max(); - if (isFloat) - { + if (isFloat) { if (_low <= (-numMax)) { low = -numMax; } @@ -103,4 +101,3 @@ public: }; } // namespace search - diff --git a/storage/src/vespa/storage/storageserver/CMakeLists.txt b/storage/src/vespa/storage/storageserver/CMakeLists.txt index 5ca7e074e6b..79ce0206005 100644 --- a/storage/src/vespa/storage/storageserver/CMakeLists.txt +++ b/storage/src/vespa/storage/storageserver/CMakeLists.txt @@ -8,6 +8,7 @@ vespa_add_library(storage_storageserver fnetlistener.cpp rpcrequestwrapper.cpp communicationmanager.cpp + communicationmanagermetrics.cpp statemanager.cpp documentapiconverter.cpp opslogger.cpp diff --git a/storage/src/vespa/storage/storageserver/communicationmanagermetrics.cpp b/storage/src/vespa/storage/storageserver/communicationmanagermetrics.cpp new file mode 100644 index 00000000000..d1e71b6e8a5 --- /dev/null +++ b/storage/src/vespa/storage/storageserver/communicationmanagermetrics.cpp @@ -0,0 +1,32 @@ +// Copyright 2017 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. + +#include "communicationmanagermetrics.h" +#include <vespa/documentapi/loadtypes/loadtypeset.h> + +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), + messageProcessTime(loadTypes, + DoubleAverageMetric("messageprocesstime", "", + "Time transport thread uses to process a single message"), + this), + exceptionMessageProcessTime(loadTypes, + 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", "", + "Number of messages that failed to get converted to storage API messages", this), + sendCommandLatency("sendcommandlatency", "", "Average ms used to send commands to MBUS", this), + sendReplyLatency("sendreplylatency", "", "Average ms used to send replies to MBUS", this) +{ +} + +CommunicationManagerMetrics::~CommunicationManagerMetrics() { } + +} + diff --git a/storage/src/vespa/storage/storageserver/communicationmanagermetrics.h b/storage/src/vespa/storage/storageserver/communicationmanagermetrics.h index 4b580f79904..40c3646647e 100644 --- a/storage/src/vespa/storage/storageserver/communicationmanagermetrics.h +++ b/storage/src/vespa/storage/storageserver/communicationmanagermetrics.h @@ -9,7 +9,6 @@ #pragma once #include <vespa/metrics/metrics.h> -#include <vespa/documentapi/loadtypes/loadtypeset.h> namespace storage { @@ -22,34 +21,8 @@ struct CommunicationManagerMetrics : public metrics::MetricSet { metrics::DoubleAverageMetric sendCommandLatency; metrics::DoubleAverageMetric sendReplyLatency; - CommunicationManagerMetrics(const metrics::LoadTypeSet& loadTypes, - metrics::MetricSet* owner = 0) - : metrics::MetricSet("communication", "", - "Metrics for the communication manager", owner), - queueSize("messagequeue", "", "Size of input message queue.", this), - messageProcessTime(loadTypes, metrics::DoubleAverageMetric( - "messageprocesstime", "", - "Time transport thread uses to process a single message"), - this), - exceptionMessageProcessTime(loadTypes, metrics::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", "", - "Number of messages that failed to get converted to " - "storage API messages", this), - sendCommandLatency("sendcommandlatency", "", - "Average ms used to send commands to MBUS", this), - sendReplyLatency("sendreplylatency", "", - "Average ms used to send replies to MBUS", this) - { - } - + CommunicationManagerMetrics(const metrics::LoadTypeSet& loadTypes, metrics::MetricSet* owner = 0); + ~CommunicationManagerMetrics(); }; } |