Go to the source code of this file.
|
static int | accept_server (int listen_fd) |
|
static int | blocking_read_bytes (thread_args *args, char *buf) |
|
static int | blocking_write_bytes (struct thread_args *args, char *buf) |
|
static void | client_thread (thread_args *args) |
|
static int | connect_client (struct sockaddr *addr, socklen_t len) |
|
static int | create_listening_socket (struct sockaddr *port, socklen_t len) |
|
int | create_socket (const char *socket_type, fd_pair *client_fds, fd_pair *server_fds) |
|
static int | create_sockets_pipe (fd_pair *client_fds, fd_pair *server_fds) |
|
static int | create_sockets_socketpair (fd_pair *client_fds, fd_pair *server_fds) |
|
static int | create_sockets_tcp (fd_pair *client_fds, fd_pair *server_fds) |
|
static int | do_nothing (thread_args *) |
|
int | main (int argc, char **argv) |
|
static double | now (void) |
|
static int | poll_read_bytes (int fd, char *buf, size_t read_size, int spin) |
|
static int | poll_read_bytes_blocking (struct thread_args *args, char *buf) |
|
static int | poll_read_bytes_spin (struct thread_args *args, char *buf) |
|
static void | print_histogram (grpc_histogram *histogram) |
|
void | print_usage (char *argv0) |
|
static int | read_bytes (int fd, char *buf, size_t read_size, int spin) |
|
static int | run_all_benchmarks (size_t msg_size) |
|
static int | run_benchmark (const char *socket_type, thread_args *client_args, thread_args *server_args) |
|
static void | server_thread (thread_args *args) |
|
static void | server_thread_wrap (void *arg) |
|
static int | set_socket_nonblocking (thread_args *args) |
|
static int | spin_read_bytes (thread_args *args, char *buf) |
|
◆ fd_pair
◆ test_strategy
◆ thread_args
◆ accept_server()
static int accept_server |
( |
int |
listen_fd | ) |
|
|
static |
◆ blocking_read_bytes()
◆ blocking_write_bytes()
static int blocking_write_bytes |
( |
struct thread_args * |
args, |
|
|
char * |
buf |
|
) |
| |
|
static |
◆ client_thread()
◆ connect_client()
static int connect_client |
( |
struct sockaddr * |
addr, |
|
|
socklen_t |
len |
|
) |
| |
|
static |
◆ create_listening_socket()
static int create_listening_socket |
( |
struct sockaddr * |
port, |
|
|
socklen_t |
len |
|
) |
| |
|
static |
◆ create_socket()
◆ create_sockets_pipe()
◆ create_sockets_socketpair()
◆ create_sockets_tcp()
◆ do_nothing()
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
◆ now()
static double now |
( |
void |
| ) |
|
|
static |
◆ poll_read_bytes()
static int poll_read_bytes |
( |
int |
fd, |
|
|
char * |
buf, |
|
|
size_t |
read_size, |
|
|
int |
spin |
|
) |
| |
|
static |
◆ poll_read_bytes_blocking()
static int poll_read_bytes_blocking |
( |
struct thread_args * |
args, |
|
|
char * |
buf |
|
) |
| |
|
static |
◆ poll_read_bytes_spin()
static int poll_read_bytes_spin |
( |
struct thread_args * |
args, |
|
|
char * |
buf |
|
) |
| |
|
static |
◆ print_histogram()
◆ print_usage()
void print_usage |
( |
char * |
argv0 | ) |
|
◆ read_bytes()
static int read_bytes |
( |
int |
fd, |
|
|
char * |
buf, |
|
|
size_t |
read_size, |
|
|
int |
spin |
|
) |
| |
|
static |
◆ run_all_benchmarks()
static int run_all_benchmarks |
( |
size_t |
msg_size | ) |
|
|
static |
◆ run_benchmark()
◆ server_thread()
◆ server_thread_wrap()
static void server_thread_wrap |
( |
void * |
arg | ) |
|
|
static |
◆ set_socket_nonblocking()
◆ spin_read_bytes()
◆ read_strategy_usage
const char* read_strategy_usage |
|
static |
Initial value:=
"Strategy for doing reads, which is one of:\n"
" blocking: blocking read calls\n"
" same_thread_poll: poll() call on same thread \n"
" spin_read: spinning non-blocking read() calls \n"
" spin_poll: spinning 0 timeout poll() calls \n"
""
Definition at line 501 of file low_level_ping_pong.cc.
◆ socket_type_usage
const char* socket_type_usage |
|
static |
Initial value:=
"Type of socket used, one of:\n"
" tcp: fds are endpoints of a TCP connection\n"
" socketpair: fds come from socketpair()\n"
" pipe: fds come from pipe()\n"
Definition at line 515 of file low_level_ping_pong.cc.
◆ socket_types
const char* socket_types[] = {"tcp", "socketpair", "pipe"} |
|
static |
◆ test_strategies