mirror of
https://github.com/boostorg/beast.git
synced 2025-08-03 14:54:32 +02:00
Move benchmarks to a separate project
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
# Part of Beast
|
||||
|
||||
add_subdirectory (benchmarks)
|
||||
add_subdirectory (core)
|
||||
add_subdirectory (http)
|
||||
add_subdirectory (server)
|
||||
|
@@ -14,6 +14,7 @@ compile version.cpp : <variant>coverage:<build>no : ;
|
||||
compile websocket.cpp : <variant>coverage:<build>no : ;
|
||||
compile zlib.cpp : <variant>coverage:<build>no : ;
|
||||
|
||||
build-project benchmarks ;
|
||||
build-project core ;
|
||||
build-project http ;
|
||||
build-project server ;
|
||||
|
27
test/benchmarks/CMakeLists.txt
Normal file
27
test/benchmarks/CMakeLists.txt
Normal file
@@ -0,0 +1,27 @@
|
||||
# Part of Beast
|
||||
|
||||
if (NOT "${VARIANT}" STREQUAL "coverage")
|
||||
|
||||
GroupSources(extras/beast extras)
|
||||
GroupSources(include/beast beast)
|
||||
GroupSources(test/benchmarks "/")
|
||||
GroupSources(test/http "/")
|
||||
|
||||
add_executable (benchmarks
|
||||
${BEAST_INCLUDES}
|
||||
${EXTRAS_INCLUDES}
|
||||
../../extras/beast/unit_test/main.cpp
|
||||
../http/message_fuzz.hpp
|
||||
nodejs_parser.hpp
|
||||
buffers.cpp
|
||||
nodejs_parser.cpp
|
||||
parser.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(benchmarks
|
||||
Beast
|
||||
${Boost_PROGRAM_OPTIONS_LIBRARY}
|
||||
${Boost_FILESYSTEM_LIBRARY}
|
||||
)
|
||||
|
||||
endif()
|
15
test/benchmarks/Jamfile
Normal file
15
test/benchmarks/Jamfile
Normal file
@@ -0,0 +1,15 @@
|
||||
#
|
||||
# Copyright (c) 2013-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
|
||||
#
|
||||
# Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
#
|
||||
|
||||
unit-test benchmarks :
|
||||
../../extras/beast/unit_test/main.cpp
|
||||
buffers.cpp
|
||||
nodejs_parser.cpp
|
||||
parser.cpp
|
||||
:
|
||||
<variant>coverage:<build>no
|
||||
;
|
@@ -20,7 +20,7 @@
|
||||
|
||||
namespace beast {
|
||||
|
||||
class buffer_bench_test : public beast::unit_test::suite
|
||||
class buffers_test : public beast::unit_test::suite
|
||||
{
|
||||
public:
|
||||
using size_type = std::uint64_t;
|
||||
@@ -233,8 +233,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
#if defined(NDEBUG) && ! BEAST_NO_SLOW_TESTS
|
||||
BEAST_DEFINE_TESTSUITE(buffer_bench,core,beast);
|
||||
#endif
|
||||
BEAST_DEFINE_TESTSUITE(buffers,benchmarks,beast);
|
||||
|
||||
} // beast
|
@@ -6,7 +6,7 @@
|
||||
//
|
||||
|
||||
#include "nodejs_parser.hpp"
|
||||
#include "message_fuzz.hpp"
|
||||
#include "../http/message_fuzz.hpp"
|
||||
|
||||
#include <beast/http.hpp>
|
||||
#include <beast/core/consuming_buffers.hpp>
|
||||
@@ -22,7 +22,7 @@
|
||||
namespace beast {
|
||||
namespace http {
|
||||
|
||||
class parser_bench_test : public beast::unit_test::suite
|
||||
class parser_test : public beast::unit_test::suite
|
||||
{
|
||||
public:
|
||||
static std::size_t constexpr N = 2000;
|
||||
@@ -270,7 +270,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
BEAST_DEFINE_TESTSUITE(parser_bench,http,beast);
|
||||
BEAST_DEFINE_TESTSUITE(parser,benchmarks,beast);
|
||||
|
||||
} // http
|
||||
} // beast
|
@@ -12,7 +12,6 @@ add_executable (core-tests
|
||||
../../extras/beast/unit_test/main.cpp
|
||||
async_result.cpp
|
||||
bind_handler.cpp
|
||||
buffer_bench.cpp
|
||||
buffer_cat.cpp
|
||||
buffer_prefix.cpp
|
||||
buffer_test.hpp
|
||||
|
@@ -9,7 +9,6 @@ unit-test core-tests :
|
||||
../../extras/beast/unit_test/main.cpp
|
||||
async_result.cpp
|
||||
bind_handler.cpp
|
||||
buffer_bench.cpp
|
||||
buffer_cat.cpp
|
||||
buffer_prefix.cpp
|
||||
buffered_read_stream.cpp
|
||||
|
@@ -43,21 +43,3 @@ target_link_libraries(http-tests
|
||||
${Boost_THREAD_LIBRARY}
|
||||
${Boost_CONTEXT_LIBRARY}
|
||||
)
|
||||
|
||||
if (NOT "${VARIANT}" STREQUAL "coverage")
|
||||
add_executable (http-bench
|
||||
${BEAST_INCLUDES}
|
||||
${EXTRAS_INCLUDES}
|
||||
nodejs_parser.hpp
|
||||
message_fuzz.hpp
|
||||
../../extras/beast/unit_test/main.cpp
|
||||
nodejs_parser.cpp
|
||||
parser_bench.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(http-bench
|
||||
Beast
|
||||
${Boost_PROGRAM_OPTIONS_LIBRARY}
|
||||
${Boost_FILESYSTEM_LIBRARY}
|
||||
)
|
||||
endif()
|
||||
|
@@ -27,9 +27,3 @@ unit-test http-tests :
|
||||
verb.cpp
|
||||
write.cpp
|
||||
;
|
||||
|
||||
unit-test http-bench :
|
||||
../../extras/beast/unit_test/main.cpp
|
||||
nodejs_parser.cpp
|
||||
parser_bench.cpp
|
||||
;
|
||||
|
Reference in New Issue
Block a user