YSTest  PreAlpha_b400_20130424
The YSLib Test Project
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
timing.hpp 文件参考
#include "../ydef.h"
#include <ctime>
timing.hpp 的引用(Include)关系图:
此图展示该文件直接或间接的被哪些文件引用了:

浏览源代码.

命名空间

namespace  ytest
 YFramework 基础测试库命名空间。
 
namespace  ytest::timing
 计时测试工具命名空间。
 

函数

template<typename _fNow , typename _fCallable , typename... _tParams>
auto ytest::timing::once (_fNow now, _fCallable &&f, _tParams &&...args) -> decltype(now()-now())
 测试指定函数执行一次的时间。
 
template<typename _fCallable , typename... _tParams>
double ytest::timing::once_c (_fCallable &&f, _tParams &&...args)
 测试指定函数执行一次的时间。
 
template<class _fNow , typename _fCallable , typename... _tParams>
auto ytest::timing::total (size_t n, _fNow now, _fCallable &&f, _tParams &&...args) -> decltype(now()-now())
 测试指定函数执行若干次的总时间。
 
template<typename _fCallable , typename... _tParams>
double ytest::timing::total_c (size_t n, _fCallable &&f, _tParams &&...args)
 测试指定函数执行若干次的总时间。
 
template<typename... _tParams>
auto ytest::timing::average (size_t n, _tParams &&...args) -> decltype(timing::total(n, std::forward< decltype(args)>(args)...)/n)
 测试指定函数执行若干次的平均时间。