Chops Net IP
Loading...
Searching...
No Matches
io_common_test.cpp File Reference

Test scenarios for io_common detail class. More...

#include "catch2/catch_test_macros.hpp"
#include <vector>
#include <cassert>
#include <future>
#include <thread>
#include <chrono>
#include <functional>
#include <cstddef>
#include <ranges>
#include "net_ip/detail/io_common.hpp"
#include "buffer/shared_buffer.hpp"
#include "shared_test/io_buf.hpp"
Include dependency graph for io_common_test.cpp:

Functions

template<typename E >
void empty_write_func (const E &)
 
template<typename E >
void check_queue_stats (const chops::net::detail::io_common< E > &ioc, std::size_t exp_qs, std::size_t exp_bs)
 
template<typename E >
void io_common_api_test (const E &elem)
 
template<typename E >
std::size_t start_writes (const std::vector< E > &data_vec, chops::net::detail::io_common< E > &io_comm, int multiplier, int wait_offset)
 
template<typename E >
std::size_t write_next_elems (const std::vector< E > &data_vec, chops::net::detail::io_common< E > &io_comm)
 
template<typename E >
void io_common_stress_test (const std::vector< E > &data_vec, int multiplier, int num_thrs)
 
 TEST_CASE ("Io common API test, single element", "[io_common] [single_element] [api]")
 
 TEST_CASE ("Io common API test, double element", "[io_common] [double_element] [api]")
 
 TEST_CASE ("Io common stress test, single element, multiplier 1, 1 thread", "[io_common] [single_element] [multiplier_1] [threads_1]")
 
 TEST_CASE ("Io common stress test, single element, multiplier 10, 1 thread", "[io_common] [single_element] [multiplier_10] [threads_1]")
 
 TEST_CASE ("Io common stress test, single element, multiplier 20, 5 threads", "[io_common] [single_element] [multiplier_20] [threads_5]")
 
 TEST_CASE ("Io common stress test, single element, multiplier 50, 10 threads", "[io_common] [single_element] [multiplier_50] [threads_10]")
 
 TEST_CASE ("Io common stress test, single element, multiplier 40, 60 threads", "[io_common] [single_element] [multiplier_40] [threads_60]")
 
 TEST_CASE ("Io common stress test, double element, multiplier 1, 1 thread", "[io_common] [double_element] [multiplier_1] [threads_1]")
 
 TEST_CASE ("Io common stress test, double element, multiplier 10, 1 thread", "[io_common] [double_element] [multiplier_10] [threads_1]")
 
 TEST_CASE ("Io common stress test, double element, multiplier 20, 5 threads", "[io_common] [double_element] [multiplier_20] [threads_5]")
 
 TEST_CASE ("Io common stress test, double element, multiplier 50, 10 threads", "[io_common] [double_element] [multiplier_50] [threads_10]")
 
 TEST_CASE ("Io common stress test, double element, multiplier 40, 60 threads", "[io_common] [double_element] [multiplier_40] [threads_60]")
 

Variables

constexpr int Wait = 5
 

Detailed Description

Test scenarios for io_common detail class.

Author
Cliff Green

Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.txt or copy at http://www.boost.org/LICENSE_1_0.txt)