CARLA
Public Member Functions | Private Attributes | List of all members
Benchmark Class Reference
+ Collaboration diagram for Benchmark:

Public Member Functions

void AddStream ()
 
void AddStreams (size_t count)
 
 Benchmark (uint16_t port, size_t message_size, double success_ratio)
 
void Run (size_t number_of_messages)
 

Private Attributes

Client _client
 
boost::asio::io_context _client_callback
 
const carla::SharedBufferView _message
 
std::atomic_size_t _number_of_messages_received {0u}
 
Server _server
 
std::vector< Stream_streams
 
const double _success_ratio
 
carla::ThreadGroup _threads
 
boost::asio::io_context::work _work_to_do
 

Detailed Description

Definition at line 30 of file test_benchmark_streaming.cpp.

Constructor & Destructor Documentation

◆ Benchmark()

Benchmark::Benchmark ( uint16_t  port,
size_t  message_size,
double  success_ratio 
)
inline

Definition at line 33 of file test_benchmark_streaming.cpp.

Member Function Documentation

◆ AddStream()

void Benchmark::AddStream ( )
inline

Definition at line 41 of file test_benchmark_streaming.cpp.

References CARLA_PROFILE_FPS, carla::BufferView::CreateFrom(), DEBUG_ASSERT_EQ, and carla::streaming::detail::Stream< StreamStateT >::token().

+ Here is the call graph for this function:

◆ AddStreams()

void Benchmark::AddStreams ( size_t  count)
inline

Definition at line 56 of file test_benchmark_streaming.cpp.

Referenced by benchmark_image().

+ Here is the caller graph for this function:

◆ Run()

void Benchmark::Run ( size_t  number_of_messages)
inline

Definition at line 62 of file test_benchmark_streaming.cpp.

References CARLA_PROFILE_SCOPE, carla::log_warning(), and carla::logging::write_to_stream().

Referenced by benchmark_image().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ _client

Client Benchmark::_client
private

Definition at line 116 of file test_benchmark_streaming.cpp.

◆ _client_callback

boost::asio::io_context Benchmark::_client_callback
private

Definition at line 120 of file test_benchmark_streaming.cpp.

◆ _message

const carla::SharedBufferView Benchmark::_message
private

Definition at line 118 of file test_benchmark_streaming.cpp.

◆ _number_of_messages_received

std::atomic_size_t Benchmark::_number_of_messages_received {0u}
private

Definition at line 128 of file test_benchmark_streaming.cpp.

◆ _server

Server Benchmark::_server
private

Definition at line 114 of file test_benchmark_streaming.cpp.

◆ _streams

std::vector<Stream> Benchmark::_streams
private

Definition at line 126 of file test_benchmark_streaming.cpp.

◆ _success_ratio

const double Benchmark::_success_ratio
private

Definition at line 124 of file test_benchmark_streaming.cpp.

◆ _threads

carla::ThreadGroup Benchmark::_threads
private

Definition at line 112 of file test_benchmark_streaming.cpp.

◆ _work_to_do

boost::asio::io_context::work Benchmark::_work_to_do
private

Definition at line 122 of file test_benchmark_streaming.cpp.


The documentation for this class was generated from the following file: