benchmark
1.10.0
Toggle main menu visibility
Loading...
Searching...
No Matches
statistics.h
1
// Copyright 2015 Google Inc. All rights reserved.
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
// http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14
15
#ifndef BENCHMARK_STATISTICS_H_
16
#define BENCHMARK_STATISTICS_H_
17
18
#include <string>
19
#include <vector>
20
21
#include "benchmark/types.h"
22
23
namespace
benchmark {
24
25
enum
BigO { oNone, o1, oN, oNSquared, oNCubed, oLogN, oNLogN, oAuto, oLambda };
26
27
typedef
int64_t ComplexityN;
28
29
enum
StatisticUnit { kTime, kPercentage };
30
31
typedef
double(BigOFunc)(ComplexityN);
32
33
typedef
double(StatisticsFunc)(
const
std::vector<double>&);
34
35
namespace
internal {
36
struct
Statistics {
37
std::string name_;
38
StatisticsFunc* compute_;
39
StatisticUnit unit_;
40
41
Statistics(
const
std::string& name, StatisticsFunc* compute,
42
StatisticUnit unit = kTime)
43
: name_(name), compute_(compute), unit_(unit) {}
44
};
45
46
enum
AggregationReportMode :
unsigned
{
47
ARM_Unspecified = 0,
48
ARM_Default = 1U << 0U,
49
ARM_FileReportAggregatesOnly = 1U << 1U,
50
ARM_DisplayReportAggregatesOnly = 1U << 2U,
51
ARM_ReportAggregatesOnly =
52
ARM_FileReportAggregatesOnly | ARM_DisplayReportAggregatesOnly
53
};
54
55
enum
Skipped :
unsigned
{
56
NotSkipped = 0,
57
SkippedWithMessage,
58
SkippedWithError
59
};
60
61
}
// namespace internal
62
63
}
// namespace benchmark
64
65
#endif
// BENCHMARK_STATISTICS_H_
include
benchmark
statistics.h
Generated by
1.18.0