|
libcopp 2.3.1
|
#include <inttypes.h>#include <stdint.h>#include <cstdio>#include <cstdlib>#include <cstring>#include <ctime>#include <libcopp/coroutine/coroutine_context_container.h>
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_malloc > | my_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_t * | co_arr = nullptr |
| #define CALC_CLOCK_NOW | ( | ) | clock() |
Definition at line 29 of file sample_benchmark_coroutine_malloc.cpp.
| #define CALC_CLOCK_T clock_t |
Definition at line 28 of file sample_benchmark_coroutine_malloc.cpp.
| #define CALC_MS_CLOCK | ( | x | ) | static_cast<int>((x) / (CLOCKS_PER_SEC / 1000)) |
Definition at line 30 of file sample_benchmark_coroutine_malloc.cpp.
| #define CALC_NS_AVG_CLOCK | ( | x, | |
| y | |||
| ) | (1000000LL * static_cast<long long>((x) / (CLOCKS_PER_SEC / 1000)) / (y ? y : 1)) |
Definition at line 31 of file sample_benchmark_coroutine_malloc.cpp.
| typedef copp::coroutine_context_container<copp::allocator::stack_allocator_malloc> my_cotoutine_t |
Definition at line 36 of file sample_benchmark_coroutine_malloc.cpp.
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Definition at line 53 of file sample_benchmark_coroutine_malloc.cpp.
References CALC_CLOCK_NOW, CALC_CLOCK_T, CALC_MS_CLOCK, CALC_NS_AVG_CLOCK, co_arr, MAX_COROUTINE_NUMBER, and switch_count.
|
static |
Definition at line 39 of file sample_benchmark_coroutine_malloc.cpp.
References switch_count.
| my_cotoutine_t::ptr_t* co_arr = nullptr |
Definition at line 51 of file sample_benchmark_coroutine_malloc.cpp.
Referenced by main().
| int MAX_COROUTINE_NUMBER = 100000 |
Definition at line 50 of file sample_benchmark_coroutine_malloc.cpp.
Referenced by main().
| int switch_count = 100 |
Definition at line 34 of file sample_benchmark_coroutine_malloc.cpp.
Referenced by main(), and my_runner().