libcopp  1.1.0
Macros | Typedefs | Functions | Variables
sample_benchmark_coroutine_mem_pool.cpp File Reference
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <inttypes.h>
#include <stdint.h>
#include <libcopp/coroutine/coroutine_context_container.h>
Include dependency graph for sample_benchmark_coroutine_mem_pool.cpp:

Go to the source code of this file.

Macros

#define CALC_CLOCK_T   clock_t
 
#define CALC_CLOCK_NOW()   clock()
 
#define CALC_MS_CLOCK(x)   static_cast<int>((x) / (CLOCKS_PER_SEC / 1000))
 
#define CALC_NS_AVG_CLOCK(x, y)   (1000000LL * static_cast<long long>((x) / (CLOCKS_PER_SEC / 1000)) / (y ? y : 1))
 

Typedefs

typedef copp::coroutine_context_container< copp::allocator::stack_allocator_memorymy_cotoutine_t
 

Functions

static int my_runner (void *)
 
int main (int argc, char *argv[])
 

Variables

int switch_count = 100
 
int MAX_COROUTINE_NUMBER = 100000
 
my_cotoutine_t::ptr_tco_arr = NULL
 
char * stack_mem_pool = NULL
 

Macro Definition Documentation

#define CALC_CLOCK_NOW ( )    clock()

Definition at line 29 of file sample_benchmark_coroutine_mem_pool.cpp.

Referenced by main().

#define CALC_CLOCK_T   clock_t

Definition at line 28 of file sample_benchmark_coroutine_mem_pool.cpp.

Referenced by main().

#define CALC_MS_CLOCK (   x)    static_cast<int>((x) / (CLOCKS_PER_SEC / 1000))

Definition at line 30 of file sample_benchmark_coroutine_mem_pool.cpp.

Referenced by main().

#define CALC_NS_AVG_CLOCK (   x,
 
)    (1000000LL * static_cast<long long>((x) / (CLOCKS_PER_SEC / 1000)) / (y ? y : 1))

Definition at line 31 of file sample_benchmark_coroutine_mem_pool.cpp.

Referenced by main().

Typedef Documentation

Definition at line 36 of file sample_benchmark_coroutine_mem_pool.cpp.

Function Documentation

int main ( int  argc,
char *  argv[] 
)
static int my_runner ( void *  )
static

Variable Documentation

my_cotoutine_t::ptr_t* co_arr = NULL

Definition at line 51 of file sample_benchmark_coroutine_mem_pool.cpp.

Referenced by main().

int MAX_COROUTINE_NUMBER = 100000

Definition at line 50 of file sample_benchmark_coroutine_mem_pool.cpp.

Referenced by main().

char* stack_mem_pool = NULL

Definition at line 54 of file sample_benchmark_coroutine_mem_pool.cpp.

Referenced by main().

int switch_count = 100

Definition at line 34 of file sample_benchmark_coroutine_mem_pool.cpp.

Referenced by main(), and my_runner().