libcopp  1.1.0
Macros | Functions | Variables
sample_benchmark_coroutine.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.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))
 

Functions

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

Variables

int switch_count = 100
 
int max_coroutine_number = 100000
 
copp::coroutine_context_default::ptr_tco_arr = NULL
 

Macro Definition Documentation

#define CALC_CLOCK_NOW ( )    clock()

Definition at line 29 of file sample_benchmark_coroutine.cpp.

Referenced by main().

#define CALC_CLOCK_T   clock_t

Definition at line 28 of file sample_benchmark_coroutine.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.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.cpp.

Referenced by main().

Function Documentation

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

Variable Documentation

Definition at line 49 of file sample_benchmark_coroutine.cpp.

Referenced by benchmark_round(), and main().

int max_coroutine_number = 100000

Definition at line 48 of file sample_benchmark_coroutine.cpp.

Referenced by main().

int switch_count = 100

Definition at line 34 of file sample_benchmark_coroutine.cpp.

Referenced by main(), and my_runner().