Skip to content
Snippets Groups Projects
Commit 2c60a941 authored by Sergey Kaplun's avatar Sergey Kaplun Committed by Sergey Ostanevich
Browse files

perf: save perf results for the benchmarks

This patch saves the output of the performance tests in the JSON format
to be processed later. The corresponding directory is added to the
<.gitignore>.

NO_DOC=perf test
NO_CHANGELOG=perf test
NO_TEST=perf test
parent cd2f4838
No related branches found
No related tags found
No related merge requests found
......@@ -43,6 +43,7 @@ extra/Makefile
extra/*/Makefile
perf/Makefile
perf/lua/Makefile
perf/output/
test/Makefile
test/*/Makefile
test/*/*/Makefile
......
set(CMAKE_CXX_STANDARD 14)
set(PERF_OUTPUT_DIR ${PROJECT_BINARY_DIR}/perf/output)
file(MAKE_DIRECTORY ${PERF_OUTPUT_DIR})
add_subdirectory(lua)
find_package(benchmark QUIET)
......@@ -40,6 +43,8 @@ function(create_perf_test_target)
message(STATUS "Creating C performance test ${PERF_TARGET}_perftest")
add_custom_target(${PERF_TARGET}_perftest
COMMAND "$<TARGET_FILE:${PERF_TARGET}.perftest>"
"--benchmark_out_format=json"
"--benchmark_out=${PERF_OUTPUT_DIR}/${PERF_TARGET}.json"
DEPENDS ${PERF_TARGET}.perftest
COMMENT Running ${PERF_TARGET}_perftest
)
......
......@@ -23,6 +23,8 @@ function(create_perf_lua_test)
COMMAND ${CMAKE_COMMAND} -E env
LUA_PATH="${LUA_PATH}"
${TARANTOOL_BIN} ${TEST_PATH}
--output="${PERF_OUTPUT_DIR}/${PERF_NAME}.json"
--output_format=json
COMMENT Running ${PERF_NAME}_perftest
DEPENDS tarantool ${TEST_PATH}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment