diff options
author | Håvard Pettersen <havardpe@yahooinc.com> | 2023-01-19 15:22:39 +0000 |
---|---|---|
committer | Håvard Pettersen <havardpe@yahooinc.com> | 2023-01-19 16:05:54 +0000 |
commit | 79ff30cd9ec64651af8deda8f6800c1234e79449 (patch) | |
tree | 7e70b512a97fd9e2f97ac6d8e2a09e7fd8ac6493 /searchlib/src/tests/engine | |
parent | 8b3aecc4e3129f7a3cb8bab0dc4eb9f4c6701578 (diff) |
separate profiling depth parameters
Diffstat (limited to 'searchlib/src/tests/engine')
-rw-r--r-- | searchlib/src/tests/engine/proto_converter/proto_converter_test.cpp | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/searchlib/src/tests/engine/proto_converter/proto_converter_test.cpp b/searchlib/src/tests/engine/proto_converter/proto_converter_test.cpp index bd40a4566cd..ad20684bd04 100644 --- a/searchlib/src/tests/engine/proto_converter/proto_converter_test.cpp +++ b/searchlib/src/tests/engine/proto_converter/proto_converter_test.cpp @@ -69,7 +69,28 @@ TEST_F(SearchRequestTest, require_that_trace_level_is_converted) { TEST_F(SearchRequestTest, require_that_profile_depth_is_converted) { proto.set_profile_depth(7); convert(); - EXPECT_EQ(request.trace().getProfileDepth(), 7); + EXPECT_EQ(request.trace().match_profile_depth(), 7); + EXPECT_EQ(request.trace().first_phase_profile_depth(), 7); + EXPECT_EQ(request.trace().second_phase_profile_depth(), 7); +} + +TEST_F(SearchRequestTest, require_that_profiling_params_are_converted) { + proto.mutable_profiling()->mutable_match()->set_depth(4); + proto.mutable_profiling()->mutable_first_phase()->set_depth(5); + proto.mutable_profiling()->mutable_second_phase()->set_depth(6); + convert(); + EXPECT_EQ(request.trace().match_profile_depth(), 4); + EXPECT_EQ(request.trace().first_phase_profile_depth(), 5); + EXPECT_EQ(request.trace().second_phase_profile_depth(), 6); +} + +TEST_F(SearchRequestTest, require_that_profile_depth_is_fallback) { + proto.mutable_profiling()->mutable_first_phase()->set_depth(5); + proto.set_profile_depth(7); + convert(); + EXPECT_EQ(request.trace().match_profile_depth(), 7); + EXPECT_EQ(request.trace().first_phase_profile_depth(), 5); + EXPECT_EQ(request.trace().second_phase_profile_depth(), 7); } TEST_F(SearchRequestTest, require_that_sorting_is_converted) { |