Created
June 20, 2019 09:44
-
-
Save Bouncner/e38d2b4984d86c751489c908a44a5b54 to your computer and use it in GitHub Desktop.
Short benchmark to test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+#include "scheduler/node_queue_scheduler.hpp" | |
#include "scheduler/operator_task.hpp" | |
#include "storage/chunk_encoder.hpp" | |
#include "storage/encoding_type.hpp" | |
@@ -31,7 +32,7 @@ class TPCHDataMicroBenchmarkFixture : public MicroBenchmarkBasicFixture { | |
public: | |
void SetUp(::benchmark::State& state) { | |
auto& sm = StorageManager::get(); | |
- const auto scale_factor = 0.001f; | |
+ const auto scale_factor = 1.0f; | |
const auto default_encoding = EncodingType::Dictionary; | |
auto benchmark_config = BenchmarkConfig::get_default_config(); | |
@@ -295,4 +296,25 @@ BENCHMARK_F(TPCHDataMicroBenchmarkFixture, BM_SortMergeSemiProbeRelationLarger)( | |
} | |
} | |
+BENCHMARK_F(TPCHDataMicroBenchmarkFixture, BM_Mrks_HashJoin_ST)(benchmark::State& state) { | |
+ for (auto _ : state) { | |
+ auto join = std::make_shared<JoinHash>(_table_wrapper_map.at("customer"), _table_wrapper_map.at("lineitem"), JoinMode::Inner, | |
+ OperatorJoinPredicate{ColumnIDPair(ColumnID{0}, ColumnID{0}), PredicateCondition::Equals}); | |
+ join->execute(); | |
+ } | |
+} | |
+ | |
+BENCHMARK_F(TPCHDataMicroBenchmarkFixture, BM_Mrks_HashJoin_MT)(benchmark::State& state) { | |
+ CurrentScheduler::set(std::make_shared<NodeQueueScheduler>()); | |
+ | |
+ for (auto _ : state) { | |
+ auto join = std::make_shared<JoinHash>(_table_wrapper_map.at("customer"), _table_wrapper_map.at("lineitem"), JoinMode::Inner, | |
+ OperatorJoinPredicate{ColumnIDPair(ColumnID{0}, ColumnID{0}), PredicateCondition::Equals}); | |
+ join->execute(); | |
+ } | |
+ | |
+ CurrentScheduler::get()->finish(); | |
+ CurrentScheduler::set(nullptr); | |
+} | |
+ | |
} // namespace opossum |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment