diff options
author | Geir Storli <geirst@yahooinc.com> | 2022-01-31 14:45:09 +0000 |
---|---|---|
committer | Geir Storli <geirst@yahooinc.com> | 2022-01-31 14:45:09 +0000 |
commit | 82aa3ab6fca0d5c6f6ec4943cdc3155eb2cff463 (patch) | |
tree | b0559981cd81f97cdbe8478076f02c00ab4b0d03 /searchlib/src/tests/docstore | |
parent | 139420fda334dbcfe80f49d9badb5f26ca160d92 (diff) |
Tag all document store tasks executed on the shared executor with cpu category.
Diffstat (limited to 'searchlib/src/tests/docstore')
-rw-r--r-- | searchlib/src/tests/docstore/file_chunk/file_chunk_test.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/searchlib/src/tests/docstore/file_chunk/file_chunk_test.cpp b/searchlib/src/tests/docstore/file_chunk/file_chunk_test.cpp index 3b9f36d9f1f..b295291d7c4 100644 --- a/searchlib/src/tests/docstore/file_chunk/file_chunk_test.cpp +++ b/searchlib/src/tests/docstore/file_chunk/file_chunk_test.cpp @@ -1,23 +1,25 @@ // Copyright Yahoo. 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/searchlib/common/fileheadercontext.h> #include <vespa/searchlib/docstore/filechunk.h> #include <vespa/searchlib/docstore/writeablefilechunk.h> #include <vespa/searchlib/test/directory_handler.h> #include <vespa/vespalib/test/insertion_operators.h> +#include <vespa/vespalib/testkit/test_kit.h> +#include <vespa/vespalib/util/cpu_usage.h> +#include <vespa/vespalib/util/compressionconfig.h> #include <vespa/vespalib/util/threadstackexecutor.h> #include <iomanip> #include <iostream> #include <vespa/log/log.h> -#include <vespa/vespalib/util/compressionconfig.h> LOG_SETUP("file_chunk_test"); using namespace search; using common::FileHeaderContext; +using vespalib::CpuUsage; using vespalib::ThreadStackExecutor; struct MyFileHeaderContext : public FileHeaderContext { @@ -136,12 +138,12 @@ struct WriteFixture : public FixtureBase { dir.cleanup(dirCleanup); } void flush() { - chunk.flush(true, serialNum); + chunk.flush(true, serialNum, CpuUsage::Category::WRITE); chunk.flushPendingChunks(serialNum); } WriteFixture &append(uint32_t lid) { vespalib::string data = getData(lid); - chunk.append(nextSerialNum(), lid, data.c_str(), data.size()); + chunk.append(nextSerialNum(), lid, data.c_str(), data.size(), CpuUsage::Category::WRITE); return *this; } void updateLidMap(uint32_t docIdLimit) { |