Classes | Macros | Typedefs | Functions | Variables
benchmark-ping-udp.c File Reference
#include "uv.h"
#include "task.h"
#include <stdlib.h>
#include <stdio.h>
Include dependency graph for benchmark-ping-udp.c:

Go to the source code of this file.

Classes

struct  buf_s
 
struct  pinger_t
 

Macros

#define TIME   5000
 
#define X(PINGERS)
 

Typedefs

typedef struct buf_s buf_t
 

Functions

static void buf_alloc (uv_handle_t *tcp, size_t size, uv_buf_t *buf)
 
static void buf_free (const uv_buf_t *buf)
 
static int ping_udp (unsigned pingers)
 
static void pinger_close_cb (uv_handle_t *handle)
 
static void pinger_read_cb (uv_udp_t *udp, ssize_t nread, const uv_buf_t *buf, const struct sockaddr *addr, unsigned flags)
 
static void pinger_write_ping (pinger_t *pinger)
 
static void udp_pinger_new (void)
 

Variables

static int completed_pingers
 
static unsigned long completed_pings
 
static uv_loop_tloop
 
static char PING [] = "PING\n"
 
static int64_t start_time
 

Macro Definition Documentation

◆ TIME

#define TIME   5000

Definition at line 29 of file benchmark-ping-udp.c.

◆ X

#define X (   PINGERS)
Value:
return ping_udp(PINGERS); \
}

Definition at line 154 of file benchmark-ping-udp.c.

Typedef Documentation

◆ buf_t

typedef struct buf_s buf_t

Function Documentation

◆ buf_alloc()

static void buf_alloc ( uv_handle_t tcp,
size_t  size,
uv_buf_t buf 
)
static

Definition at line 52 of file benchmark-ping-udp.c.

◆ buf_free()

static void buf_free ( const uv_buf_t buf)
static

Definition at line 59 of file benchmark-ping-udp.c.

◆ ping_udp()

static int ping_udp ( unsigned  pingers)
static

Definition at line 135 of file benchmark-ping-udp.c.

◆ pinger_close_cb()

static void pinger_close_cb ( uv_handle_t handle)
static

Definition at line 63 of file benchmark-ping-udp.c.

◆ pinger_read_cb()

static void pinger_read_cb ( uv_udp_t udp,
ssize_t  nread,
const uv_buf_t buf,
const struct sockaddr *  addr,
unsigned  flags 
)
static

Definition at line 88 of file benchmark-ping-udp.c.

◆ pinger_write_ping()

static void pinger_write_ping ( pinger_t pinger)
static

Definition at line 77 of file benchmark-ping-udp.c.

◆ udp_pinger_new()

static void udp_pinger_new ( void  )
static

Definition at line 114 of file benchmark-ping-udp.c.

Variable Documentation

◆ completed_pingers

int completed_pingers
static

Definition at line 47 of file benchmark-ping-udp.c.

◆ completed_pings

unsigned long completed_pings
static

Definition at line 48 of file benchmark-ping-udp.c.

◆ loop

uv_loop_t* loop
static

Definition at line 45 of file benchmark-ping-udp.c.

◆ PING

char PING[] = "PING\n"
static

Definition at line 43 of file benchmark-ping-udp.c.

◆ start_time

int64_t start_time
static

Definition at line 49 of file benchmark-ping-udp.c.

BENCHMARK_IMPL
#define BENCHMARK_IMPL(name)
Definition: task.h:240
ping_udp
static int ping_udp(unsigned pingers)
Definition: benchmark-ping-udp.c:135


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