diff --git a/CMakeLists.txt b/CMakeLists.txt index 497683a4..b6dc90f1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,6 +28,39 @@ find_package(gflags REQUIRED) find_package(glog REQUIRED) find_package(Boost COMPONENTS filesystem) +# --------------------------------------------------------------------------- +# Imported targets for the bootstrap-built third-party static libraries. +# Replaces the raw ${THIRD_PARTY_DIR}/.../*.a paths previously copy-pasted +# into every protocol's target_link_libraries(...). +# --------------------------------------------------------------------------- +add_library(ccbench::masstree STATIC IMPORTED GLOBAL) +set_target_properties(ccbench::masstree PROPERTIES + IMPORTED_LOCATION "${THIRD_PARTY_DIR}/masstree/libkohler_masstree_json.a") + +add_library(ccbench::mimalloc STATIC IMPORTED GLOBAL) +set_target_properties(ccbench::mimalloc PROPERTIES + IMPORTED_LOCATION "${THIRD_PARTY_DIR}/mimalloc/out/release/libmimalloc.a") + +# --------------------------------------------------------------------------- +# common/ as a real shared static library — replaces the per-binary +# duplication that compiled common/result.cc + common/util.cc once per +# target (~28 duplicate compilations across all protocols × workloads). +# Protocols just `target_link_libraries( PRIVATE ccbench_common)`. +# --------------------------------------------------------------------------- +add_library(ccbench_common STATIC + common/result.cc + common/util.cc +) +target_include_directories(ccbench_common PUBLIC + ${CMAKE_SOURCE_DIR} +) +target_link_libraries(ccbench_common PUBLIC + Threads::Threads + Boost::filesystem + gflags::gflags + glog::glog +) + add_subdirectory(cicada) add_subdirectory(d2pl) add_subdirectory(ermia) diff --git a/cicada/CMakeLists.txt b/cicada/CMakeLists.txt index 474ec0b5..f7395237 100644 --- a/cicada/CMakeLists.txt +++ b/cicada/CMakeLists.txt @@ -1,160 +1,128 @@ -include(GNUInstallDirs) -include(CMakePackageConfigHelpers) -include(CompileOptions) - -file(GLOB YCSB_CICADA_SOURCES - "../common/result.cc" - "../common/util.cc" - "ycsb_cicada.cc" - "result.cc" - "transaction.cc" - "util.cc" - ) - -file(GLOB TPCC_CICADA_SOURCES - "../common/result.cc" - "../common/util.cc" - "tpcc_cicada.cc" - "result.cc" - "transaction.cc" - "util.cc" - ) - -file(GLOB BOMB_CICADA_SOURCES - "../common/result.cc" - "../common/util.cc" - "bomb_cicada.cc" - "result.cc" - "transaction.cc" - "util.cc" - ) - -file(GLOB SBOMB_CICADA_SOURCES - "../common/result.cc" - "../common/util.cc" - "sbomb_cicada.cc" - "result.cc" - "transaction.cc" - "util.cc" - ) - -add_executable(ycsb_cicada.exe ${YCSB_CICADA_SOURCES}) -add_executable(tpcc_cicada.exe ${TPCC_CICADA_SOURCES}) -add_executable(bomb_cicada.exe ${BOMB_CICADA_SOURCES}) -add_executable(sbomb_cicada.exe ${SBOMB_CICADA_SOURCES}) - -target_link_libraries(ycsb_cicada.exe - Boost::filesystem - gflags::gflags - ${THIRD_PARTY_DIR}/mimalloc/out/release/libmimalloc.a - ${THIRD_PARTY_DIR}/masstree/libkohler_masstree_json.a - Threads::Threads - ) - -target_link_libraries(tpcc_cicada.exe - Boost::filesystem - gflags::gflags - ${THIRD_PARTY_DIR}/mimalloc/out/release/libmimalloc.a - ${THIRD_PARTY_DIR}/masstree/libkohler_masstree_json.a - Threads::Threads - ) - -target_link_libraries(bomb_cicada.exe - Boost::filesystem - gflags::gflags - ${THIRD_PARTY_DIR}/mimalloc/out/release/libmimalloc.a - ${THIRD_PARTY_DIR}/masstree/libkohler_masstree_json.a - Threads::Threads - ) - -target_link_libraries(sbomb_cicada.exe - Boost::filesystem - gflags::gflags - ${THIRD_PARTY_DIR}/mimalloc/out/release/libmimalloc.a - ${THIRD_PARTY_DIR}/masstree/libkohler_masstree_json.a - Threads::Threads - ) - -if (DEFINED ADD_ANALYSIS) - add_definitions(-DADD_ANALYSIS=${ADD_ANALYSIS}) -else () - add_definitions(-DADD_ANALYSIS=0) -endif () - -if (DEFINED BACK_OFF) - add_definitions(-DBACK_OFF=${BACK_OFF}) -else () - add_definitions(-DBACK_OFF=1) -endif () - -if (DEFINED INLINE_VERSION_PROMOTION) - add_definitions(-DINLINE_VERSION_PROMOTION=${INLINE_VERSION_PROMOTION}) -else () - add_definitions(-DINLINE_VERSION_PROMOTION=1) -endif () - -if (DEFINED INLINE_VERSION_OPT) - add_definitions(-DINLINE_VERSION_OPT=${INLINE_VERSION_OPT}) -else () - add_definitions(-DINLINE_VERSION_OPT=0) -endif () - -if (DEFINED KEY_SIZE) - add_definitions(-DKEY_SIZE=${KEY_SIZE}) -else () - add_definitions(-DKEY_SIZE=8) -endif () - -if (DEFINED MASSTREE_USE) - add_definitions(-DMASSTREE_USE=${MASSTREE_USE}) -else () - add_definitions(-DMASSTREE_USE=1) -endif () - -if (DEFINED PARTITION_TABLE) - add_definitions(-DPARTITION_TABLE=${PARTITION_TABLE}) -else () - add_definitions(-DPARTITION_TABLE=0) -endif () - -if (DEFINED REUSE_VERSION) - add_definitions(-DREUSE_VERSION=${REUSE_VERSION}) -else () - add_definitions(-DREUSE_VERSION=1) -endif () - -if (DEFINED SINGLE_EXEC) - add_definitions(-DSINGLE_EXEC=${CSINGLE_EXEC}) -else () - add_definitions(-DSINGLE_EXEC=0) -endif () - -if (DEFINED VAL_SIZE) - add_definitions(-DVAL_SIZE=${VAL_SIZE}) -else () - add_definitions(-DVAL_SIZE=4) -endif () - -if (DEFINED WRITE_LATEST_ONLY) - add_definitions(-DWRITE_LATEST_ONLY=${WRITE_LATEST_ONLY}) -else () - add_definitions(-DWRITE_LATEST_ONLY=0) -endif () - -if (DEFINED WORKER1_INSERT_DELAY_RPHASE) - add_definitions(-DWORKER1_INSERT_DELAY_RPHASE=${WORKER1_INSERT_DELAY_RPHASE}) -else () - add_definitions(-DWORKER1_INSERT_DELAY_RPHASE=0) -endif () - -if (DEFINED INSERT_READ_DELAY_MS) - add_definitions(-DINSERT_READ_DELAY_MS=${INSERT_READ_DELAY_MS}) -else () - remove_definitions(-DINSERT_READ_DELAY_MS) -endif () - -if (DEFINED INSERT_BATCH_DELAY_MS) - add_definitions(-DINSERT_BATCH_DELAY_MS=${INSERT_BATCH_DELAY_MS}) -else () - remove_definitions(-DINSERT_BATCH_DELAY_MS) -endif () +include(GNUInstallDirs) +include(CMakePackageConfigHelpers) +include(CompileOptions) + +file(GLOB YCSB_CICADA_SOURCES + "ycsb_cicada.cc" + "result.cc" + "transaction.cc" + "util.cc" + ) + +file(GLOB TPCC_CICADA_SOURCES + "tpcc_cicada.cc" + "result.cc" + "transaction.cc" + "util.cc" + ) + +file(GLOB BOMB_CICADA_SOURCES + "bomb_cicada.cc" + "result.cc" + "transaction.cc" + "util.cc" + ) + +file(GLOB SBOMB_CICADA_SOURCES + "sbomb_cicada.cc" + "result.cc" + "transaction.cc" + "util.cc" + ) + +add_executable(ycsb_cicada.exe ${YCSB_CICADA_SOURCES}) +add_executable(tpcc_cicada.exe ${TPCC_CICADA_SOURCES}) +add_executable(bomb_cicada.exe ${BOMB_CICADA_SOURCES}) +add_executable(sbomb_cicada.exe ${SBOMB_CICADA_SOURCES}) + + +foreach(t ycsb_cicada.exe tpcc_cicada.exe bomb_cicada.exe sbomb_cicada.exe) + target_link_libraries(${t} PRIVATE + ccbench_common + ccbench::masstree + ccbench::mimalloc + ) +endforeach() +if (DEFINED ADD_ANALYSIS) + add_definitions(-DADD_ANALYSIS=${ADD_ANALYSIS}) +else () + add_definitions(-DADD_ANALYSIS=0) +endif () + +if (DEFINED BACK_OFF) + add_definitions(-DBACK_OFF=${BACK_OFF}) +else () + add_definitions(-DBACK_OFF=1) +endif () + +if (DEFINED INLINE_VERSION_PROMOTION) + add_definitions(-DINLINE_VERSION_PROMOTION=${INLINE_VERSION_PROMOTION}) +else () + add_definitions(-DINLINE_VERSION_PROMOTION=1) +endif () + +if (DEFINED INLINE_VERSION_OPT) + add_definitions(-DINLINE_VERSION_OPT=${INLINE_VERSION_OPT}) +else () + add_definitions(-DINLINE_VERSION_OPT=0) +endif () + +if (DEFINED KEY_SIZE) + add_definitions(-DKEY_SIZE=${KEY_SIZE}) +else () + add_definitions(-DKEY_SIZE=8) +endif () + +if (DEFINED MASSTREE_USE) + add_definitions(-DMASSTREE_USE=${MASSTREE_USE}) +else () + add_definitions(-DMASSTREE_USE=1) +endif () + +if (DEFINED PARTITION_TABLE) + add_definitions(-DPARTITION_TABLE=${PARTITION_TABLE}) +else () + add_definitions(-DPARTITION_TABLE=0) +endif () + +if (DEFINED REUSE_VERSION) + add_definitions(-DREUSE_VERSION=${REUSE_VERSION}) +else () + add_definitions(-DREUSE_VERSION=1) +endif () + +if (DEFINED SINGLE_EXEC) + add_definitions(-DSINGLE_EXEC=${CSINGLE_EXEC}) +else () + add_definitions(-DSINGLE_EXEC=0) +endif () + +if (DEFINED VAL_SIZE) + add_definitions(-DVAL_SIZE=${VAL_SIZE}) +else () + add_definitions(-DVAL_SIZE=4) +endif () + +if (DEFINED WRITE_LATEST_ONLY) + add_definitions(-DWRITE_LATEST_ONLY=${WRITE_LATEST_ONLY}) +else () + add_definitions(-DWRITE_LATEST_ONLY=0) +endif () + +if (DEFINED WORKER1_INSERT_DELAY_RPHASE) + add_definitions(-DWORKER1_INSERT_DELAY_RPHASE=${WORKER1_INSERT_DELAY_RPHASE}) +else () + add_definitions(-DWORKER1_INSERT_DELAY_RPHASE=0) +endif () + +if (DEFINED INSERT_READ_DELAY_MS) + add_definitions(-DINSERT_READ_DELAY_MS=${INSERT_READ_DELAY_MS}) +else () + remove_definitions(-DINSERT_READ_DELAY_MS) +endif () + +if (DEFINED INSERT_BATCH_DELAY_MS) + add_definitions(-DINSERT_BATCH_DELAY_MS=${INSERT_BATCH_DELAY_MS}) +else () + remove_definitions(-DINSERT_BATCH_DELAY_MS) +endif () diff --git a/d2pl/CMakeLists.txt b/d2pl/CMakeLists.txt index a5eb8e94..5247e925 100644 --- a/d2pl/CMakeLists.txt +++ b/d2pl/CMakeLists.txt @@ -1,76 +1,64 @@ -include(GNUInstallDirs) -include(CMakePackageConfigHelpers) -include(CompileOptions) - -file(GLOB SBOMB_D2PL_SOURCES - "../common/result.cc" - "../common/util.cc" - "result.cc" - "sbomb_d2pl.cc" - "transaction.cc" - "util.cc" - ) - -file(GLOB DBOMB_D2PL_SOURCES - "../common/result.cc" - "../common/util.cc" - "result.cc" - "dbomb_d2pl.cc" - "transaction.cc" - "util.cc" - ) - -add_executable(sbomb_d2pl.exe ${SBOMB_D2PL_SOURCES}) -add_executable(bomb_d2pl.exe ${DBOMB_D2PL_SOURCES}) - -target_link_libraries(sbomb_d2pl.exe - Boost::filesystem - gflags::gflags - ${THIRD_PARTY_DIR}/mimalloc/out/release/libmimalloc.a - ${THIRD_PARTY_DIR}/masstree/libkohler_masstree_json.a - Threads::Threads - ) - -target_link_libraries(bomb_d2pl.exe - Boost::filesystem - gflags::gflags - ${THIRD_PARTY_DIR}/mimalloc/out/release/libmimalloc.a - ${THIRD_PARTY_DIR}/masstree/libkohler_masstree_json.a - Threads::Threads - ) - -if (DEFINED ADD_ANALYSIS) - add_definitions(-DADD_ANALYSIS=${ADD_ANALYSIS}) -else () - add_definitions(-DADD_ANALYSIS=0) -endif () - -if (DEFINED BACK_OFF) - add_definitions(-DBACK_OFF=${BACK_OFF}) -else () - add_definitions(-DBACK_OFF=1) -endif () - -if (DEFINED KEY_SIZE) - add_definitions(-DKEY_SIZE=${KEY_SIZE}) -else () - add_definitions(-DKEY_SIZE=8) -endif () - -if (DEFINED KEY_SORT) - add_definitions(-DKEY_SORT=${KEY_SORT}) -else () - add_definitions(-DKEY_SORT=0) -endif () - -if (DEFINED MASSTREE_USE) - add_definitions(-DMASSTREE_USE=${MASSTREE_USE}) -else () - add_definitions(-DMASSTREE_USE=1) -endif () - -if (DEFINED VAL_SIZE) - add_definitions(-DVAL_SIZE=${VAL_SIZE}) -else () - add_definitions(-DVAL_SIZE=4) -endif () +include(GNUInstallDirs) +include(CMakePackageConfigHelpers) +include(CompileOptions) + +file(GLOB SBOMB_D2PL_SOURCES + "result.cc" + "sbomb_d2pl.cc" + "transaction.cc" + "util.cc" + ) + +file(GLOB DBOMB_D2PL_SOURCES + "result.cc" + "dbomb_d2pl.cc" + "transaction.cc" + "util.cc" + ) + +add_executable(sbomb_d2pl.exe ${SBOMB_D2PL_SOURCES}) +add_executable(bomb_d2pl.exe ${DBOMB_D2PL_SOURCES}) + + +foreach(t sbomb_d2pl.exe bomb_d2pl.exe) + target_link_libraries(${t} PRIVATE + ccbench_common + ccbench::masstree + ccbench::mimalloc + ) +endforeach() +if (DEFINED ADD_ANALYSIS) + add_definitions(-DADD_ANALYSIS=${ADD_ANALYSIS}) +else () + add_definitions(-DADD_ANALYSIS=0) +endif () + +if (DEFINED BACK_OFF) + add_definitions(-DBACK_OFF=${BACK_OFF}) +else () + add_definitions(-DBACK_OFF=1) +endif () + +if (DEFINED KEY_SIZE) + add_definitions(-DKEY_SIZE=${KEY_SIZE}) +else () + add_definitions(-DKEY_SIZE=8) +endif () + +if (DEFINED KEY_SORT) + add_definitions(-DKEY_SORT=${KEY_SORT}) +else () + add_definitions(-DKEY_SORT=0) +endif () + +if (DEFINED MASSTREE_USE) + add_definitions(-DMASSTREE_USE=${MASSTREE_USE}) +else () + add_definitions(-DMASSTREE_USE=1) +endif () + +if (DEFINED VAL_SIZE) + add_definitions(-DVAL_SIZE=${VAL_SIZE}) +else () + add_definitions(-DVAL_SIZE=4) +endif () diff --git a/ermia/CMakeLists.txt b/ermia/CMakeLists.txt index d792a095..20420317 100644 --- a/ermia/CMakeLists.txt +++ b/ermia/CMakeLists.txt @@ -1,128 +1,96 @@ -include(GNUInstallDirs) -include(CMakePackageConfigHelpers) -include(CompileOptions) - -file(GLOB YCSB_ERMIA_SOURCES - "../common/result.cc" - "../common/util.cc" - "ycsb_ermia.cc" - "garbage_collection.cc" - "result.cc" - "transaction.cc" - "util.cc" - ) - -file(GLOB TPCC_ERMIA_SOURCES - "../common/result.cc" - "../common/util.cc" - "tpcc_ermia.cc" - "garbage_collection.cc" - "result.cc" - "transaction.cc" - "util.cc" - ) - -file(GLOB BOMB_ERMIA_SOURCES - "../common/result.cc" - "../common/util.cc" - "bomb_ermia.cc" - "garbage_collection.cc" - "result.cc" - "transaction.cc" - "util.cc" - ) - -file(GLOB SBOMB_ERMIA_SOURCES - "../common/result.cc" - "../common/util.cc" - "sbomb_ermia.cc" - "garbage_collection.cc" - "result.cc" - "transaction.cc" - "util.cc" - ) - -add_executable(ycsb_ermia.exe ${YCSB_ERMIA_SOURCES}) -add_executable(tpcc_ermia.exe ${TPCC_ERMIA_SOURCES}) -add_executable(bomb_ermia.exe ${BOMB_ERMIA_SOURCES}) -add_executable(sbomb_ermia.exe ${SBOMB_ERMIA_SOURCES}) - -target_link_libraries(ycsb_ermia.exe - Boost::filesystem - gflags::gflags - ${THIRD_PARTY_DIR}/mimalloc/out/release/libmimalloc.a - ${THIRD_PARTY_DIR}/masstree/libkohler_masstree_json.a - Threads::Threads - ) - -target_link_libraries(tpcc_ermia.exe - Boost::filesystem - gflags::gflags - ${THIRD_PARTY_DIR}/mimalloc/out/release/libmimalloc.a - ${THIRD_PARTY_DIR}/masstree/libkohler_masstree_json.a - Threads::Threads - ) - -target_link_libraries(bomb_ermia.exe - Boost::filesystem - gflags::gflags - ${THIRD_PARTY_DIR}/mimalloc/out/release/libmimalloc.a - ${THIRD_PARTY_DIR}/masstree/libkohler_masstree_json.a - Threads::Threads - ) - -target_link_libraries(sbomb_ermia.exe - Boost::filesystem - gflags::gflags - ${THIRD_PARTY_DIR}/mimalloc/out/release/libmimalloc.a - ${THIRD_PARTY_DIR}/masstree/libkohler_masstree_json.a - Threads::Threads - ) - -if (DEFINED ADD_ANALYSIS) - add_definitions(-DADD_ANALYSIS=${ADD_ANALYSIS}) -else () - add_definitions(-DADD_ANALYSIS=0) -endif () - -if (DEFINED BACK_OFF) - add_definitions(-DBACK_OFF=${BACK_OFF}) -else () - add_definitions(-DBACK_OFF=1) -endif () - -if (DEFINED KEY_SIZE) - add_definitions(-DKEY_SIZE=${KEY_SIZE}) -else () - add_definitions(-DKEY_SIZE=8) -endif () - -if (DEFINED KEY_SORT) - add_definitions(-DKEY_SORT=${KEY_SORT}) -else () - add_definitions(-DKEY_SORT=0) -endif () - -if (DEFINED MASSTREE_USE) - add_definitions(-DMASSTREE_USE=${MASSTREE_USE}) -else () - add_definitions(-DMASSTREE_USE=1) -endif () - -if (DEFINED VAL_SIZE) - add_definitions(-DVAL_SIZE=${VAL_SIZE}) -else () - add_definitions(-DVAL_SIZE=4) -endif () - -if (DEFINED INSERT_READ_DELAY_MS) - add_definitions(-DINSERT_READ_DELAY_MS=${INSERT_READ_DELAY_MS}) -else () - remove_definitions(-DINSERT_READ_DELAY_MS) -endif () - -if (DEFINED INSERT_BATCH_DELAY_MS) - add_definitions(-DINSERT_BATCH_DELAY_MS=${INSERT_BATCH_DELAY_MS}) -else () - remove_definitions(-DINSERT_BATCH_DELAY_MS) -endif () +include(GNUInstallDirs) +include(CMakePackageConfigHelpers) +include(CompileOptions) + +file(GLOB YCSB_ERMIA_SOURCES + "ycsb_ermia.cc" + "garbage_collection.cc" + "result.cc" + "transaction.cc" + "util.cc" + ) + +file(GLOB TPCC_ERMIA_SOURCES + "tpcc_ermia.cc" + "garbage_collection.cc" + "result.cc" + "transaction.cc" + "util.cc" + ) + +file(GLOB BOMB_ERMIA_SOURCES + "bomb_ermia.cc" + "garbage_collection.cc" + "result.cc" + "transaction.cc" + "util.cc" + ) + +file(GLOB SBOMB_ERMIA_SOURCES + "sbomb_ermia.cc" + "garbage_collection.cc" + "result.cc" + "transaction.cc" + "util.cc" + ) + +add_executable(ycsb_ermia.exe ${YCSB_ERMIA_SOURCES}) +add_executable(tpcc_ermia.exe ${TPCC_ERMIA_SOURCES}) +add_executable(bomb_ermia.exe ${BOMB_ERMIA_SOURCES}) +add_executable(sbomb_ermia.exe ${SBOMB_ERMIA_SOURCES}) + + +foreach(t ycsb_ermia.exe tpcc_ermia.exe bomb_ermia.exe sbomb_ermia.exe) + target_link_libraries(${t} PRIVATE + ccbench_common + ccbench::masstree + ccbench::mimalloc + ) +endforeach() +if (DEFINED ADD_ANALYSIS) + add_definitions(-DADD_ANALYSIS=${ADD_ANALYSIS}) +else () + add_definitions(-DADD_ANALYSIS=0) +endif () + +if (DEFINED BACK_OFF) + add_definitions(-DBACK_OFF=${BACK_OFF}) +else () + add_definitions(-DBACK_OFF=1) +endif () + +if (DEFINED KEY_SIZE) + add_definitions(-DKEY_SIZE=${KEY_SIZE}) +else () + add_definitions(-DKEY_SIZE=8) +endif () + +if (DEFINED KEY_SORT) + add_definitions(-DKEY_SORT=${KEY_SORT}) +else () + add_definitions(-DKEY_SORT=0) +endif () + +if (DEFINED MASSTREE_USE) + add_definitions(-DMASSTREE_USE=${MASSTREE_USE}) +else () + add_definitions(-DMASSTREE_USE=1) +endif () + +if (DEFINED VAL_SIZE) + add_definitions(-DVAL_SIZE=${VAL_SIZE}) +else () + add_definitions(-DVAL_SIZE=4) +endif () + +if (DEFINED INSERT_READ_DELAY_MS) + add_definitions(-DINSERT_READ_DELAY_MS=${INSERT_READ_DELAY_MS}) +else () + remove_definitions(-DINSERT_READ_DELAY_MS) +endif () + +if (DEFINED INSERT_BATCH_DELAY_MS) + add_definitions(-DINSERT_BATCH_DELAY_MS=${INSERT_BATCH_DELAY_MS}) +else () + remove_definitions(-DINSERT_BATCH_DELAY_MS) +endif () diff --git a/mocc/CMakeLists.txt b/mocc/CMakeLists.txt index 2ba6a294..26ec3002 100644 --- a/mocc/CMakeLists.txt +++ b/mocc/CMakeLists.txt @@ -1,136 +1,104 @@ -include(GNUInstallDirs) -include(CMakePackageConfigHelpers) -include(CompileOptions) - -file(GLOB YCSB_MOCC_SOURCES - "../common/result.cc" - "../common/util.cc" - "lock.cc" - "ycsb_mocc.cc" - "result.cc" - "transaction.cc" - "util.cc" - ) - -file(GLOB TPCC_MOCC_SOURCES - "../common/result.cc" - "../common/util.cc" - "lock.cc" - "tpcc_mocc.cc" - "result.cc" - "transaction.cc" - "util.cc" - ) - -file(GLOB BOMB_MOCC_SOURCES - "../common/result.cc" - "../common/util.cc" - "lock.cc" - "bomb_mocc.cc" - "result.cc" - "transaction.cc" - "util.cc" - ) - -file(GLOB SBOMB_MOCC_SOURCES - "../common/result.cc" - "../common/util.cc" - "lock.cc" - "sbomb_mocc.cc" - "result.cc" - "transaction.cc" - "util.cc" - ) - -add_executable(ycsb_mocc.exe ${YCSB_MOCC_SOURCES}) -add_executable(tpcc_mocc.exe ${TPCC_MOCC_SOURCES}) -add_executable(bomb_mocc.exe ${BOMB_MOCC_SOURCES}) -add_executable(sbomb_mocc.exe ${SBOMB_MOCC_SOURCES}) - -target_link_libraries(ycsb_mocc.exe - Boost::filesystem - gflags::gflags - ${THIRD_PARTY_DIR}/mimalloc/out/release/libmimalloc.a - ${THIRD_PARTY_DIR}/masstree/libkohler_masstree_json.a - Threads::Threads - ) - -target_link_libraries(tpcc_mocc.exe - Boost::filesystem - gflags::gflags - ${THIRD_PARTY_DIR}/mimalloc/out/release/libmimalloc.a - ${THIRD_PARTY_DIR}/masstree/libkohler_masstree_json.a - Threads::Threads - ) - -target_link_libraries(bomb_mocc.exe - Boost::filesystem - gflags::gflags - ${THIRD_PARTY_DIR}/mimalloc/out/release/libmimalloc.a - ${THIRD_PARTY_DIR}/masstree/libkohler_masstree_json.a - Threads::Threads - ) - -target_link_libraries(sbomb_mocc.exe - Boost::filesystem - gflags::gflags - ${THIRD_PARTY_DIR}/mimalloc/out/release/libmimalloc.a - ${THIRD_PARTY_DIR}/masstree/libkohler_masstree_json.a - Threads::Threads - ) - -if (DEFINED ADD_ANALYSIS) - add_definitions(-DADD_ANALYSIS=${ADD_ANALYSIS}) -else () - add_definitions(-DADD_ANALYSIS=0) -endif () - -if (DEFINED BACK_OFF) - add_definitions(-DBACK_OFF=${BACK_OFF}) -else () - add_definitions(-DBACK_OFF=1) -endif () - -if (DEFINED KEY_SIZE) - add_definitions(-DKEY_SIZE=${KEY_SIZE}) -else () - add_definitions(-DKEY_SIZE=8) -endif () - -if (DEFINED KEY_SORT) - add_definitions(-DKEY_SORT=${KEY_SORT}) -else () - add_definitions(-DKEY_SORT=0) -endif () - -if (DEFINED MASSTREE_USE) - add_definitions(-DMASSTREE_USE=${MASSTREE_USE}) -else () - add_definitions(-DMASSTREE_USE=1) -endif () - -add_definitions(-DRWLOCK) - -if (DEFINED TEMPERATURE_RESET_OPT) - add_definitions(-DTEMPERATURE_RESET_OPT=${TEMPERATURE_RESET_OPT}) -else () - add_definitions(-DTEMPERATURE_RESET_OPT=1) -endif () - -if (DEFINED VAL_SIZE) - add_definitions(-DVAL_SIZE=${VAL_SIZE}) -else () - add_definitions(-DVAL_SIZE=4) -endif () - -if (DEFINED INSERT_READ_DELAY_MS) - add_definitions(-DINSERT_READ_DELAY_MS=${INSERT_READ_DELAY_MS}) -else () - remove_definitions(-DINSERT_READ_DELAY_MS) -endif () - -if (DEFINED INSERT_BATCH_DELAY_MS) - add_definitions(-DINSERT_BATCH_DELAY_MS=${INSERT_BATCH_DELAY_MS}) -else () - remove_definitions(-DINSERT_BATCH_DELAY_MS) -endif () +include(GNUInstallDirs) +include(CMakePackageConfigHelpers) +include(CompileOptions) + +file(GLOB YCSB_MOCC_SOURCES + "lock.cc" + "ycsb_mocc.cc" + "result.cc" + "transaction.cc" + "util.cc" + ) + +file(GLOB TPCC_MOCC_SOURCES + "lock.cc" + "tpcc_mocc.cc" + "result.cc" + "transaction.cc" + "util.cc" + ) + +file(GLOB BOMB_MOCC_SOURCES + "lock.cc" + "bomb_mocc.cc" + "result.cc" + "transaction.cc" + "util.cc" + ) + +file(GLOB SBOMB_MOCC_SOURCES + "lock.cc" + "sbomb_mocc.cc" + "result.cc" + "transaction.cc" + "util.cc" + ) + +add_executable(ycsb_mocc.exe ${YCSB_MOCC_SOURCES}) +add_executable(tpcc_mocc.exe ${TPCC_MOCC_SOURCES}) +add_executable(bomb_mocc.exe ${BOMB_MOCC_SOURCES}) +add_executable(sbomb_mocc.exe ${SBOMB_MOCC_SOURCES}) + + +foreach(t ycsb_mocc.exe tpcc_mocc.exe bomb_mocc.exe sbomb_mocc.exe) + target_link_libraries(${t} PRIVATE + ccbench_common + ccbench::masstree + ccbench::mimalloc + ) +endforeach() +if (DEFINED ADD_ANALYSIS) + add_definitions(-DADD_ANALYSIS=${ADD_ANALYSIS}) +else () + add_definitions(-DADD_ANALYSIS=0) +endif () + +if (DEFINED BACK_OFF) + add_definitions(-DBACK_OFF=${BACK_OFF}) +else () + add_definitions(-DBACK_OFF=1) +endif () + +if (DEFINED KEY_SIZE) + add_definitions(-DKEY_SIZE=${KEY_SIZE}) +else () + add_definitions(-DKEY_SIZE=8) +endif () + +if (DEFINED KEY_SORT) + add_definitions(-DKEY_SORT=${KEY_SORT}) +else () + add_definitions(-DKEY_SORT=0) +endif () + +if (DEFINED MASSTREE_USE) + add_definitions(-DMASSTREE_USE=${MASSTREE_USE}) +else () + add_definitions(-DMASSTREE_USE=1) +endif () + +add_definitions(-DRWLOCK) + +if (DEFINED TEMPERATURE_RESET_OPT) + add_definitions(-DTEMPERATURE_RESET_OPT=${TEMPERATURE_RESET_OPT}) +else () + add_definitions(-DTEMPERATURE_RESET_OPT=1) +endif () + +if (DEFINED VAL_SIZE) + add_definitions(-DVAL_SIZE=${VAL_SIZE}) +else () + add_definitions(-DVAL_SIZE=4) +endif () + +if (DEFINED INSERT_READ_DELAY_MS) + add_definitions(-DINSERT_READ_DELAY_MS=${INSERT_READ_DELAY_MS}) +else () + remove_definitions(-DINSERT_READ_DELAY_MS) +endif () + +if (DEFINED INSERT_BATCH_DELAY_MS) + add_definitions(-DINSERT_BATCH_DELAY_MS=${INSERT_BATCH_DELAY_MS}) +else () + remove_definitions(-DINSERT_BATCH_DELAY_MS) +endif () diff --git a/mvto/CMakeLists.txt b/mvto/CMakeLists.txt index 77817c10..7f9dc5a4 100644 --- a/mvto/CMakeLists.txt +++ b/mvto/CMakeLists.txt @@ -1,84 +1,72 @@ -cmake_minimum_required(VERSION 3.10) - -include(GNUInstallDirs) -include(CMakePackageConfigHelpers) -include(CompileOptions) - -file(GLOB BOMB_MVTO_SOURCES - "../common/result.cc" - "../common/util.cc" - "bomb_mvto.cc" - "result.cc" - "transaction.cc" - "util.cc" - ) - -file(GLOB TPCC_MVTO_SOURCES - "../common/result.cc" - "../common/util.cc" - "tpcc_mvto.cc" - "result.cc" - "transaction.cc" - "util.cc" - ) - -add_executable(bomb_mvto.exe ${BOMB_MVTO_SOURCES}) -add_executable(tpcc_mvto.exe ${TPCC_MVTO_SOURCES}) - -target_link_libraries(bomb_mvto.exe - Boost::filesystem - gflags::gflags - ${THIRD_PARTY_DIR}/mimalloc/out/release/libmimalloc.a - ${THIRD_PARTY_DIR}/masstree/libkohler_masstree_json.a - Threads::Threads - ) - -target_link_libraries(tpcc_mvto.exe - Boost::filesystem - gflags::gflags - ${THIRD_PARTY_DIR}/mimalloc/out/release/libmimalloc.a - ${THIRD_PARTY_DIR}/masstree/libkohler_masstree_json.a - Threads::Threads - ) - -if (DEFINED ADD_ANALYSIS) - add_definitions(-DADD_ANALYSIS=${ADD_ANALYSIS}) -else () - add_definitions(-DADD_ANALYSIS=0) -endif () - -if (DEFINED BACK_OFF) - add_definitions(-DBACK_OFF=${BACK_OFF}) -else () - add_definitions(-DBACK_OFF=1) -endif () - -if (DEFINED KEY_SIZE) - add_definitions(-DKEY_SIZE=${KEY_SIZE}) -else () - add_definitions(-DKEY_SIZE=8) -endif () - -if (DEFINED MASSTREE_USE) - add_definitions(-DMASSTREE_USE=${MASSTREE_USE}) -else () - add_definitions(-DMASSTREE_USE=1) -endif () - -if (DEFINED VAL_SIZE) - add_definitions(-DVAL_SIZE=${VAL_SIZE}) -else () - add_definitions(-DVAL_SIZE=4) -endif () - -if (DEFINED INSERT_READ_DELAY_MS) - add_definitions(-DINSERT_READ_DELAY_MS=${INSERT_READ_DELAY_MS}) -else () - remove_definitions(-DINSERT_READ_DELAY_MS) -endif () - -if (DEFINED INSERT_BATCH_DELAY_MS) - add_definitions(-DINSERT_BATCH_DELAY_MS=${INSERT_BATCH_DELAY_MS}) -else () - remove_definitions(-DINSERT_BATCH_DELAY_MS) -endif () +cmake_minimum_required(VERSION 3.10) + +include(GNUInstallDirs) +include(CMakePackageConfigHelpers) +include(CompileOptions) + +file(GLOB BOMB_MVTO_SOURCES + "bomb_mvto.cc" + "result.cc" + "transaction.cc" + "util.cc" + ) + +file(GLOB TPCC_MVTO_SOURCES + "tpcc_mvto.cc" + "result.cc" + "transaction.cc" + "util.cc" + ) + +add_executable(bomb_mvto.exe ${BOMB_MVTO_SOURCES}) +add_executable(tpcc_mvto.exe ${TPCC_MVTO_SOURCES}) + + +foreach(t bomb_mvto.exe tpcc_mvto.exe) + target_link_libraries(${t} PRIVATE + ccbench_common + ccbench::masstree + ccbench::mimalloc + ) +endforeach() +if (DEFINED ADD_ANALYSIS) + add_definitions(-DADD_ANALYSIS=${ADD_ANALYSIS}) +else () + add_definitions(-DADD_ANALYSIS=0) +endif () + +if (DEFINED BACK_OFF) + add_definitions(-DBACK_OFF=${BACK_OFF}) +else () + add_definitions(-DBACK_OFF=1) +endif () + +if (DEFINED KEY_SIZE) + add_definitions(-DKEY_SIZE=${KEY_SIZE}) +else () + add_definitions(-DKEY_SIZE=8) +endif () + +if (DEFINED MASSTREE_USE) + add_definitions(-DMASSTREE_USE=${MASSTREE_USE}) +else () + add_definitions(-DMASSTREE_USE=1) +endif () + +if (DEFINED VAL_SIZE) + add_definitions(-DVAL_SIZE=${VAL_SIZE}) +else () + add_definitions(-DVAL_SIZE=4) +endif () + +if (DEFINED INSERT_READ_DELAY_MS) + add_definitions(-DINSERT_READ_DELAY_MS=${INSERT_READ_DELAY_MS}) +else () + remove_definitions(-DINSERT_READ_DELAY_MS) +endif () + +if (DEFINED INSERT_BATCH_DELAY_MS) + add_definitions(-DINSERT_BATCH_DELAY_MS=${INSERT_BATCH_DELAY_MS}) +else () + remove_definitions(-DINSERT_BATCH_DELAY_MS) +endif () diff --git a/oze/CMakeLists.txt b/oze/CMakeLists.txt index 1a8e6f32..de010862 100644 --- a/oze/CMakeLists.txt +++ b/oze/CMakeLists.txt @@ -1,156 +1,131 @@ -include(GNUInstallDirs) -include(CMakePackageConfigHelpers) -include(CompileOptions) - -include_directories(${THIRD_PARTY_DIR}/googletest/googletest/include) - -file(GLOB YCSB_OZE_SOURCES - "../common/result.cc" - "../common/util.cc" - "ycsb_oze.cc" - "result.cc" - "transaction.cc" - "util.cc" - "debug.cc" - ) - -file(GLOB TPCC_OZE_SOURCES - "../common/result.cc" - "../common/util.cc" - "tpcc_oze.cc" - "result.cc" - "transaction.cc" - "util.cc" - "debug.cc" - ) - -file(GLOB BOMB_OZE_SOURCES - "../common/result.cc" - "../common/util.cc" - "bomb_oze.cc" - "result.cc" - "transaction.cc" - "util.cc" - "debug.cc" - ) - -add_executable(ycsb_oze.exe ${YCSB_OZE_SOURCES}) -add_executable(tpcc_oze.exe ${TPCC_OZE_SOURCES}) -add_executable(bomb_oze.exe ${BOMB_OZE_SOURCES}) - -target_link_libraries(ycsb_oze.exe - Boost::filesystem - gflags::gflags - glog::glog - ${THIRD_PARTY_DIR}/mimalloc/out/release/libmimalloc.a - ${THIRD_PARTY_DIR}/masstree/libkohler_masstree_json.a - Threads::Threads - ) - -target_link_libraries(tpcc_oze.exe - Boost::filesystem - gflags::gflags - glog::glog - ${THIRD_PARTY_DIR}/mimalloc/out/release/libmimalloc.a - ${THIRD_PARTY_DIR}/masstree/libkohler_masstree_json.a - Threads::Threads - ) - -target_link_libraries(bomb_oze.exe - Boost::filesystem - gflags::gflags - glog::glog - ${THIRD_PARTY_DIR}/mimalloc/out/release/libmimalloc.a - ${THIRD_PARTY_DIR}/masstree/libkohler_masstree_json.a - Threads::Threads - ) - -if (DEFINED ADD_ANALYSIS) - add_definitions(-DADD_ANALYSIS=${ADD_ANALYSIS}) -else () - add_definitions(-DADD_ANALYSIS=0) -endif () - -if (DEFINED BACK_OFF) - add_definitions(-DBACK_OFF=${BACK_OFF}) -else () - add_definitions(-DBACK_OFF=1) -endif () - -if (DEFINED INLINE_VERSION_PROMOTION) - add_definitions(-DINLINE_VERSION_PROMOTION=${INLINE_VERSION_PROMOTION}) -else () - add_definitions(-DINLINE_VERSION_PROMOTION=1) -endif () - -if (DEFINED INLINE_VERSION_OPT) - add_definitions(-DINLINE_VERSION_OPT=${INLINE_VERSION_OPT}) -else () - add_definitions(-DINLINE_VERSION_OPT=1) -endif () - -if (DEFINED KEY_SIZE) - add_definitions(-DKEY_SIZE=${KEY_SIZE}) -else () - add_definitions(-DKEY_SIZE=8) -endif () - -if (DEFINED MASSTREE_USE) - add_definitions(-DMASSTREE_USE=${MASSTREE_USE}) -else () - add_definitions(-DMASSTREE_USE=1) -endif () - -if (DEFINED PARTITION_TABLE) - add_definitions(-DPARTITION_TABLE=${PARTITION_TABLE}) -else () - add_definitions(-DPARTITION_TABLE=0) -endif () - -if (DEFINED REUSE_VERSION) - add_definitions(-DREUSE_VERSION=${REUSE_VERSION}) -else () - add_definitions(-DREUSE_VERSION=1) -endif () - -if (DEFINED SINGLE_EXEC) - add_definitions(-DSINGLE_EXEC=${CSINGLE_EXEC}) -else () - add_definitions(-DSINGLE_EXEC=0) -endif () - -if (DEFINED VAL_SIZE) - add_definitions(-DVAL_SIZE=${VAL_SIZE}) -else () - add_definitions(-DVAL_SIZE=4) -endif () - -if (DEFINED WRITE_LATEST_ONLY) - add_definitions(-DWRITE_LATEST_ONLY=${WRITE_LATEST_ONLY}) -else () - add_definitions(-DWRITE_LATEST_ONLY=0) -endif () - -if (DEFINED INSERT_READ_DELAY_MS) - add_definitions(-DINSERT_READ_DELAY_MS=${INSERT_READ_DELAY_MS}) -else () - remove_definitions(-DINSERT_READ_DELAY_MS) -endif () - -if (DEFINED INSERT_BATCH_DELAY_MS) - add_definitions(-DINSERT_BATCH_DELAY_MS=${INSERT_BATCH_DELAY_MS}) -else () - remove_definitions(-DINSERT_BATCH_DELAY_MS) -endif () - -if (DEFINED MERGE_ON_READ) - add_definitions(-DMERGE_ON_READ=${MERGE_ON_READ}) -else () - add_definitions(-DMERGE_ON_READ=0) -endif () - -if (DEFINED DEBUG_MSG) - add_definitions(-DDEBUG_MSG=${DEBUG_MSG}) -else () - add_definitions(-DDEBUG_MSG=0) -endif () +include(GNUInstallDirs) +include(CMakePackageConfigHelpers) +include(CompileOptions) + +include_directories(${THIRD_PARTY_DIR}/googletest/googletest/include) + +file(GLOB YCSB_OZE_SOURCES + "ycsb_oze.cc" + "result.cc" + "transaction.cc" + "util.cc" + "debug.cc" + ) + +file(GLOB TPCC_OZE_SOURCES + "tpcc_oze.cc" + "result.cc" + "transaction.cc" + "util.cc" + "debug.cc" + ) + +file(GLOB BOMB_OZE_SOURCES + "bomb_oze.cc" + "result.cc" + "transaction.cc" + "util.cc" + "debug.cc" + ) + +add_executable(ycsb_oze.exe ${YCSB_OZE_SOURCES}) +add_executable(tpcc_oze.exe ${TPCC_OZE_SOURCES}) +add_executable(bomb_oze.exe ${BOMB_OZE_SOURCES}) + + +foreach(t ycsb_oze.exe tpcc_oze.exe bomb_oze.exe) + target_link_libraries(${t} PRIVATE + ccbench_common + ccbench::masstree + ccbench::mimalloc + ) +endforeach() +if (DEFINED ADD_ANALYSIS) + add_definitions(-DADD_ANALYSIS=${ADD_ANALYSIS}) +else () + add_definitions(-DADD_ANALYSIS=0) +endif () + +if (DEFINED BACK_OFF) + add_definitions(-DBACK_OFF=${BACK_OFF}) +else () + add_definitions(-DBACK_OFF=1) +endif () + +if (DEFINED INLINE_VERSION_PROMOTION) + add_definitions(-DINLINE_VERSION_PROMOTION=${INLINE_VERSION_PROMOTION}) +else () + add_definitions(-DINLINE_VERSION_PROMOTION=1) +endif () + +if (DEFINED INLINE_VERSION_OPT) + add_definitions(-DINLINE_VERSION_OPT=${INLINE_VERSION_OPT}) +else () + add_definitions(-DINLINE_VERSION_OPT=1) +endif () + +if (DEFINED KEY_SIZE) + add_definitions(-DKEY_SIZE=${KEY_SIZE}) +else () + add_definitions(-DKEY_SIZE=8) +endif () + +if (DEFINED MASSTREE_USE) + add_definitions(-DMASSTREE_USE=${MASSTREE_USE}) +else () + add_definitions(-DMASSTREE_USE=1) +endif () + +if (DEFINED PARTITION_TABLE) + add_definitions(-DPARTITION_TABLE=${PARTITION_TABLE}) +else () + add_definitions(-DPARTITION_TABLE=0) +endif () + +if (DEFINED REUSE_VERSION) + add_definitions(-DREUSE_VERSION=${REUSE_VERSION}) +else () + add_definitions(-DREUSE_VERSION=1) +endif () + +if (DEFINED SINGLE_EXEC) + add_definitions(-DSINGLE_EXEC=${CSINGLE_EXEC}) +else () + add_definitions(-DSINGLE_EXEC=0) +endif () + +if (DEFINED VAL_SIZE) + add_definitions(-DVAL_SIZE=${VAL_SIZE}) +else () + add_definitions(-DVAL_SIZE=4) +endif () + +if (DEFINED WRITE_LATEST_ONLY) + add_definitions(-DWRITE_LATEST_ONLY=${WRITE_LATEST_ONLY}) +else () + add_definitions(-DWRITE_LATEST_ONLY=0) +endif () + +if (DEFINED INSERT_READ_DELAY_MS) + add_definitions(-DINSERT_READ_DELAY_MS=${INSERT_READ_DELAY_MS}) +else () + remove_definitions(-DINSERT_READ_DELAY_MS) +endif () + +if (DEFINED INSERT_BATCH_DELAY_MS) + add_definitions(-DINSERT_BATCH_DELAY_MS=${INSERT_BATCH_DELAY_MS}) +else () + remove_definitions(-DINSERT_BATCH_DELAY_MS) +endif () + +if (DEFINED MERGE_ON_READ) + add_definitions(-DMERGE_ON_READ=${MERGE_ON_READ}) +else () + add_definitions(-DMERGE_ON_READ=0) +endif () + +if (DEFINED DEBUG_MSG) + add_definitions(-DDEBUG_MSG=${DEBUG_MSG}) +else () + add_definitions(-DDEBUG_MSG=0) +endif () diff --git a/si/CMakeLists.txt b/si/CMakeLists.txt index 99499ef7..41d716d9 100644 --- a/si/CMakeLists.txt +++ b/si/CMakeLists.txt @@ -1,128 +1,96 @@ -include(GNUInstallDirs) -include(CMakePackageConfigHelpers) -include(CompileOptions) - -file(GLOB YCSB_SI_SOURCES - "../common/result.cc" - "../common/util.cc" - "ycsb_si.cc" - "garbage_collection.cc" - "result.cc" - "transaction.cc" - "util.cc" - ) - -file(GLOB TPCC_SI_SOURCES - "../common/result.cc" - "../common/util.cc" - "tpcc_si.cc" - "garbage_collection.cc" - "result.cc" - "transaction.cc" - "util.cc" - ) - -file(GLOB BOMB_SI_SOURCES - "../common/result.cc" - "../common/util.cc" - "bomb_si.cc" - "garbage_collection.cc" - "result.cc" - "transaction.cc" - "util.cc" - ) - -file(GLOB SBOMB_SI_SOURCES - "../common/result.cc" - "../common/util.cc" - "sbomb_si.cc" - "garbage_collection.cc" - "result.cc" - "transaction.cc" - "util.cc" - ) - -add_executable(ycsb_si.exe ${YCSB_SI_SOURCES}) -add_executable(tpcc_si.exe ${TPCC_SI_SOURCES}) -add_executable(bomb_si.exe ${BOMB_SI_SOURCES}) -add_executable(sbomb_si.exe ${SBOMB_SI_SOURCES}) - -target_link_libraries(ycsb_si.exe - Boost::filesystem - gflags::gflags - ${THIRD_PARTY_DIR}/mimalloc/out/release/libmimalloc.a - ${THIRD_PARTY_DIR}/masstree/libkohler_masstree_json.a - Threads::Threads - ) - -target_link_libraries(tpcc_si.exe - Boost::filesystem - gflags::gflags - ${THIRD_PARTY_DIR}/mimalloc/out/release/libmimalloc.a - ${THIRD_PARTY_DIR}/masstree/libkohler_masstree_json.a - Threads::Threads - ) - -target_link_libraries(bomb_si.exe - Boost::filesystem - gflags::gflags - ${THIRD_PARTY_DIR}/mimalloc/out/release/libmimalloc.a - ${THIRD_PARTY_DIR}/masstree/libkohler_masstree_json.a - Threads::Threads - ) - -target_link_libraries(sbomb_si.exe - Boost::filesystem - gflags::gflags - ${THIRD_PARTY_DIR}/mimalloc/out/release/libmimalloc.a - ${THIRD_PARTY_DIR}/masstree/libkohler_masstree_json.a - Threads::Threads - ) - -if (DEFINED ADD_ANALYSIS) - add_definitions(-DADD_ANALYSIS=${ADD_ANALYSIS}) -else () - add_definitions(-DADD_ANALYSIS=0) -endif () - -if (DEFINED BACK_OFF) - add_definitions(-DBACK_OFF=${BACK_OFF}) -else () - add_definitions(-DBACK_OFF=1) -endif () - -if (DEFINED KEY_SIZE) - add_definitions(-DKEY_SIZE=${KEY_SIZE}) -else () - add_definitions(-DKEY_SIZE=8) -endif () - -if (DEFINED KEY_SORT) - add_definitions(-DKEY_SORT=${KEY_SORT}) -else () - add_definitions(-DKEY_SORT=0) -endif () - -if (DEFINED MASSTREE_USE) - add_definitions(-DMASSTREE_USE=${MASSTREE_USE}) -else () - add_definitions(-DMASSTREE_USE=1) -endif () - -if (DEFINED VAL_SIZE) - add_definitions(-DVAL_SIZE=${VAL_SIZE}) -else () - add_definitions(-DVAL_SIZE=4) -endif () - -if (DEFINED INSERT_READ_DELAY_MS) - add_definitions(-DINSERT_READ_DELAY_MS=${INSERT_READ_DELAY_MS}) -else () - remove_definitions(-DINSERT_READ_DELAY_MS) -endif () - -if (DEFINED INSERT_BATCH_DELAY_MS) - add_definitions(-DINSERT_BATCH_DELAY_MS=${INSERT_BATCH_DELAY_MS}) -else () - remove_definitions(-DINSERT_BATCH_DELAY_MS) -endif () +include(GNUInstallDirs) +include(CMakePackageConfigHelpers) +include(CompileOptions) + +file(GLOB YCSB_SI_SOURCES + "ycsb_si.cc" + "garbage_collection.cc" + "result.cc" + "transaction.cc" + "util.cc" + ) + +file(GLOB TPCC_SI_SOURCES + "tpcc_si.cc" + "garbage_collection.cc" + "result.cc" + "transaction.cc" + "util.cc" + ) + +file(GLOB BOMB_SI_SOURCES + "bomb_si.cc" + "garbage_collection.cc" + "result.cc" + "transaction.cc" + "util.cc" + ) + +file(GLOB SBOMB_SI_SOURCES + "sbomb_si.cc" + "garbage_collection.cc" + "result.cc" + "transaction.cc" + "util.cc" + ) + +add_executable(ycsb_si.exe ${YCSB_SI_SOURCES}) +add_executable(tpcc_si.exe ${TPCC_SI_SOURCES}) +add_executable(bomb_si.exe ${BOMB_SI_SOURCES}) +add_executable(sbomb_si.exe ${SBOMB_SI_SOURCES}) + + +foreach(t ycsb_si.exe tpcc_si.exe bomb_si.exe sbomb_si.exe) + target_link_libraries(${t} PRIVATE + ccbench_common + ccbench::masstree + ccbench::mimalloc + ) +endforeach() +if (DEFINED ADD_ANALYSIS) + add_definitions(-DADD_ANALYSIS=${ADD_ANALYSIS}) +else () + add_definitions(-DADD_ANALYSIS=0) +endif () + +if (DEFINED BACK_OFF) + add_definitions(-DBACK_OFF=${BACK_OFF}) +else () + add_definitions(-DBACK_OFF=1) +endif () + +if (DEFINED KEY_SIZE) + add_definitions(-DKEY_SIZE=${KEY_SIZE}) +else () + add_definitions(-DKEY_SIZE=8) +endif () + +if (DEFINED KEY_SORT) + add_definitions(-DKEY_SORT=${KEY_SORT}) +else () + add_definitions(-DKEY_SORT=0) +endif () + +if (DEFINED MASSTREE_USE) + add_definitions(-DMASSTREE_USE=${MASSTREE_USE}) +else () + add_definitions(-DMASSTREE_USE=1) +endif () + +if (DEFINED VAL_SIZE) + add_definitions(-DVAL_SIZE=${VAL_SIZE}) +else () + add_definitions(-DVAL_SIZE=4) +endif () + +if (DEFINED INSERT_READ_DELAY_MS) + add_definitions(-DINSERT_READ_DELAY_MS=${INSERT_READ_DELAY_MS}) +else () + remove_definitions(-DINSERT_READ_DELAY_MS) +endif () + +if (DEFINED INSERT_BATCH_DELAY_MS) + add_definitions(-DINSERT_BATCH_DELAY_MS=${INSERT_BATCH_DELAY_MS}) +else () + remove_definitions(-DINSERT_BATCH_DELAY_MS) +endif () diff --git a/silo/CMakeLists.txt b/silo/CMakeLists.txt index c484e97a..003bdf30 100644 --- a/silo/CMakeLists.txt +++ b/silo/CMakeLists.txt @@ -1,159 +1,127 @@ -include(GNUInstallDirs) -include(CMakePackageConfigHelpers) -include(CompileOptions) - -file(GLOB YCSB_SILO_SOURCES - "../common/result.cc" - "../common/util.cc" - "result.cc" - "ycsb_silo.cc" - "transaction.cc" - "util.cc" - ) - -file(GLOB TPCC_SILO_SOURCES - "../common/result.cc" - "../common/util.cc" - "result.cc" - "tpcc_silo.cc" - "transaction.cc" - "util.cc" - ) - -file(GLOB BOMB_SILO_SOURCES - "../common/result.cc" - "../common/util.cc" - "result.cc" - "bomb_silo.cc" - "transaction.cc" - "util.cc" - ) - -file(GLOB SBOMB_SILO_SOURCES - "../common/result.cc" - "../common/util.cc" - "result.cc" - "sbomb_silo.cc" - "transaction.cc" - "util.cc" - ) - -file(GLOB REPLAY_SOURCES - "replayTest.cc" - ) - -add_executable(ycsb_silo.exe ${YCSB_SILO_SOURCES}) -add_executable(tpcc_silo.exe ${TPCC_SILO_SOURCES}) -add_executable(bomb_silo.exe ${BOMB_SILO_SOURCES}) -add_executable(sbomb_silo.exe ${SBOMB_SILO_SOURCES}) -add_executable(replay_test.exe ${REPLAY_SOURCES}) - -target_link_libraries(ycsb_silo.exe - Boost::filesystem - gflags::gflags - ${THIRD_PARTY_DIR}/mimalloc/out/release/libmimalloc.a - ${THIRD_PARTY_DIR}/masstree/libkohler_masstree_json.a - Threads::Threads - ) - -target_link_libraries(tpcc_silo.exe - Boost::filesystem - gflags::gflags - ${THIRD_PARTY_DIR}/mimalloc/out/release/libmimalloc.a - ${THIRD_PARTY_DIR}/masstree/libkohler_masstree_json.a - Threads::Threads - ) - -target_link_libraries(bomb_silo.exe - Boost::filesystem - gflags::gflags - ${THIRD_PARTY_DIR}/mimalloc/out/release/libmimalloc.a - ${THIRD_PARTY_DIR}/masstree/libkohler_masstree_json.a - Threads::Threads - ) - -target_link_libraries(sbomb_silo.exe - Boost::filesystem - gflags::gflags - ${THIRD_PARTY_DIR}/mimalloc/out/release/libmimalloc.a - ${THIRD_PARTY_DIR}/masstree/libkohler_masstree_json.a - Threads::Threads - ) - -if (DEFINED ADD_ANALYSIS) - add_definitions(-DADD_ANALYSIS=${ADD_ANALYSIS}) -else () - add_definitions(-DADD_ANALYSIS=0) -endif () - -if (DEFINED BACK_OFF) - add_definitions(-DBACK_OFF=${BACK_OFF}) -else () - add_definitions(-DBACK_OFF=1) -endif () - -if (DEFINED KEY_SIZE) - add_definitions(-DKEY_SIZE=${KEY_SIZE}) -else () - add_definitions(-DKEY_SIZE=8) -endif () - -if (DEFINED MASSTREE_USE) - add_definitions(-DMASSTREE_USE=${MASSTREE_USE}) -else () - add_definitions(-DMASSTREE_USE=1) -endif () - -if (DEFINED NO_WAIT_LOCKING_IN_VALIDATION) - add_definitions(-DNO_WAIT_LOCKING_IN_VALIDATION=${NO_WAIT_LOCKING_IN_VALIDATION}) -else () - add_definitions(-DNO_WAIT_LOCKING_IN_VALIDATION=1) -endif () - -if (DEFINED NO_WAIT_OF_TICTOC) - add_definitions(-DNO_WAIT_OF_TICTOC=${NO_WAIT_OF_TICTOC}) -else () - add_definitions(-DNO_WAIT_OF_TICTOC=0) -endif () - -if (DEFINED PARTITION_TABLE) - add_definitions(-DPARTITION_TABLE=${PARTITION_TABLE}) -else () - add_definitions(-DPARTITION_TABLE=0) -endif () - -if (DEFINED PROCEDURE_SORT) - add_definitions(-DPROCEDURE_SORT=${PROCEDURE_SORT}) -else () - add_definitions(-DPROCEDURE_SORT=0) -endif () - -if (DEFINED SLEEP_READ_PHASE) - add_definitions(-DSLEEP_READ_PHASE=${SLEEP_READ_PHASE}) -else () - add_definitions(-DSLEEP_READ_PHASE=0) -endif () - -if (DEFINED VAL_SIZE) - add_definitions(-DVAL_SIZE=${VAL_SIZE}) -else () - add_definitions(-DVAL_SIZE=4) -endif () - -if (DEFINED WAL) - add_definitions(-DWAL=${WAL}) -else () - add_definitions(-DWAL=0) -endif () - -if (DEFINED INSERT_READ_DELAY_MS) - add_definitions(-DINSERT_READ_DELAY_MS=${INSERT_READ_DELAY_MS}) -else () - remove_definitions(-DINSERT_READ_DELAY_MS) -endif () - -if (DEFINED INSERT_BATCH_DELAY_MS) - add_definitions(-DINSERT_BATCH_DELAY_MS=${INSERT_BATCH_DELAY_MS}) -else () - remove_definitions(-DINSERT_BATCH_DELAY_MS) -endif () +include(GNUInstallDirs) +include(CMakePackageConfigHelpers) +include(CompileOptions) + +file(GLOB YCSB_SILO_SOURCES + "result.cc" + "ycsb_silo.cc" + "transaction.cc" + "util.cc" + ) + +file(GLOB TPCC_SILO_SOURCES + "result.cc" + "tpcc_silo.cc" + "transaction.cc" + "util.cc" + ) + +file(GLOB BOMB_SILO_SOURCES + "result.cc" + "bomb_silo.cc" + "transaction.cc" + "util.cc" + ) + +file(GLOB SBOMB_SILO_SOURCES + "result.cc" + "sbomb_silo.cc" + "transaction.cc" + "util.cc" + ) + +file(GLOB REPLAY_SOURCES + "replayTest.cc" + ) + +add_executable(ycsb_silo.exe ${YCSB_SILO_SOURCES}) +add_executable(tpcc_silo.exe ${TPCC_SILO_SOURCES}) +add_executable(bomb_silo.exe ${BOMB_SILO_SOURCES}) +add_executable(sbomb_silo.exe ${SBOMB_SILO_SOURCES}) +add_executable(replay_test.exe ${REPLAY_SOURCES}) + +foreach(t ycsb_silo.exe tpcc_silo.exe bomb_silo.exe sbomb_silo.exe) + target_link_libraries(${t} PRIVATE + ccbench_common + ccbench::masstree + ccbench::mimalloc + ) +endforeach() + +if (DEFINED ADD_ANALYSIS) + add_definitions(-DADD_ANALYSIS=${ADD_ANALYSIS}) +else () + add_definitions(-DADD_ANALYSIS=0) +endif () + +if (DEFINED BACK_OFF) + add_definitions(-DBACK_OFF=${BACK_OFF}) +else () + add_definitions(-DBACK_OFF=1) +endif () + +if (DEFINED KEY_SIZE) + add_definitions(-DKEY_SIZE=${KEY_SIZE}) +else () + add_definitions(-DKEY_SIZE=8) +endif () + +if (DEFINED MASSTREE_USE) + add_definitions(-DMASSTREE_USE=${MASSTREE_USE}) +else () + add_definitions(-DMASSTREE_USE=1) +endif () + +if (DEFINED NO_WAIT_LOCKING_IN_VALIDATION) + add_definitions(-DNO_WAIT_LOCKING_IN_VALIDATION=${NO_WAIT_LOCKING_IN_VALIDATION}) +else () + add_definitions(-DNO_WAIT_LOCKING_IN_VALIDATION=1) +endif () + +if (DEFINED NO_WAIT_OF_TICTOC) + add_definitions(-DNO_WAIT_OF_TICTOC=${NO_WAIT_OF_TICTOC}) +else () + add_definitions(-DNO_WAIT_OF_TICTOC=0) +endif () + +if (DEFINED PARTITION_TABLE) + add_definitions(-DPARTITION_TABLE=${PARTITION_TABLE}) +else () + add_definitions(-DPARTITION_TABLE=0) +endif () + +if (DEFINED PROCEDURE_SORT) + add_definitions(-DPROCEDURE_SORT=${PROCEDURE_SORT}) +else () + add_definitions(-DPROCEDURE_SORT=0) +endif () + +if (DEFINED SLEEP_READ_PHASE) + add_definitions(-DSLEEP_READ_PHASE=${SLEEP_READ_PHASE}) +else () + add_definitions(-DSLEEP_READ_PHASE=0) +endif () + +if (DEFINED VAL_SIZE) + add_definitions(-DVAL_SIZE=${VAL_SIZE}) +else () + add_definitions(-DVAL_SIZE=4) +endif () + +if (DEFINED WAL) + add_definitions(-DWAL=${WAL}) +else () + add_definitions(-DWAL=0) +endif () + +if (DEFINED INSERT_READ_DELAY_MS) + add_definitions(-DINSERT_READ_DELAY_MS=${INSERT_READ_DELAY_MS}) +else () + remove_definitions(-DINSERT_READ_DELAY_MS) +endif () + +if (DEFINED INSERT_BATCH_DELAY_MS) + add_definitions(-DINSERT_BATCH_DELAY_MS=${INSERT_BATCH_DELAY_MS}) +else () + remove_definitions(-DINSERT_BATCH_DELAY_MS) +endif () diff --git a/ss2pl/CMakeLists.txt b/ss2pl/CMakeLists.txt index 8efde737..67255686 100644 --- a/ss2pl/CMakeLists.txt +++ b/ss2pl/CMakeLists.txt @@ -1,78 +1,66 @@ -include(GNUInstallDirs) -include(CMakePackageConfigHelpers) -include(CompileOptions) - -file(GLOB BOMB_SS2PL_SOURCES - "../common/result.cc" - "../common/util.cc" - "result.cc" - "bomb_ss2pl.cc" - "transaction.cc" - "util.cc" - ) - -file(GLOB TPCC_SS2PL_SOURCES - "../common/result.cc" - "../common/util.cc" - "result.cc" - "tpcc_ss2pl.cc" - "transaction.cc" - "util.cc" - ) - -add_executable(bomb_ss2pl.exe ${BOMB_SS2PL_SOURCES}) -add_executable(tpcc_ss2pl.exe ${TPCC_SS2PL_SOURCES}) - -target_link_libraries(bomb_ss2pl.exe - Boost::filesystem - gflags::gflags - ${THIRD_PARTY_DIR}/mimalloc/out/release/libmimalloc.a - ${THIRD_PARTY_DIR}/masstree/libkohler_masstree_json.a - Threads::Threads - ) - -target_link_libraries(tpcc_ss2pl.exe - Boost::filesystem - gflags::gflags - ${THIRD_PARTY_DIR}/mimalloc/out/release/libmimalloc.a - ${THIRD_PARTY_DIR}/masstree/libkohler_masstree_json.a - Threads::Threads - ) - -if (DEFINED ADD_ANALYSIS) - add_definitions(-DADD_ANALYSIS=${ADD_ANALYSIS}) -else () - add_definitions(-DADD_ANALYSIS=0) -endif () - -if (DEFINED BACK_OFF) - add_definitions(-DBACK_OFF=${BACK_OFF}) -else () - add_definitions(-DBACK_OFF=1) -endif () - -add_definitions(-DDLR1) - -if (DEFINED KEY_SIZE) - add_definitions(-DKEY_SIZE=${KEY_SIZE}) -else () - add_definitions(-DKEY_SIZE=8) -endif () - -if (DEFINED KEY_SORT) - add_definitions(-DKEY_SORT=${KEY_SORT}) -else () - add_definitions(-DKEY_SORT=0) -endif () - -if (DEFINED MASSTREE_USE) - add_definitions(-DMASSTREE_USE=${MASSTREE_USE}) -else () - add_definitions(-DMASSTREE_USE=1) -endif () - -if (DEFINED VAL_SIZE) - add_definitions(-DVAL_SIZE=${VAL_SIZE}) -else () - add_definitions(-DVAL_SIZE=4) -endif () +include(GNUInstallDirs) +include(CMakePackageConfigHelpers) +include(CompileOptions) + +file(GLOB BOMB_SS2PL_SOURCES + "result.cc" + "bomb_ss2pl.cc" + "transaction.cc" + "util.cc" + ) + +file(GLOB TPCC_SS2PL_SOURCES + "result.cc" + "tpcc_ss2pl.cc" + "transaction.cc" + "util.cc" + ) + +add_executable(bomb_ss2pl.exe ${BOMB_SS2PL_SOURCES}) +add_executable(tpcc_ss2pl.exe ${TPCC_SS2PL_SOURCES}) + + +foreach(t bomb_ss2pl.exe tpcc_ss2pl.exe) + target_link_libraries(${t} PRIVATE + ccbench_common + ccbench::masstree + ccbench::mimalloc + ) +endforeach() +if (DEFINED ADD_ANALYSIS) + add_definitions(-DADD_ANALYSIS=${ADD_ANALYSIS}) +else () + add_definitions(-DADD_ANALYSIS=0) +endif () + +if (DEFINED BACK_OFF) + add_definitions(-DBACK_OFF=${BACK_OFF}) +else () + add_definitions(-DBACK_OFF=1) +endif () + +add_definitions(-DDLR1) + +if (DEFINED KEY_SIZE) + add_definitions(-DKEY_SIZE=${KEY_SIZE}) +else () + add_definitions(-DKEY_SIZE=8) +endif () + +if (DEFINED KEY_SORT) + add_definitions(-DKEY_SORT=${KEY_SORT}) +else () + add_definitions(-DKEY_SORT=0) +endif () + +if (DEFINED MASSTREE_USE) + add_definitions(-DMASSTREE_USE=${MASSTREE_USE}) +else () + add_definitions(-DMASSTREE_USE=1) +endif () + +if (DEFINED VAL_SIZE) + add_definitions(-DVAL_SIZE=${VAL_SIZE}) +else () + add_definitions(-DVAL_SIZE=4) +endif () diff --git a/tictoc/CMakeLists.txt b/tictoc/CMakeLists.txt index 62c7b6c7..cd1eaa32 100644 --- a/tictoc/CMakeLists.txt +++ b/tictoc/CMakeLists.txt @@ -1,142 +1,110 @@ -include(GNUInstallDirs) -include(CMakePackageConfigHelpers) -include(CompileOptions) - -file(GLOB YCSB_TICTOC_SOURCES - "../common/result.cc" - "../common/util.cc" - "result.cc" - "ycsb_tictoc.cc" - "transaction.cc" - "util.cc" - ) - -file(GLOB TPCC_TICTOC_SOURCES - "../common/result.cc" - "../common/util.cc" - "result.cc" - "tpcc_tictoc.cc" - "transaction.cc" - "util.cc" - ) - -file(GLOB BOMB_TICTOC_SOURCES - "../common/result.cc" - "../common/util.cc" - "result.cc" - "bomb_tictoc.cc" - "transaction.cc" - "util.cc" - ) - -file(GLOB SBOMB_TICTOC_SOURCES - "../common/result.cc" - "../common/util.cc" - "result.cc" - "sbomb_tictoc.cc" - "transaction.cc" - "util.cc" - ) - -add_executable(ycsb_tictoc.exe ${YCSB_TICTOC_SOURCES}) -add_executable(tpcc_tictoc.exe ${TPCC_TICTOC_SOURCES}) -add_executable(bomb_tictoc.exe ${BOMB_TICTOC_SOURCES}) -add_executable(sbomb_tictoc.exe ${SBOMB_TICTOC_SOURCES}) - -target_link_libraries(ycsb_tictoc.exe - Boost::filesystem - gflags::gflags - ${THIRD_PARTY_DIR}/mimalloc/out/release/libmimalloc.a - ${THIRD_PARTY_DIR}/masstree/libkohler_masstree_json.a - Threads::Threads - ) - -target_link_libraries(tpcc_tictoc.exe - Boost::filesystem - gflags::gflags - ${THIRD_PARTY_DIR}/mimalloc/out/release/libmimalloc.a - ${THIRD_PARTY_DIR}/masstree/libkohler_masstree_json.a - Threads::Threads - ) - -target_link_libraries(bomb_tictoc.exe - Boost::filesystem - gflags::gflags - ${THIRD_PARTY_DIR}/mimalloc/out/release/libmimalloc.a - ${THIRD_PARTY_DIR}/masstree/libkohler_masstree_json.a - Threads::Threads - ) - -target_link_libraries(sbomb_tictoc.exe - Boost::filesystem - gflags::gflags - ${THIRD_PARTY_DIR}/mimalloc/out/release/libmimalloc.a - ${THIRD_PARTY_DIR}/masstree/libkohler_masstree_json.a - Threads::Threads - ) - -if (DEFINED ADD_ANALYSIS) - add_definitions(-DADD_ANALYSIS=${ADD_ANALYSIS}) -else () - add_definitions(-DADD_ANALYSIS=0) -endif () - -if (DEFINED BACK_OFF) - add_definitions(-DBACK_OFF=${BACK_OFF}) -else () - add_definitions(-DBACK_OFF=1) -endif () - -if (DEFINED KEY_SIZE) - add_definitions(-DKEY_SIZE=${KEY_SIZE}) -else () - add_definitions(-DKEY_SIZE=8) -endif () - -if (DEFINED MASSTREE_USE) - add_definitions(-DMASSTREE_USE=${MASSTREE_USE}) -else () - add_definitions(-DMASSTREE_USE=1) -endif () - -if (DEFINED NO_WAIT_LOCKING_IN_VALIDATION) - add_definitions(-DNO_WAIT_LOCKING_IN_VALIDATION=${NO_WAIT_LOCKING_IN_VALIDATION}) -else () - add_definitions(-DNO_WAIT_LOCKING_IN_VALIDATION=1) -endif () - -if (DEFINED NO_WAIT_OF_TICTOC) - add_definitions(-DNO_WAIT_OF_TICTOC=${NO_WAIT_OF_TICTOC}) -else () - add_definitions(-DNO_WAIT_OF_TICTOC=0) -endif () - -if (DEFINED PARTITION_TABLE) - add_definitions(-DPARTITION_TABLE=${PARTITION_TABLE}) -else () - add_definitions(-DPARTITION_TABLE=0) -endif () - -if (DEFINED PREEMPTIVE_ABORTS) - add_definitions(-DPREEMPTIVE_ABORTS=${PREEMPTIVE_ABORTS}) -else () - add_definitions(-DPREEMPTIVE_ABORTS=1) -endif () - -if (DEFINED SLEEP_READ_PHASE) - add_definitions(-DSLEEP_READ_PHASE=${SLEEP_READ_PHASE}) -else () - add_definitions(-DSLEEP_READ_PHASE=0) -endif () - -if (DEFINED TIMESTAMP_HISTORY) - add_definitions(-DTIMESTAMP_HISTORY=${TIMESTAMP_HISTORY}) -else () - add_definitions(-DTIMESTAMP_HISTORY=1) -endif () - -if (DEFINED VAL_SIZE) - add_definitions(-DVAL_SIZE=${VAL_SIZE}) -else () - add_definitions(-DVAL_SIZE=4) -endif () +include(GNUInstallDirs) +include(CMakePackageConfigHelpers) +include(CompileOptions) + +file(GLOB YCSB_TICTOC_SOURCES + "result.cc" + "ycsb_tictoc.cc" + "transaction.cc" + "util.cc" + ) + +file(GLOB TPCC_TICTOC_SOURCES + "result.cc" + "tpcc_tictoc.cc" + "transaction.cc" + "util.cc" + ) + +file(GLOB BOMB_TICTOC_SOURCES + "result.cc" + "bomb_tictoc.cc" + "transaction.cc" + "util.cc" + ) + +file(GLOB SBOMB_TICTOC_SOURCES + "result.cc" + "sbomb_tictoc.cc" + "transaction.cc" + "util.cc" + ) + +add_executable(ycsb_tictoc.exe ${YCSB_TICTOC_SOURCES}) +add_executable(tpcc_tictoc.exe ${TPCC_TICTOC_SOURCES}) +add_executable(bomb_tictoc.exe ${BOMB_TICTOC_SOURCES}) +add_executable(sbomb_tictoc.exe ${SBOMB_TICTOC_SOURCES}) + + +foreach(t ycsb_tictoc.exe tpcc_tictoc.exe bomb_tictoc.exe sbomb_tictoc.exe) + target_link_libraries(${t} PRIVATE + ccbench_common + ccbench::masstree + ccbench::mimalloc + ) +endforeach() +if (DEFINED ADD_ANALYSIS) + add_definitions(-DADD_ANALYSIS=${ADD_ANALYSIS}) +else () + add_definitions(-DADD_ANALYSIS=0) +endif () + +if (DEFINED BACK_OFF) + add_definitions(-DBACK_OFF=${BACK_OFF}) +else () + add_definitions(-DBACK_OFF=1) +endif () + +if (DEFINED KEY_SIZE) + add_definitions(-DKEY_SIZE=${KEY_SIZE}) +else () + add_definitions(-DKEY_SIZE=8) +endif () + +if (DEFINED MASSTREE_USE) + add_definitions(-DMASSTREE_USE=${MASSTREE_USE}) +else () + add_definitions(-DMASSTREE_USE=1) +endif () + +if (DEFINED NO_WAIT_LOCKING_IN_VALIDATION) + add_definitions(-DNO_WAIT_LOCKING_IN_VALIDATION=${NO_WAIT_LOCKING_IN_VALIDATION}) +else () + add_definitions(-DNO_WAIT_LOCKING_IN_VALIDATION=1) +endif () + +if (DEFINED NO_WAIT_OF_TICTOC) + add_definitions(-DNO_WAIT_OF_TICTOC=${NO_WAIT_OF_TICTOC}) +else () + add_definitions(-DNO_WAIT_OF_TICTOC=0) +endif () + +if (DEFINED PARTITION_TABLE) + add_definitions(-DPARTITION_TABLE=${PARTITION_TABLE}) +else () + add_definitions(-DPARTITION_TABLE=0) +endif () + +if (DEFINED PREEMPTIVE_ABORTS) + add_definitions(-DPREEMPTIVE_ABORTS=${PREEMPTIVE_ABORTS}) +else () + add_definitions(-DPREEMPTIVE_ABORTS=1) +endif () + +if (DEFINED SLEEP_READ_PHASE) + add_definitions(-DSLEEP_READ_PHASE=${SLEEP_READ_PHASE}) +else () + add_definitions(-DSLEEP_READ_PHASE=0) +endif () + +if (DEFINED TIMESTAMP_HISTORY) + add_definitions(-DTIMESTAMP_HISTORY=${TIMESTAMP_HISTORY}) +else () + add_definitions(-DTIMESTAMP_HISTORY=1) +endif () + +if (DEFINED VAL_SIZE) + add_definitions(-DVAL_SIZE=${VAL_SIZE}) +else () + add_definitions(-DVAL_SIZE=4) +endif ()