ZeroErr
载入中...
搜索中...
未找到
benchmark.h 文件参考
#include "zeroerr/internal/config.h"
#include <chrono>
#include <cstdint>
#include "zeroerr/string.h"
#include <vector>
benchmark.h 的引用(Include)关系图:
此图展示该文件被哪些文件直接或间接地引用了:

浏览该文件的源代码.

类

struct  zeroerr::PerfCountSet< T >
 PerfCountSet is a set of performance counters. 更多...
struct  zeroerr::PerformanceCounter
 PerformanceCounter is a class to measure the performance of a function. 更多...
struct  zeroerr::BenchResult
 BenchResult is a result of running the benchmark. 更多...
struct  zeroerr::Benchmark
 Benchmark create a core object for configuration of a benchmark. This class is a driver to run multiple times of a benchmark. Each time of a run will generate a row of data. Report will print the data in console. 更多...

命名空间

namespace  zeroerr
namespace  zeroerr::detail

宏定义

#define ZEROERR_CREATE_BENCHMARK_FUNC(function, name, ...)
#define BENCHMARK(...)

类型定义

using zeroerr::Clock

函数

BenchState * zeroerr::createBenchState (Benchmark &benchmark)
void zeroerr::destroyBenchState (BenchState *state)
size_t zeroerr::getNumIter (BenchState *state)
void zeroerr::runIteration (BenchState *state)
void zeroerr::moveResult (BenchState *state, zeroerr::String name)
template<typename T>
void zeroerr::detail::doNotOptimizeAway (const T &val)
template<typename T>
void zeroerr::detail::doNotOptimizeAway (T &val)
template<typename Arg>
void zeroerr::doNotOptimizeAway (Arg &&arg)
 Makes sure none of the given arguments are optimized away by the compiler.

宏定义说明

◆ BENCHMARK

#define BENCHMARK ( ...)
值:
ZEROERR_SUPPRESS_VARIADIC_MACRO \
ZEROERR_CREATE_BENCHMARK_FUNC(ZEROERR_NAMEGEN(_zeroerr_benchmark), __VA_ARGS__) \
#define ZEROERR_NAMEGEN(x)
定义 config.h:110
#define ZEROERR_SUPPRESS_VARIADIC_MACRO_POP
定义 config.h:316

◆ ZEROERR_CREATE_BENCHMARK_FUNC

#define ZEROERR_CREATE_BENCHMARK_FUNC ( function,
name,
... )
值:
static void function(zeroerr::TestContext*); \
static zeroerr::detail::regTest ZEROERR_NAMEGEN(_zeroerr_reg)( \
{name, __FILE__, __LINE__, function, {__VA_ARGS__}}, zeroerr::TestType::bench); \
static void function(ZEROERR_UNUSED(zeroerr::TestContext* _ZEROERR_TEST_CONTEXT))
TestContext is a class that holds the test results and reporter context. There are 8 different matric...
定义 unittest.h:89
#define ZEROERR_UNUSED(x)
定义 config.h:360
@ bench
定义 unittest.h:297
regTest is a class that is used to register the test case. It will be used as global variables and th...
定义 unittest.h:305