Skip to content

Commit

Permalink
Add benchmarking library
Browse files Browse the repository at this point in the history
  • Loading branch information
pwojcikdev committed Mar 25, 2024
1 parent 1713dd3 commit f55b903
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,6 @@
[submodule "submodules/fmt"]
path = submodules/fmt
url = https://github.com/fmtlib/fmt.git
[submodule "submodules/benchmark"]
path = submodules/benchmark
url = https://github.com/google/benchmark.git
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -738,10 +738,15 @@ if(NANO_TEST OR RAIBLOCKS_TEST)
gtest PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${CMAKE_SOURCE_DIR}/submodules/gtest/googletest/include")

set(BENCHMARK_ENABLE_TESTING OFF)
add_subdirectory(submodules/benchmark)

add_subdirectory(nano/test_common)
add_subdirectory(nano/core_test)
add_subdirectory(nano/rpc_test)
add_subdirectory(nano/slow_test)
add_subdirectory(nano/benchmarks)

add_custom_target(
all_tests
COMMAND echo "BATCH BUILDING TESTS"
Expand Down
5 changes: 5 additions & 0 deletions nano/benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
add_executable(benchmarks entry.cpp)

target_link_libraries(benchmarks test_common benchmark::benchmark)

include_directories(${CMAKE_SOURCE_DIR}/submodules)
Empty file added nano/benchmarks/entry.cpp
Empty file.
1 change: 1 addition & 0 deletions submodules/benchmark
Submodule benchmark added at eaafe6

0 comments on commit f55b903

Please sign in to comment.