Classes | Macros | Typedefs | Functions | Variables
benchmark-pound.c File Reference
#include "task.h"
#include "uv.h"
Include dependency graph for benchmark-pound.c:

Go to the source code of this file.

Classes

struct  conn_rec_s
 
struct  pipe_conn_rec
 
struct  tcp_conn_rec
 

Macros

#define DEBUG   0
 
#define MAX_CONNS   1000
 
#define NANOSEC   ((uint64_t) 1e9)
 

Typedefs

typedef struct conn_rec_s conn_rec
 
typedef int(* connect_fn) (int num, make_connect_fn make_connect, void *arg)
 
typedef void(* make_connect_fn) (struct conn_rec_s *conn)
 
typedef void(* setup_fn) (int num, void *arg)
 

Functions

static void after_write (uv_write_t *req, int status)
 
static void alloc_cb (uv_handle_t *handle, size_t suggested_size, uv_buf_t *buf)
 
 BENCHMARK_IMPL (pipe_pound_100)
 
 BENCHMARK_IMPL (pipe_pound_1000)
 
 BENCHMARK_IMPL (tcp4_pound_100)
 
 BENCHMARK_IMPL (tcp4_pound_1000)
 
static void close_cb (uv_handle_t *handle)
 
static void connect_cb (uv_connect_t *conn_req, int status)
 
static int pipe_do_connect (int num, make_connect_fn make_connect, void *arg)
 
static void pipe_do_setup (int num, void *arg)
 
static void pipe_make_connect (conn_rec *p)
 
static int pound_it (int concurrency, const char *type, setup_fn do_setup, connect_fn do_connect, make_connect_fn make_connect, void *arg)
 
static void read_cb (uv_stream_t *stream, ssize_t nread, const uv_buf_t *buf)
 
static int tcp_do_connect (int num, make_connect_fn make_connect, void *arg)
 
static void tcp_do_setup (int num, void *arg)
 
static void tcp_make_connect (conn_rec *p)
 

Variables

static char buffer [] = "QS"
 
static int closed_streams
 
static int conns_failed
 
static uv_loop_tloop
 
static pipe_conn_rec pipe_conns [MAX_CONNS]
 
static uint64_t start
 
static tcp_conn_rec tcp_conns [MAX_CONNS]
 

Macro Definition Documentation

◆ DEBUG

#define DEBUG   0

Definition at line 32 of file benchmark-pound.c.

◆ MAX_CONNS

#define MAX_CONNS   1000

Definition at line 26 of file benchmark-pound.c.

◆ NANOSEC

#define NANOSEC   ((uint64_t) 1e9)

Definition at line 29 of file benchmark-pound.c.

Typedef Documentation

◆ conn_rec

typedef struct conn_rec_s conn_rec

◆ connect_fn

typedef int(* connect_fn) (int num, make_connect_fn make_connect, void *arg)

Definition at line 38 of file benchmark-pound.c.

◆ make_connect_fn

typedef void(* make_connect_fn) (struct conn_rec_s *conn)

Definition at line 37 of file benchmark-pound.c.

◆ setup_fn

typedef void(* setup_fn) (int num, void *arg)

Definition at line 36 of file benchmark-pound.c.

Function Documentation

◆ after_write()

static void after_write ( uv_write_t req,
int  status 
)
static

Definition at line 93 of file benchmark-pound.c.

◆ alloc_cb()

static void alloc_cb ( uv_handle_t handle,
size_t  suggested_size,
uv_buf_t buf 
)
static

Definition at line 84 of file benchmark-pound.c.

◆ BENCHMARK_IMPL() [1/4]

BENCHMARK_IMPL ( pipe_pound_100  )

Definition at line 334 of file benchmark-pound.c.

◆ BENCHMARK_IMPL() [2/4]

BENCHMARK_IMPL ( pipe_pound_1000  )

Definition at line 344 of file benchmark-pound.c.

◆ BENCHMARK_IMPL() [3/4]

BENCHMARK_IMPL ( tcp4_pound_100  )

Definition at line 314 of file benchmark-pound.c.

◆ BENCHMARK_IMPL() [4/4]

BENCHMARK_IMPL ( tcp4_pound_1000  )

Definition at line 324 of file benchmark-pound.c.

◆ close_cb()

static void close_cb ( uv_handle_t handle)
static

Definition at line 161 of file benchmark-pound.c.

◆ connect_cb()

static void connect_cb ( uv_connect_t conn_req,
int  status 
)
static

Definition at line 103 of file benchmark-pound.c.

◆ pipe_do_connect()

static int pipe_do_connect ( int  num,
make_connect_fn  make_connect,
void *  arg 
)
static

Definition at line 259 of file benchmark-pound.c.

◆ pipe_do_setup()

static void pipe_do_setup ( int  num,
void *  arg 
)
static

Definition at line 186 of file benchmark-pound.c.

◆ pipe_make_connect()

static void pipe_make_connect ( conn_rec p)
static

Definition at line 226 of file benchmark-pound.c.

◆ pound_it()

static int pound_it ( int  concurrency,
const char *  type,
setup_fn  do_setup,
connect_fn  do_connect,
make_connect_fn  make_connect,
void *  arg 
)
static

Definition at line 271 of file benchmark-pound.c.

◆ read_cb()

static void read_cb ( uv_stream_t stream,
ssize_t  nread,
const uv_buf_t buf 
)
static

Definition at line 138 of file benchmark-pound.c.

◆ tcp_do_connect()

static int tcp_do_connect ( int  num,
make_connect_fn  make_connect,
void *  arg 
)
static

Definition at line 247 of file benchmark-pound.c.

◆ tcp_do_setup()

static void tcp_do_setup ( int  num,
void *  arg 
)
static

Definition at line 177 of file benchmark-pound.c.

◆ tcp_make_connect()

static void tcp_make_connect ( conn_rec p)
static

Definition at line 195 of file benchmark-pound.c.

Variable Documentation

◆ buffer

char buffer[] = "QS"
static

Definition at line 67 of file benchmark-pound.c.

◆ closed_streams

int closed_streams
static

Definition at line 75 of file benchmark-pound.c.

◆ conns_failed

int conns_failed
static

Definition at line 76 of file benchmark-pound.c.

◆ loop

uv_loop_t* loop
static

Definition at line 69 of file benchmark-pound.c.

◆ pipe_conns

pipe_conn_rec pipe_conns[MAX_CONNS]
static

Definition at line 72 of file benchmark-pound.c.

◆ start

uint64_t start
static

Definition at line 74 of file benchmark-pound.c.

◆ tcp_conns

tcp_conn_rec tcp_conns[MAX_CONNS]
static

Definition at line 71 of file benchmark-pound.c.



grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:04