|
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)) |
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_t * | co_arr = nullptr |
| #define CALC_CLOCK_NOW | ( | ) | clock() |
Definition at line 29 of file sample_benchmark_coroutine.cpp.
| #define CALC_CLOCK_T clock_t |
Definition at line 28 of file sample_benchmark_coroutine.cpp.
| #define CALC_MS_CLOCK | ( | x | ) | static_cast<int>((x) / (CLOCKS_PER_SEC / 1000)) |
Definition at line 30 of file sample_benchmark_coroutine.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.cpp.
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Definition at line 50 of file sample_benchmark_coroutine.cpp.
References CALC_CLOCK_NOW, CALC_CLOCK_T, CALC_MS_CLOCK, CALC_NS_AVG_CLOCK, co_arr, coroutine_context_container< TALLOC >::create(), max_coroutine_number, and switch_count.
|
static |
Definition at line 37 of file sample_benchmark_coroutine.cpp.
References switch_count.
| copp::coroutine_context_default::ptr_t* co_arr = nullptr |
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().