-
-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #278 from alex-sparus/immer-archive
Immer persist
- Loading branch information
Showing
176 changed files
with
15,757 additions
and
1,097 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,37 @@ | ||
|
||
# Config | ||
# ====== | ||
# Config | ||
# ====== | ||
|
||
option(CHECK_BENCHMARKS "Run benchmarks on check target" off) | ||
option(BENCHMARK_DISABLE_GC "Disable gc during a measurement") | ||
|
||
set(BENCHMARK_PARAM "N:1000" CACHE STRING "Benchmark parameters") | ||
set(BENCHMARK_SAMPLES "20" CACHE STRING "Benchmark samples") | ||
set(BENCHMARK_PARAM | ||
"N:1000" | ||
CACHE STRING "Benchmark parameters") | ||
set(BENCHMARK_SAMPLES | ||
"20" | ||
CACHE STRING "Benchmark samples") | ||
|
||
# Dependencies | ||
# ============ | ||
# Dependencies | ||
# ============ | ||
|
||
find_package(RRB) | ||
|
||
if (NOT RRB_FOUND) | ||
if(NOT RRB_FOUND) | ||
message(STATUS "Disabling benchmarks") | ||
return() | ||
endif() | ||
|
||
# These are expected to be in the include path, the nix-shell | ||
# environment installs them: | ||
# These are expected to be in the include path, the nix-shell environment | ||
# installs them: | ||
# | ||
# https://github.com/marcusz/steady | ||
# https://github.com/deepsea-inria/chunkedseq.git | ||
# https://github.com/rsms/immutable-cpp.git | ||
# https://github.com/marcusz/steady | ||
# https://github.com/deepsea-inria/chunkedseq.git | ||
# https://github.com/rsms/immutable-cpp.git | ||
|
||
# Targets | ||
# ======= | ||
# Targets | ||
# ======= | ||
|
||
add_custom_target(benchmarks | ||
COMMENT "Build all benchmarks.") | ||
add_custom_target(benchmarks COMMENT "Build all benchmarks.") | ||
|
||
execute_process( | ||
COMMAND git log -1 --format=%h | ||
|
@@ -43,7 +45,7 @@ execute_process( | |
OUTPUT_VARIABLE immer_git_status | ||
OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
|
||
if (NOT immer_git_status STREQUAL "") | ||
if(NOT immer_git_status STREQUAL "") | ||
set(immer_git_commit_hash "${immer_git_commit_hash}+") | ||
endif() | ||
|
||
|
@@ -52,7 +54,8 @@ site_name(immer_hostname) | |
get_filename_component(immer_compiler_name "${CMAKE_CXX_COMPILER}" NAME) | ||
|
||
set(immer_benchmark_report_base_dir "${CMAKE_SOURCE_DIR}/reports") | ||
set(immer_benchmark_report_dir "${immer_benchmark_report_base_dir}/report_\ | ||
set(immer_benchmark_report_dir | ||
"${immer_benchmark_report_base_dir}/report_\ | ||
${immer_git_commit_hash}_\ | ||
${immer_hostname}_\ | ||
${immer_compiler_name}_\ | ||
|
@@ -75,9 +78,9 @@ if(CHECK_BENCHMARKS) | |
add_dependencies(check benchmarks) | ||
endif() | ||
|
||
add_custom_target(benchmark-report-dir | ||
COMMAND ${CMAKE_COMMAND} | ||
-E make_directory ${immer_benchmark_report_dir}) | ||
add_custom_target( | ||
benchmark-report-dir COMMAND ${CMAKE_COMMAND} -E make_directory | ||
${immer_benchmark_report_dir}) | ||
|
||
file(GLOB_RECURSE immer_benchmarks "*.cpp") | ||
foreach(_file IN LISTS immer_benchmarks) | ||
|
@@ -87,36 +90,41 @@ foreach(_file IN LISTS immer_benchmarks) | |
add_dependencies(benchmarks ${_target}) | ||
add_dependencies(${_target} benchmark-report-dir) | ||
target_compile_options(${_target} PUBLIC -Wno-unused-function) | ||
target_compile_definitions(${_target} PUBLIC | ||
NONIUS_RUNNER | ||
IMMER_BENCHMARK_LIBRRB=1 | ||
IMMER_BENCHMARK_STEADY=1 | ||
IMMER_BENCHMARK_EXPERIMENTAL=0 | ||
IMMER_BENCHMARK_DISABLE_GC=${BENCHMARK_DISABLE_GC} | ||
IMMER_BENCHMARK_BOOST_COROUTINE=${ENABLE_BOOST_COROUTINE}) | ||
target_link_libraries(${_target} PUBLIC | ||
immer-dev | ||
${RRB_LIBRARIES}) | ||
target_include_directories(${_target} SYSTEM PUBLIC | ||
${RRB_INCLUDE_DIR}) | ||
target_compile_definitions( | ||
${_target} | ||
PUBLIC NONIUS_RUNNER | ||
IMMER_BENCHMARK_LIBRRB=1 | ||
IMMER_BENCHMARK_STEADY=1 | ||
IMMER_BENCHMARK_EXPERIMENTAL=0 | ||
IMMER_BENCHMARK_DISABLE_GC=${BENCHMARK_DISABLE_GC} | ||
IMMER_BENCHMARK_BOOST_COROUTINE=${ENABLE_BOOST_COROUTINE}) | ||
target_link_libraries(${_target} PUBLIC immer-dev ${RRB_LIBRARIES}) | ||
target_include_directories(${_target} SYSTEM PUBLIC ${RRB_INCLUDE_DIR}) | ||
if(CHECK_BENCHMARKS) | ||
add_test("benchmark/${_output}" "${CMAKE_SOURCE_DIR}/tools/with-tee.bash" | ||
add_test( | ||
"benchmark/${_output}" | ||
"${CMAKE_SOURCE_DIR}/tools/with-tee.bash" | ||
${immer_benchmark_report_dir}/${_target}.out | ||
"${CMAKE_CURRENT_BINARY_DIR}/${_output}" -v | ||
-t ${_target} | ||
-r html | ||
-s ${BENCHMARK_SAMPLES} | ||
-p ${BENCHMARK_PARAM} | ||
-o ${immer_benchmark_report_dir}/${_target}.html) | ||
"${CMAKE_CURRENT_BINARY_DIR}/${_output}" | ||
-v | ||
-t | ||
${_target} | ||
-r | ||
html | ||
-s | ||
${BENCHMARK_SAMPLES} | ||
-p | ||
${BENCHMARK_PARAM} | ||
-o | ||
${immer_benchmark_report_dir}/${_target}.html) | ||
endif() | ||
endforeach() | ||
|
||
add_custom_target(upload-benchmark-reports | ||
COMMAND | ||
rsync -av ${immer_benchmark_report_base_dir} | ||
[email protected]:/var/lib/syncthing/public/misc/immer/) | ||
add_custom_target( | ||
upload-benchmark-reports | ||
COMMAND rsync -av ${immer_benchmark_report_base_dir} | ||
[email protected]:/var/lib/syncthing/public/misc/immer/) | ||
|
||
add_custom_target(copy-benchmark-reports | ||
COMMAND | ||
rsync -av ${immer_benchmark_report_base_dir} | ||
~/public/misc/immer/) | ||
add_custom_target( | ||
copy-benchmark-reports COMMAND rsync -av ${immer_benchmark_report_base_dir} | ||
~/public/misc/immer/) |
Oops, something went wrong.