blob: 53ec46dfff5bfa136e4d76a2cf4e6c0a38023d1c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
#pragma once
#include "std/vector.hpp"
#include "std/string.hpp"
#include "std/utility.hpp"
namespace bench
{
struct Result
{
vector<double> m_time;
public:
double m_all, m_max, m_avg, m_med;
public:
void Add(double t)
{
m_time.push_back(t);
}
void Add(Result const & r)
{
m_time.insert(m_time.end(), r.m_time.begin(), r.m_time.end());
}
void PrintAllTimes();
void CalcMetrics();
};
class AllResult
{
public:
Result m_reading;
double m_all;
public:
AllResult() : m_all(0.0) {}
void Add(double t) { m_all += t; }
void Print();
};
/// @param[in] count number of times to run benchmark
void RunFeaturesLoadingBenchmark(string const & file, pair<int, int> scaleR, AllResult & res);
}
|