aboutsummaryrefslogtreecommitdiffstats
path: root/searchcommon
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2021-02-02 15:34:28 +0100
committerTor Egge <Tor.Egge@broadpark.no>2021-02-02 15:34:28 +0100
commit3a4df233f6e4815ac356509ddfa0bc9076bb0376 (patch)
tree3ebc907d6f1197ca52e4e9505f7a00896864b3f9 /searchcommon
parent4b3b7543f0f8acf3f72d25d76e36d63841de278a (diff)
Improve handling of changed alloc config.
Diffstat (limited to 'searchcommon')
-rw-r--r--searchcommon/src/vespa/searchcommon/common/CMakeLists.txt2
-rw-r--r--searchcommon/src/vespa/searchcommon/common/compaction_strategy.cpp15
-rw-r--r--searchcommon/src/vespa/searchcommon/common/compaction_strategy.h3
-rw-r--r--searchcommon/src/vespa/searchcommon/common/growstrategy.cpp18
-rw-r--r--searchcommon/src/vespa/searchcommon/common/growstrategy.h3
5 files changed, 41 insertions, 0 deletions
diff --git a/searchcommon/src/vespa/searchcommon/common/CMakeLists.txt b/searchcommon/src/vespa/searchcommon/common/CMakeLists.txt
index 23e6e8dd394..bf5686280e6 100644
--- a/searchcommon/src/vespa/searchcommon/common/CMakeLists.txt
+++ b/searchcommon/src/vespa/searchcommon/common/CMakeLists.txt
@@ -1,7 +1,9 @@
# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
vespa_add_library(searchcommon_searchcommon_common OBJECT
SOURCES
+ compaction_strategy.cpp
datatype.cpp
+ growstrategy.cpp
schema.cpp
schemaconfigurer.cpp
DEPENDS
diff --git a/searchcommon/src/vespa/searchcommon/common/compaction_strategy.cpp b/searchcommon/src/vespa/searchcommon/common/compaction_strategy.cpp
new file mode 100644
index 00000000000..c3377ed5857
--- /dev/null
+++ b/searchcommon/src/vespa/searchcommon/common/compaction_strategy.cpp
@@ -0,0 +1,15 @@
+// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
+#include "compaction_strategy.h"
+#include <iostream>
+namespace search {
+
+std::ostream& operator<<(std::ostream& os, const CompactionStrategy& compaction_strategy)
+{
+ os << "{maxDeadBytesRatio=" << compaction_strategy.getMaxDeadBytesRatio() <<
+ ", maxDeadAddressSpaceRatio=" << compaction_strategy.getMaxDeadAddressSpaceRatio() <<
+ "}";
+ return os;
+}
+
+}
diff --git a/searchcommon/src/vespa/searchcommon/common/compaction_strategy.h b/searchcommon/src/vespa/searchcommon/common/compaction_strategy.h
index 0b3caf44481..ae354a4c4d2 100644
--- a/searchcommon/src/vespa/searchcommon/common/compaction_strategy.h
+++ b/searchcommon/src/vespa/searchcommon/common/compaction_strategy.h
@@ -3,6 +3,7 @@
#pragma once
#include <stdint.h>
+#include <iosfwd>
namespace search {
@@ -34,4 +35,6 @@ public:
bool operator!=(const CompactionStrategy & rhs) const { return !(operator==(rhs)); }
};
+std::ostream& operator<<(std::ostream& os, const CompactionStrategy& compaction_strategy);
+
} // namespace search
diff --git a/searchcommon/src/vespa/searchcommon/common/growstrategy.cpp b/searchcommon/src/vespa/searchcommon/common/growstrategy.cpp
new file mode 100644
index 00000000000..534be3060a7
--- /dev/null
+++ b/searchcommon/src/vespa/searchcommon/common/growstrategy.cpp
@@ -0,0 +1,18 @@
+// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
+#include "growstrategy.h"
+#include <iostream>
+
+namespace search {
+
+std::ostream& operator<<(std::ostream& os, const GrowStrategy& grow_strategy)
+{
+ os << "{docsInitialCapacity=" << grow_strategy.getDocsInitialCapacity() <<
+ ", docsGrowFactor=" << grow_strategy.getDocsGrowFactor() <<
+ ", docsGrowDelta=" << grow_strategy.getDocsGrowDelta() <<
+ ", multiValueAllocGrowFactor=" << grow_strategy.getMultiValueAllocGrowFactor() <<
+ "}";
+ return os;
+}
+
+}
diff --git a/searchcommon/src/vespa/searchcommon/common/growstrategy.h b/searchcommon/src/vespa/searchcommon/common/growstrategy.h
index 13220741e51..f7c5c030d95 100644
--- a/searchcommon/src/vespa/searchcommon/common/growstrategy.h
+++ b/searchcommon/src/vespa/searchcommon/common/growstrategy.h
@@ -4,6 +4,7 @@
#include <vespa/vespalib/util/growstrategy.h>
#include <cstdint>
+#include <iosfwd>
namespace search {
@@ -54,5 +55,7 @@ public:
}
};
+std::ostream& operator<<(std::ostream& os, const GrowStrategy& grow_strategy);
+
}