2018-09-27 21:11:50 +08:00
|
|
|
set(test_prefix memgraph__benchmark__)
|
2016-11-19 00:35:29 +08:00
|
|
|
|
2018-09-27 21:11:50 +08:00
|
|
|
add_custom_target(memgraph__benchmark)
|
2016-11-19 00:35:29 +08:00
|
|
|
|
2018-09-27 21:11:50 +08:00
|
|
|
function(add_benchmark test_cpp)
|
|
|
|
# get exec name (remove extension from the abs path)
|
|
|
|
get_filename_component(exec_name ${test_cpp} NAME_WE)
|
|
|
|
set(target_name ${test_prefix}${exec_name})
|
2020-01-07 22:06:33 +08:00
|
|
|
add_executable(${target_name} ${test_cpp} ${ARGN})
|
2018-09-27 21:11:50 +08:00
|
|
|
# OUTPUT_NAME sets the real name of a target when it is built and can be
|
|
|
|
# used to help create two targets of the same name even though CMake
|
|
|
|
# requires unique logical target names
|
|
|
|
set_target_properties(${target_name} PROPERTIES OUTPUT_NAME ${exec_name})
|
|
|
|
target_link_libraries(${target_name} benchmark)
|
|
|
|
# register test
|
2019-04-25 19:37:26 +08:00
|
|
|
add_test(${target_name} ${exec_name})
|
2018-09-27 21:11:50 +08:00
|
|
|
add_dependencies(memgraph__benchmark ${target_name})
|
|
|
|
endfunction(add_benchmark)
|
2016-11-19 00:35:29 +08:00
|
|
|
|
2018-09-27 21:11:50 +08:00
|
|
|
add_benchmark(data_structures/ring_buffer.cpp)
|
2020-01-07 22:06:33 +08:00
|
|
|
target_link_libraries(${test_prefix}ring_buffer mg-utils)
|
2016-12-16 21:05:04 +08:00
|
|
|
|
2019-06-07 20:31:25 +08:00
|
|
|
add_benchmark(query/eval.cpp)
|
2020-01-14 21:46:41 +08:00
|
|
|
target_link_libraries(${test_prefix}eval mg-query)
|
2019-06-07 20:31:25 +08:00
|
|
|
|
2020-01-07 22:06:33 +08:00
|
|
|
add_benchmark(query/execution.cpp ${CMAKE_SOURCE_DIR}/src/glue/communication.cpp)
|
2020-01-14 21:46:41 +08:00
|
|
|
target_link_libraries(${test_prefix}execution mg-query mg-communication)
|
2019-04-25 20:56:12 +08:00
|
|
|
|
2018-09-27 21:11:50 +08:00
|
|
|
add_benchmark(query/planner.cpp)
|
2020-01-14 21:46:41 +08:00
|
|
|
target_link_libraries(${test_prefix}planner mg-query)
|
2016-11-19 00:35:29 +08:00
|
|
|
|
2019-01-15 18:11:06 +08:00
|
|
|
add_benchmark(query/profile.cpp)
|
2020-01-14 21:46:41 +08:00
|
|
|
target_link_libraries(${test_prefix}profile mg-query)
|
2019-01-15 18:11:06 +08:00
|
|
|
|
2018-09-27 21:11:50 +08:00
|
|
|
add_benchmark(query/stripped.cpp)
|
2020-01-14 21:46:41 +08:00
|
|
|
target_link_libraries(${test_prefix}stripped mg-query)
|
2018-09-27 21:11:50 +08:00
|
|
|
|
2020-02-05 22:05:18 +08:00
|
|
|
if (MG_ENTERPRISE)
|
2018-11-05 16:34:01 +08:00
|
|
|
add_benchmark(rpc.cpp)
|
2020-01-24 22:30:47 +08:00
|
|
|
target_link_libraries(${test_prefix}rpc mg-rpc)
|
2020-02-05 22:05:18 +08:00
|
|
|
endif()
|
2018-11-05 16:34:01 +08:00
|
|
|
|
2019-01-14 18:11:51 +08:00
|
|
|
add_benchmark(skip_list_random.cpp)
|
|
|
|
target_link_libraries(${test_prefix}skip_list_random mg-utils)
|
|
|
|
|
|
|
|
add_benchmark(skip_list_real_world.cpp)
|
|
|
|
target_link_libraries(${test_prefix}skip_list_real_world mg-utils)
|
|
|
|
|
|
|
|
add_benchmark(skip_list_same_item.cpp)
|
|
|
|
target_link_libraries(${test_prefix}skip_list_same_item mg-utils)
|
|
|
|
|
|
|
|
add_benchmark(skip_list_vs_stl.cpp)
|
|
|
|
target_link_libraries(${test_prefix}skip_list_vs_stl mg-utils)
|
|
|
|
|
2020-01-07 22:06:33 +08:00
|
|
|
add_benchmark(expansion.cpp ${CMAKE_SOURCE_DIR}/src/glue/communication.cpp)
|
2020-01-14 21:46:41 +08:00
|
|
|
target_link_libraries(${test_prefix}expansion mg-query mg-communication)
|
[StorageV2] Implement GC
Summary:
Here are some numbers from the benchmark:
```
(TOOLCHAIN) mtomic@poso:~/memgraph/build_release$ tests/benchmark/storage_v2_gc --num-threads 8
Config: NoGc, Time: 25.9836
Config: OnFinishGc, Time: 49.012
Config: 100msPeriodicGc, Time: 45.9856
Config: 1000msPeriodicGc, Time: 40.3094
```
```
(TOOLCHAIN) mtomic@poso:~/memgraph/build_release$ tests/benchmark/storage_v2_gc --num-threads 7
Config: NoGc, Time: 20.4256
Config: OnFinishGc, Time: 39.6669
Config: 100msPeriodicGc, Time: 30.7956
Config: 1000msPeriodicGc, Time: 35.128
```
It is not that bad if there is a core dedicated to doing garbage collection.
Reviewers: mferencevic, teon.banek
Reviewed By: mferencevic, teon.banek
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2168
2019-07-09 22:34:23 +08:00
|
|
|
|
|
|
|
add_benchmark(storage_v2_gc.cpp)
|
|
|
|
target_link_libraries(${test_prefix}storage_v2_gc mg-storage-v2)
|
2020-05-05 16:29:46 +08:00
|
|
|
|
|
|
|
add_benchmark(storage_v2_property_store.cpp)
|
|
|
|
target_link_libraries(${test_prefix}storage_v2_property_store mg-storage-v2)
|