#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdlib>
#include <vector>
#include "benchmark/benchmark.h"
#include "output_test.h"
Go to the source code of this file.
|
| ADD_COMPLEXITY_CASES (complexity_capture_name, complexity_capture_name+"_BigO", complexity_capture_name+"_RMS", "N", 9) |
|
| ADD_COMPLEXITY_CASES (n_lg_n_test_name, big_o_n_lg_n_test_name, rms_o_n_lg_n_test_name, enum_auto_big_o_n_lg_n, 6) |
|
| ADD_COMPLEXITY_CASES (n_lg_n_test_name, big_o_n_lg_n_test_name, rms_o_n_lg_n_test_name, lambda_big_o_n_lg_n, 7) |
|
| ADD_COMPLEXITY_CASES (n_test_name, big_o_n_test_name, rms_o_n_test_name, enum_auto_big_o_n, 3) |
|
| ADD_COMPLEXITY_CASES (n_test_name, big_o_n_test_name, rms_o_n_test_name, lambda_big_o_n, 4) |
|
| ADD_COMPLEXITY_CASES (one_test_name, big_o_1_test_name, rms_o_1_test_name, auto_big_o_1, 1) |
|
| ADD_COMPLEXITY_CASES (one_test_name, big_o_1_test_name, rms_o_1_test_name, enum_big_o_1, 0) |
|
| ADD_COMPLEXITY_CASES (one_test_name, big_o_1_test_name, rms_o_1_test_name, lambda_big_o_1, 2) |
|
| BENCHMARK (BM_Complexity_O1) -> Range(1, 1<< 18) ->Complexity(benchmark::o1) |
|
void | BM_Complexity_O1 (benchmark::State &state) |
|
void | BM_Complexity_O_N (benchmark::State &state) |
|
static void | BM_Complexity_O_N_log_N (benchmark::State &state) |
|
void | BM_ComplexityCaptureArgs (benchmark::State &state, int n) |
|
| Complexity (benchmark::oN) -> Ranges( |
|
std::vector< int > | ConstructRandomVector (int64_t size) |
|
int | main (int argc, char *argv[]) |
|
| Range (1, 1<< 18) -> Complexity([](benchmark::IterationCount) |
|
| RangeMultiplier (2) -> Range(1<< 10, 1<< 16) ->Complexity(benchmark::oN) |
|
◆ ADD_COMPLEXITY_CASES
#define ADD_COMPLEXITY_CASES |
( |
|
... | ) |
int CONCAT(dummy, __LINE__) = AddComplexityTest(__VA_ARGS__) |
◆ ADD_COMPLEXITY_CASES() [1/8]
◆ ADD_COMPLEXITY_CASES() [2/8]
◆ ADD_COMPLEXITY_CASES() [3/8]
◆ ADD_COMPLEXITY_CASES() [4/8]
◆ ADD_COMPLEXITY_CASES() [5/8]
◆ ADD_COMPLEXITY_CASES() [6/8]
◆ ADD_COMPLEXITY_CASES() [7/8]
◆ ADD_COMPLEXITY_CASES() [8/8]
◆ BENCHMARK()
◆ BM_Complexity_O1()
◆ BM_Complexity_O_N()
◆ BM_Complexity_O_N_log_N()
◆ BM_ComplexityCaptureArgs()
◆ Complexity()
◆ ConstructRandomVector()
std::vector<int> ConstructRandomVector |
( |
int64_t |
size | ) |
|
◆ main()
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
◆ Range()
◆ RangeMultiplier()
◆ auto_big_o_1
const char* auto_big_o_1 = "(\\([0-9]+\\))|(lgN)" |
◆ big_o_1_test_name
const char* big_o_1_test_name = "BM_Complexity_O1_BigO" |
◆ big_o_n_lg_n_test_name
const char* big_o_n_lg_n_test_name = "BM_Complexity_O_N_log_N_BigO" |
◆ big_o_n_test_name
const char* big_o_n_test_name = "BM_Complexity_O_N_BigO" |
◆ complexity_capture_name
const std::string complexity_capture_name |
◆ enum_auto_big_o_n
const char* enum_auto_big_o_n = "N" |
◆ enum_auto_big_o_n_lg_n
const char* enum_auto_big_o_n_lg_n = "NlgN" |
◆ enum_big_o_1
const char* enum_big_o_1 = "\\([0-9]+\\)" |
◆ kLog2E
const double kLog2E = 1.44269504088896340736 |
|
static |
◆ lambda_big_o_1
const char* lambda_big_o_1 = "f\\(N\\)" |
◆ lambda_big_o_n
const char* lambda_big_o_n = "f\\(N\\)" |
◆ lambda_big_o_n_lg_n
const char* lambda_big_o_n_lg_n = "f\\(N\\)" |
◆ n_lg_n_test_name
const char* n_lg_n_test_name = "BM_Complexity_O_N_log_N" |
◆ n_test_name
const char* n_test_name = "BM_Complexity_O_N" |
◆ one_test_name
const char* one_test_name = "BM_Complexity_O1" |
◆ rms_o_1_test_name
const char* rms_o_1_test_name = "BM_Complexity_O1_RMS" |
◆ rms_o_n_lg_n_test_name
const char* rms_o_n_lg_n_test_name = "BM_Complexity_O_N_log_N_RMS" |
◆ rms_o_n_test_name
const char* rms_o_n_test_name = "BM_Complexity_O_N_RMS" |