Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Add perf test for http client #2442

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xemul
Copy link
Contributor

@xemul xemul commented Sep 18, 2024

The test opens a server socket that reads socket up until double CRLF and then responds back with "HTTP/1.1 200 OK host: test" line in a loop. Then runs http client against it measuring time it takes to perform the given amount of requests. It uses in-memory loopback sockets (seastar wrapper around seastar::queue).

tests/perf/CMakeLists.txt Outdated Show resolved Hide resolved
@xemul
Copy link
Contributor Author

xemul commented Sep 19, 2024

upd:

  • fixed trash in CMakefile
  • removed unused capture on lambda
  • added total mallocs stats

@xemul
Copy link
Contributor Author

xemul commented Sep 19, 2024

@tchaikov , CI fails compiling a file that's not touched by this PR:

[208/360] Building CXX object tests/unit/CMakeFiles/test_unit_rpc.dir/rpc_test.cc.o
FAILED: tests/unit/CMakeFiles/test_unit_rpc.dir/rpc_test.cc.o 
ccache /usr/bin/g++ -DBOOST_ALL_DYN_LINK -DFMT_SHARED -DSEASTAR_API_LEVEL=7 -DSEASTAR_BUILD_SHARED_LIBS -DSEASTAR_DEFERRED_ACTION_REQUIRE_NOEXCEPT -DSEASTAR_DEPRECATED_OSTREAM_FORMATTERS -DSEASTAR_ENABLE_ALLOC_FAILURE_INJECTION -DSEASTAR_HAS_MEMBARRIER -DSEASTAR_HAVE_ASAN_FIBER_SUPPORT -DSEASTAR_HAVE_HWLOC -DSEASTAR_HAVE_NUMA -DSEASTAR_HAVE_SYSTEMTAP_SDT -DSEASTAR_HAVE_URING -DSEASTAR_LOGGER_COMPILE_TIME_FMT -DSEASTAR_LOGGER_TYPE_STDOUT -DSEASTAR_SCHEDULING_GROUPS_COUNT=16 -DSEASTAR_SSTRING -DSEASTAR_TESTING_MAIN -DSEASTAR_TESTING_WITH_NETWORKING=1 -DSEASTAR_TYPE_ERASE_MORE -I/__w/seastar/seastar/tests/unit -I/__w/seastar/seastar/src -I/__w/seastar/seastar/include -I/__w/seastar/seastar/build/dev/gen/include -I/__w/seastar/seastar/build/dev/gen/src -O1 -std=gnu++23 -Wno-maybe-uninitialized -Wno-error=unused-result -fstack-clash-protection -UNDEBUG -Wall -Werror -Wimplicit-fallthrough -Wdeprecated -Wno-error=deprecated -Wno-error=stringop-overflow -Wno-error=array-bounds -Wdeprecated-declarations -Wno-error=deprecated-declarations -ftls-model=initial-exec -gz -MD -MT tests/unit/CMakeFiles/test_unit_rpc.dir/rpc_test.cc.o -MF tests/unit/CMakeFiles/test_unit_rpc.dir/rpc_test.cc.o.d -o tests/unit/CMakeFiles/test_unit_rpc.dir/rpc_test.cc.o -c /__w/seastar/seastar/tests/unit/rpc_test.cc
/__w/seastar/seastar/tests/unit/rpc_test.cc: In lambda function:
/__w/seastar/seastar/tests/unit/rpc_test.cc:1366:89: error: class template argument deduction failed:
 1366 |             return make_ready_future<rpc::tuple<int, long>>(rpc::tuple(1, 0x7'0000'0000L));
      |                                                                                         ^
/__w/seastar/seastar/tests/unit/rpc_test.cc:1366:89: error: call of overloaded 'tuple(int, long int)' is ambiguous
In file included from /usr/include/c++/14/bits/uses_allocator_args.h:39,
                 from /usr/include/c++/14/bits/memory_resource.h:41,
                 from /usr/include/c++/14/string:68,
                 from /usr/include/c++/14/stdexcept:39,
                 from /usr/include/c++/14/system_error:43,
                 from /__w/seastar/seastar/tests/unit/loopback_socket.hh:24,
                 from /__w/seastar/seastar/tests/unit/rpc_test.cc:22:
/usr/include/c++/14/tuple:1970:5: note: candidate: 'std::tuple(_Ts ...)-> seastar::rpc::tuple<T ...> [with T = {int, long int}]'
...

@tchaikov
Copy link
Contributor

lemme check.

@tchaikov
Copy link
Contributor

lemme check.

i can reproduce this with GCC-14 on fedora 40. seems it's related to ADL.

@tchaikov
Copy link
Contributor

tchaikov commented Sep 19, 2024

@xemul fixed by #2446

The test opens a server socket that reads socket up until double CRLF
and then responds back with "HTTP/1.1 200 OK host: test" line in a loop.
Then runs http client against it measuring time it takes to perform the
given amount of requests. It uses in-memory loopback sockets (seastar
wrapper around seastar::queue).

Signed-off-by: Pavel Emelyanov <[email protected]>
@xemul
Copy link
Contributor Author

xemul commented Sep 19, 2024

Thanks! Rebased the branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants