Skip to content
Snippets Groups Projects
Unverified Commit 81b624fb authored by Sergey Bronnikov's avatar Sergey Bronnikov Committed by Igor Munkin
Browse files

perf: add targets for running Lua performance tests

The patch adds a targets for each Lua performance test in a directory
perf/lua/ (1mops_write_perftest, box_select_perftest,
uri_escape_unescape_perftest) and a separate target "test-lua-perf" that
runs all Lua performance tests at once.

NO_CHANGELOG=testing
NO_DOC=testing
NO_TEST=test infrastructure

(cherry picked from commit 49d9a874)
parent 77bd900b
No related branches found
No related tags found
No related merge requests found
set(CMAKE_CXX_STANDARD 14)
add_subdirectory(lua)
find_package(benchmark QUIET)
if (NOT ${benchmark_FOUND})
message(AUTHOR_WARNING "Google Benchmark library was not found")
......
set(TARANTOOL_BIN $<TARGET_FILE:tarantool>)
set(RUN_PERF_LUA_TESTS_LIST "")
function(create_perf_lua_test)
set(prefix PERF)
set(noValues)
set(singleValues NAME)
set(multiValues)
# FIXME: if we update to CMake >= 3.5, can remove this line.
include(CMakeParseArguments)
cmake_parse_arguments(${prefix}
"${noValues}"
"${singleValues}"
"${multiValues}"
${ARGN})
message(STATUS "Creating Lua performance test ${PERF_NAME}_perftest")
set(TEST_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${PERF_NAME}.lua)
add_custom_target(${PERF_NAME}_perftest
COMMAND ${TARANTOOL_BIN} ${TEST_PATH}
COMMENT Running ${PERF_NAME}_perftest
DEPENDS tarantool ${TEST_PATH}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
set(RUN_PERF_LUA_TESTS_LIST ${RUN_PERF_LUA_TESTS_LIST} ${PERF_NAME}_perftest PARENT_SCOPE)
endfunction()
create_perf_lua_test(NAME 1mops_write)
create_perf_lua_test(NAME box_select)
create_perf_lua_test(NAME uri_escape_unescape)
add_custom_target(test-lua-perf
DEPENDS "${RUN_PERF_LUA_TESTS_LIST}"
COMMENT "Running Lua performance tests"
)
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