diff options
author | Henrik Edin <henrik.edin@mongodb.com> | 2020-04-06 10:05:56 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-04-08 21:33:40 +0000 |
commit | 6ef4109428abf1afe7ee73d42155d20cf1966fc0 (patch) | |
tree | e80d4aa1bfe76b9eea600e82b71bb008d82a37ad /src/mongo/dbtests/multikey_paths_test.cpp | |
parent | f79261579283f48d186925e7e9450917a8622e5c (diff) | |
download | mongo-6ef4109428abf1afe7ee73d42155d20cf1966fc0.tar.gz |
SERVER-47349 Use flat_set instead of set for KeyStringSet and MultikeyPaths
So we can reduce the amount of small memory allocations and re-use allocated memory.
Diffstat (limited to 'src/mongo/dbtests/multikey_paths_test.cpp')
-rw-r--r-- | src/mongo/dbtests/multikey_paths_test.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mongo/dbtests/multikey_paths_test.cpp b/src/mongo/dbtests/multikey_paths_test.cpp index 6c72c3e8936..5fcffe14b1d 100644 --- a/src/mongo/dbtests/multikey_paths_test.cpp +++ b/src/mongo/dbtests/multikey_paths_test.cpp @@ -145,7 +145,7 @@ TEST_F(MultikeyPathsTest, PathsUpdatedOnIndexCreation) { << "key" << keyPattern << "v" << static_cast<int>(kIndexVersion))) .transitional_ignore(); - assertMultikeyPaths(collection, keyPattern, {std::set<size_t>{}, {0U}}); + assertMultikeyPaths(collection, keyPattern, {MultikeyComponents{}, {0U}}); } TEST_F(MultikeyPathsTest, PathsUpdatedOnIndexCreationWithMultipleDocuments) { @@ -199,7 +199,7 @@ TEST_F(MultikeyPathsTest, PathsUpdatedOnDocumentInsert) { wuow.commit(); } - assertMultikeyPaths(collection, keyPattern, {std::set<size_t>{}, {0U}}); + assertMultikeyPaths(collection, keyPattern, {MultikeyComponents{}, {0U}}); { WriteUnitOfWork wuow(_opCtx.get()); @@ -234,7 +234,7 @@ TEST_F(MultikeyPathsTest, PathsUpdatedOnDocumentUpdate) { wuow.commit(); } - assertMultikeyPaths(collection, keyPattern, {std::set<size_t>{}, std::set<size_t>{}}); + assertMultikeyPaths(collection, keyPattern, {MultikeyComponents{}, MultikeyComponents{}}); { auto cursor = collection->getCursor(_opCtx.get()); @@ -259,7 +259,7 @@ TEST_F(MultikeyPathsTest, PathsUpdatedOnDocumentUpdate) { } } - assertMultikeyPaths(collection, keyPattern, {std::set<size_t>{}, {0U}}); + assertMultikeyPaths(collection, keyPattern, {MultikeyComponents{}, {0U}}); } TEST_F(MultikeyPathsTest, PathsNotUpdatedOnDocumentDelete) { @@ -284,7 +284,7 @@ TEST_F(MultikeyPathsTest, PathsNotUpdatedOnDocumentDelete) { wuow.commit(); } - assertMultikeyPaths(collection, keyPattern, {std::set<size_t>{}, {0U}}); + assertMultikeyPaths(collection, keyPattern, {MultikeyComponents{}, {0U}}); { auto cursor = collection->getCursor(_opCtx.get()); @@ -299,7 +299,7 @@ TEST_F(MultikeyPathsTest, PathsNotUpdatedOnDocumentDelete) { } } - assertMultikeyPaths(collection, keyPattern, {std::set<size_t>{}, {0U}}); + assertMultikeyPaths(collection, keyPattern, {MultikeyComponents{}, {0U}}); } TEST_F(MultikeyPathsTest, PathsUpdatedForMultipleIndexesOnDocumentInsert) { @@ -331,8 +331,8 @@ TEST_F(MultikeyPathsTest, PathsUpdatedForMultipleIndexesOnDocumentInsert) { wuow.commit(); } - assertMultikeyPaths(collection, keyPatternAB, {{0U}, std::set<size_t>{}}); - assertMultikeyPaths(collection, keyPatternAC, {{0U}, std::set<size_t>{}}); + assertMultikeyPaths(collection, keyPatternAB, {{0U}, MultikeyComponents{}}); + assertMultikeyPaths(collection, keyPatternAC, {{0U}, MultikeyComponents{}}); } } // namespace |