diff options
author | Arne Juul <arnej@verizonmedia.com> | 2021-02-15 13:54:49 +0000 |
---|---|---|
committer | Arne Juul <arnej@verizonmedia.com> | 2021-02-15 14:16:21 +0000 |
commit | 805a313df05d2f347af321511527e06ea3cae92c (patch) | |
tree | 7e06fbd1c2d5ababf3d219ddb6c4b0cf9525aea9 /searchlib/src/apps | |
parent | c0b8734987176a93588909739af143c6b0a1a6ff (diff) |
use size literals in searchlib
Diffstat (limited to 'searchlib/src/apps')
-rw-r--r-- | searchlib/src/apps/docstore/benchmarkdatastore.cpp | 9 | ||||
-rw-r--r-- | searchlib/src/apps/docstore/documentstoreinspect.cpp | 3 | ||||
-rw-r--r-- | searchlib/src/apps/docstore/verifylogdatastore.cpp | 3 | ||||
-rw-r--r-- | searchlib/src/apps/tests/biglogtest.cpp | 3 | ||||
-rw-r--r-- | searchlib/src/apps/tests/btreestress_test.cpp | 15 | ||||
-rw-r--r-- | searchlib/src/apps/tests/memoryindexstress_test.cpp | 7 |
6 files changed, 23 insertions, 17 deletions
diff --git a/searchlib/src/apps/docstore/benchmarkdatastore.cpp b/searchlib/src/apps/docstore/benchmarkdatastore.cpp index 4c0ac937bfd..20f06a087f5 100644 --- a/searchlib/src/apps/docstore/benchmarkdatastore.cpp +++ b/searchlib/src/apps/docstore/benchmarkdatastore.cpp @@ -2,10 +2,11 @@ #include <vespa/searchlib/docstore/logdatastore.h> #include <vespa/searchlib/index/dummyfileheadercontext.h> -#include <vespa/vespalib/util/lambdatask.h> #include <vespa/searchlib/transactionlog/nosyncproxy.h> -#include <vespa/vespalib/util/threadstackexecutor.h> #include <vespa/vespalib/data/databuffer.h> +#include <vespa/vespalib/util/lambdatask.h> +#include <vespa/vespalib/util/size_literals.h> +#include <vespa/vespalib/util/threadstackexecutor.h> #include <vespa/fastos/app.h> #include <unistd.h> #include <random> @@ -95,12 +96,12 @@ BenchmarkDataStoreApp::benchmark(const vespalib::string & dir, size_t numReads, tuning._randRead.setWantMemoryMap(); } search::index::DummyFileHeaderContext fileHeaderContext; - vespalib::ThreadStackExecutor executor(1, 128*1024); + vespalib::ThreadStackExecutor executor(1, 128_Ki); transactionlog::NoSyncProxy noTlSyncer; LogDataStore store(executor, dir, config, growStrategy, tuning, fileHeaderContext, noTlSyncer, NULL, true); - vespalib::ThreadStackExecutor bmPool(numThreads, 128*1024); + vespalib::ThreadStackExecutor bmPool(numThreads, 128_Ki); LOG(info, "Start read benchmark with %lu threads doing %lu reads in chunks of %lu reads. Totally %lu objects", numThreads, numReads, perChunk, numThreads * numReads * perChunk); for (size_t i(0); i < numThreads; i++) { bmPool.execute(vespalib::makeLambdaTask([&]() { read(numReads, perChunk, static_cast<const IDataStore *>(&store)); })); diff --git a/searchlib/src/apps/docstore/documentstoreinspect.cpp b/searchlib/src/apps/docstore/documentstoreinspect.cpp index 8a3bb6b247b..8acc2312d46 100644 --- a/searchlib/src/apps/docstore/documentstoreinspect.cpp +++ b/searchlib/src/apps/docstore/documentstoreinspect.cpp @@ -5,6 +5,7 @@ #include <vespa/searchlib/transactionlog/nosyncproxy.h> #include <vespa/fastos/app.h> #include <vespa/vespalib/objects/nbostream.h> +#include <vespa/vespalib/util/size_literals.h> #include <vespa/vespalib/util/threadstackexecutor.h> #include <cinttypes> @@ -106,7 +107,7 @@ DocumentStoreInspectApp::verify(const vespalib::string & dir) GrowStrategy growStrategy; TuneFileSummary tuning; search::index::DummyFileHeaderContext fileHeaderContext; - vespalib::ThreadStackExecutor executor(1, 128*1024); + vespalib::ThreadStackExecutor executor(1, 128_Ki); transactionlog::NoSyncProxy noTlSyncer; LogDataStore store(executor, dir, config, growStrategy, tuning, diff --git a/searchlib/src/apps/docstore/verifylogdatastore.cpp b/searchlib/src/apps/docstore/verifylogdatastore.cpp index 498516882c1..c148f12f9ee 100644 --- a/searchlib/src/apps/docstore/verifylogdatastore.cpp +++ b/searchlib/src/apps/docstore/verifylogdatastore.cpp @@ -6,6 +6,7 @@ #include <vespa/searchlib/transactionlog/nosyncproxy.h> #include <vespa/fastos/app.h> #include <vespa/vespalib/util/exception.h> +#include <vespa/vespalib/util/size_literals.h> #include <vespa/vespalib/util/threadstackexecutor.h> using namespace search; @@ -49,7 +50,7 @@ VerifyLogDataStoreApp::verify(const vespalib::string & dir) GrowStrategy growStrategy; TuneFileSummary tuning; search::index::DummyFileHeaderContext fileHeaderContext; - vespalib::ThreadStackExecutor executor(1, 128*1024); + vespalib::ThreadStackExecutor executor(1, 128_Ki); transactionlog::NoSyncProxy noTlSyncer; try { diff --git a/searchlib/src/apps/tests/biglogtest.cpp b/searchlib/src/apps/tests/biglogtest.cpp index 788fb855c7f..efe6585ae69 100644 --- a/searchlib/src/apps/tests/biglogtest.cpp +++ b/searchlib/src/apps/tests/biglogtest.cpp @@ -5,6 +5,7 @@ #include <vespa/searchlib/index/dummyfileheadercontext.h> #include <vespa/searchlib/transactionlog/nosyncproxy.h> #include <vespa/vespalib/util/exceptions.h> +#include <vespa/vespalib/util/size_literals.h> #include <vespa/vespalib/util/threadstackexecutor.h> #include <vespa/vespalib/data/databuffer.h> @@ -134,7 +135,7 @@ factory<LogDataStore>::factory(std::string dir) : DioTune(), _fileHeaderContext(), _config(), - _executor(1, 128*1024), + _executor(1, 128_Ki), _noTlSyncer(), _datastore(_executor, dir, _config, GrowStrategy(), tuning, _fileHeaderContext, _noTlSyncer, NULL) {} diff --git a/searchlib/src/apps/tests/btreestress_test.cpp b/searchlib/src/apps/tests/btreestress_test.cpp index 37fc6b26cc3..b41f663f5f7 100644 --- a/searchlib/src/apps/tests/btreestress_test.cpp +++ b/searchlib/src/apps/tests/btreestress_test.cpp @@ -1,12 +1,16 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/testkit/test_kit.h> -#include <vespa/vespalib/btree/btreeroot.h> +#include <vespa/vespalib/btree/btree.h> #include <vespa/vespalib/btree/btreebuilder.h> #include <vespa/vespalib/btree/btreenodeallocator.h> -#include <vespa/vespalib/btree/btree.h> +#include <vespa/vespalib/btree/btreeroot.h> #include <vespa/vespalib/btree/btreestore.h> + +#include <vespa/vespalib/util/lambdatask.h> #include <vespa/vespalib/util/rand48.h> +#include <vespa/vespalib/util/size_literals.h> +#include <vespa/vespalib/util/threadstackexecutor.h> #include <vespa/vespalib/btree/btreenodeallocator.hpp> #include <vespa/vespalib/btree/btreenode.hpp> @@ -18,9 +22,6 @@ #include <vespa/vespalib/btree/btreestore.hpp> #include <vespa/vespalib/btree/btreeaggregator.hpp> -#include <vespa/vespalib/util/threadstackexecutor.h> -#include <vespa/vespalib/util/lambdatask.h> - #include <vespa/log/log.h> LOG_SETUP("btreestress_test"); @@ -62,8 +63,8 @@ Fixture::Fixture() : _generationHandler(), _tree(), _writeItr(_tree.begin()), - _writer(1, 128 * 1024), - _readers(4, 128 * 1024), + _writer(1, 128_Ki), + _readers(4, 128_Ki), _rnd(), _keyLimit(1000000), _readSeed(50), diff --git a/searchlib/src/apps/tests/memoryindexstress_test.cpp b/searchlib/src/apps/tests/memoryindexstress_test.cpp index e8590999bc1..b013f6a9d27 100644 --- a/searchlib/src/apps/tests/memoryindexstress_test.cpp +++ b/searchlib/src/apps/tests/memoryindexstress_test.cpp @@ -24,6 +24,7 @@ #include <vespa/vespalib/testkit/testapp.h> #include <vespa/vespalib/util/threadstackexecutor.h> #include <vespa/vespalib/util/sequencedtaskexecutor.h> +#include <vespa/vespalib/util/size_literals.h> #include <vespa/log/log.h> LOG_SETUP("memoryindexstress_test"); @@ -248,13 +249,13 @@ VESPA_THREAD_STACK_TAG(push_executor) Fixture::Fixture(uint32_t readThreads) : schema(makeSchema()), repo(makeDocTypeRepoConfig()), - _executor(1, 128 * 1024), + _executor(1, 128_Ki), _invertThreads(vespalib::SequencedTaskExecutor::create(invert_executor, 2)), _pushThreads(vespalib::SequencedTaskExecutor::create(push_executor, 2)), index(schema, MockFieldLengthInspector(), *_invertThreads, *_pushThreads), _readThreads(readThreads), - _writer(1, 128 * 1024), - _readers(readThreads, 128 * 1024), + _writer(1, 128_Ki), + _readers(readThreads, 128_Ki), _rnd(), _keyLimit(1000000), _readSeed(50), |