Apache HTTPD
Classes | Macros | Functions | Variables
testmemcache.c File Reference
#include "testutil.h"
#include "apr.h"
#include "apu.h"
#include "apr_general.h"
#include "apr_strings.h"
#include "apr_hash.h"
#include "apr_memcache.h"
#include "apr_network_io.h"

Go to the source code of this file.

Classes

struct  my_hash_server_baton
 

Macros

#define HOST   "localhost"
 
#define PORT   11211
 
#define TDATA_SIZE   3000
 
#define TDATA_SET   100
 
#define HASH_FUNC_RESULT   510
 

Functions

static apr_uint32_t my_hash_func (void *baton, const char *data, apr_size_t data_len)
 
static apr_memcache_server_tmy_server_func (void *baton, apr_memcache_t *mc, const apr_uint32_t hash)
 
static int randval (apr_uint32_t high)
 
static void test_memcache_create (abts_case *tc, void *data)
 
static int create_test_hash (apr_pool_t *p, apr_hash_t *h)
 
static void test_memcache_user_funcs (abts_case *tc, void *data)
 
static void test_memcache_meta (abts_case *tc, void *data)
 
static void test_memcache_addreplace (abts_case *tc, void *data)
 
static void test_memcache_incrdecr (abts_case *tc, void *data)
 
static void test_memcache_multiget (abts_case *tc, void *data)
 
static void test_memcache_setget (abts_case *tc, void *data)
 
static apr_status_t check_mc (void)
 
abts_suitetestmemcache (abts_suite *suite)
 

Variables

const char prefix [] = "testmemcache"
 
const char txt []
 
apr_uint16_t firsttime = 0
 

Macro Definition Documentation

◆ HASH_FUNC_RESULT

#define HASH_FUNC_RESULT   510

Definition at line 40 of file testmemcache.c.

◆ HOST

#define HOST   "localhost"

Definition at line 30 of file testmemcache.c.

◆ PORT

#define PORT   11211

Definition at line 31 of file testmemcache.c.

◆ TDATA_SET

#define TDATA_SET   100

Definition at line 37 of file testmemcache.c.

◆ TDATA_SIZE

#define TDATA_SIZE   3000

Definition at line 34 of file testmemcache.c.

Function Documentation

◆ check_mc()

static apr_status_t check_mc ( void  )
static

Definition at line 541 of file testmemcache.c.

◆ create_test_hash()

static int create_test_hash ( apr_pool_t p,
apr_hash_t h 
)
static

Definition at line 180 of file testmemcache.c.

◆ my_hash_func()

static apr_uint32_t my_hash_func ( void *  baton,
const char data,
apr_size_t  data_len 
)
static

Definition at line 75 of file testmemcache.c.

◆ my_server_func()

static apr_memcache_server_t * my_server_func ( void *  baton,
apr_memcache_t mc,
const apr_uint32_t  hash 
)
static

Definition at line 88 of file testmemcache.c.

◆ randval()

static int randval ( apr_uint32_t  high)
static

Definition at line 109 of file testmemcache.c.

◆ test_memcache_addreplace()

static void test_memcache_addreplace ( abts_case tc,
void *  data 
)
static

Definition at line 305 of file testmemcache.c.

◆ test_memcache_create()

static void test_memcache_create ( abts_case tc,
void *  data 
)
static

Definition at line 130 of file testmemcache.c.

◆ test_memcache_incrdecr()

static void test_memcache_incrdecr ( abts_case tc,
void *  data 
)
static

Definition at line 364 of file testmemcache.c.

◆ test_memcache_meta()

static void test_memcache_meta ( abts_case tc,
void *  data 
)
static

Definition at line 243 of file testmemcache.c.

◆ test_memcache_multiget()

static void test_memcache_multiget ( abts_case tc,
void *  data 
)
static

Definition at line 416 of file testmemcache.c.

◆ test_memcache_setget()

static void test_memcache_setget ( abts_case tc,
void *  data 
)
static

Definition at line 484 of file testmemcache.c.

◆ test_memcache_user_funcs()

static void test_memcache_user_funcs ( abts_case tc,
void *  data 
)
static

Definition at line 196 of file testmemcache.c.

◆ testmemcache()

abts_suite * testmemcache ( abts_suite suite)

Definition at line 602 of file testmemcache.c.

Variable Documentation

◆ firsttime

apr_uint16_t firsttime = 0

Definition at line 108 of file testmemcache.c.

◆ prefix

const char prefix[] = "testmemcache"

Definition at line 43 of file testmemcache.c.

◆ txt

const char txt[]
Initial value:
=
"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis at"
"lacus in ligula hendrerit consectetuer. Vestibulum tristique odio"
"iaculis leo. In massa arcu, ultricies a, laoreet nec, hendrerit non,"
"neque. Nulla sagittis sapien ac risus. Morbi ligula dolor, vestibulum"
"nec, viverra id, placerat dapibus, arcu. Curabitur egestas feugiat"
"tellus. Donec dignissim. Nunc ante. Curabitur id lorem. In mollis"
"tortor sit amet eros auctor dapibus. Proin nulla sem, tristique in,"
"convallis id, iaculis feugiat cras amet."

Definition at line 46 of file testmemcache.c.