#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.
Macros | |
| #define | ADD_COMPLEXITY_CASES(...) int CONCAT(dummy, __LINE__) = AddComplexityTest(__VA_ARGS__) |
Functions | |
| ADD_COMPLEXITY_CASES (big_o_1_test_name, rms_o_1_test_name, auto_big_o_1) | |
| ADD_COMPLEXITY_CASES (big_o_1_test_name, rms_o_1_test_name, enum_big_o_1) | |
| ADD_COMPLEXITY_CASES (big_o_1_test_name, rms_o_1_test_name, lambda_big_o_1) | |
| ADD_COMPLEXITY_CASES (big_o_n_lg_n_test_name, rms_o_n_lg_n_test_name, enum_auto_big_o_n_lg_n) | |
| ADD_COMPLEXITY_CASES (big_o_n_lg_n_test_name, rms_o_n_lg_n_test_name, lambda_big_o_n_lg_n) | |
| ADD_COMPLEXITY_CASES (big_o_n_test_name, rms_o_n_test_name, enum_auto_big_o_n) | |
| ADD_COMPLEXITY_CASES (big_o_n_test_name, rms_o_n_test_name, lambda_big_o_n) | |
| 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) |
| std::vector< int > | ConstructRandomVector (int size) |
| int | main (int argc, char *argv[]) |
| RangeMultiplier (2) -> Range(1<< 10, 1<< 16) ->Complexity(benchmark::oN) | |
Variables | |
| const char * | auto_big_o_1 = "(\\([0-9]+\\))|(lgN)" |
| const char * | big_o_1_test_name = "BM_Complexity_O1_BigO" |
| const char * | big_o_n_lg_n_test_name = "BM_Complexity_O_N_log_N_BigO" |
| const char * | big_o_n_test_name = "BM_Complexity_O_N_BigO" |
| const char * | enum_auto_big_o_n = "N" |
| const char * | enum_auto_big_o_n_lg_n = "NlgN" |
| const char * | enum_big_o_1 = "\\([0-9]+\\)" |
| const char * | lambda_big_o_1 = "f\\(N\\)" |
| const char * | lambda_big_o_n = "f\\(N\\)" |
| const char * | lambda_big_o_n_lg_n = "f\\(N\\)" |
| const char * | rms_o_1_test_name = "BM_Complexity_O1_RMS" |
| const char * | rms_o_n_lg_n_test_name = "BM_Complexity_O_N_log_N_RMS" |
| const char * | rms_o_n_test_name = "BM_Complexity_O_N_RMS" |
Definition at line 12 of file protobuf/third_party/benchmark/test/complexity_test.cc.
| ADD_COMPLEXITY_CASES | ( | big_o_1_test_name | , |
| rms_o_1_test_name | , | ||
| auto_big_o_1 | |||
| ) |
| ADD_COMPLEXITY_CASES | ( | big_o_1_test_name | , |
| rms_o_1_test_name | , | ||
| enum_big_o_1 | |||
| ) |
| ADD_COMPLEXITY_CASES | ( | big_o_1_test_name | , |
| rms_o_1_test_name | , | ||
| lambda_big_o_1 | |||
| ) |
| ADD_COMPLEXITY_CASES | ( | big_o_n_lg_n_test_name | , |
| rms_o_n_lg_n_test_name | , | ||
| enum_auto_big_o_n_lg_n | |||
| ) |
| ADD_COMPLEXITY_CASES | ( | big_o_n_lg_n_test_name | , |
| rms_o_n_lg_n_test_name | , | ||
| lambda_big_o_n_lg_n | |||
| ) |
| ADD_COMPLEXITY_CASES | ( | big_o_n_test_name | , |
| rms_o_n_test_name | , | ||
| enum_auto_big_o_n | |||
| ) |
| ADD_COMPLEXITY_CASES | ( | big_o_n_test_name | , |
| rms_o_n_test_name | , | ||
| lambda_big_o_n | |||
| ) |
| BENCHMARK | ( | BM_Complexity_O1 | ) | -> Range(1, 1 << 18)->Complexity(benchmark::o1) |
Definition at line 58 of file protobuf/third_party/benchmark/test/complexity_test.cc.
| void BM_Complexity_O1 | ( | benchmark::State & | state | ) |
Definition at line 48 of file protobuf/third_party/benchmark/test/complexity_test.cc.
| void BM_Complexity_O_N | ( | benchmark::State & | state | ) |
Definition at line 93 of file protobuf/third_party/benchmark/test/complexity_test.cc.
|
static |
Definition at line 130 of file protobuf/third_party/benchmark/test/complexity_test.cc.
Definition at line 84 of file protobuf/third_party/benchmark/test/complexity_test.cc.
Definition at line 167 of file protobuf/third_party/benchmark/test/complexity_test.cc.
| RangeMultiplier | ( | 2 | ) | -> Range(1<< 10, 1<< 16) ->Complexity(benchmark::oN) |
Definition at line 107 of file protobuf/third_party/benchmark/test/complexity_test.cc.
| const char* auto_big_o_1 = "(\\([0-9]+\\))|(lgN)" |
Definition at line 68 of file protobuf/third_party/benchmark/test/complexity_test.cc.
| const char* big_o_1_test_name = "BM_Complexity_O1_BigO" |
Definition at line 62 of file protobuf/third_party/benchmark/test/complexity_test.cc.
| const char* big_o_n_lg_n_test_name = "BM_Complexity_O_N_log_N_BigO" |
Definition at line 150 of file protobuf/third_party/benchmark/test/complexity_test.cc.
| const char* big_o_n_test_name = "BM_Complexity_O_N_BigO" |
Definition at line 115 of file protobuf/third_party/benchmark/test/complexity_test.cc.
| const char* enum_auto_big_o_n = "N" |
Definition at line 117 of file protobuf/third_party/benchmark/test/complexity_test.cc.
| const char* enum_auto_big_o_n_lg_n = "NlgN" |
Definition at line 152 of file protobuf/third_party/benchmark/test/complexity_test.cc.
| const char* enum_big_o_1 = "\\([0-9]+\\)" |
Definition at line 64 of file protobuf/third_party/benchmark/test/complexity_test.cc.
| const char* lambda_big_o_1 = "f\\(N\\)" |
Definition at line 69 of file protobuf/third_party/benchmark/test/complexity_test.cc.
| const char* lambda_big_o_n = "f\\(N\\)" |
Definition at line 118 of file protobuf/third_party/benchmark/test/complexity_test.cc.
| const char* lambda_big_o_n_lg_n = "f\\(N\\)" |
Definition at line 153 of file protobuf/third_party/benchmark/test/complexity_test.cc.
| const char* rms_o_1_test_name = "BM_Complexity_O1_RMS" |
Definition at line 63 of file protobuf/third_party/benchmark/test/complexity_test.cc.
| const char* rms_o_n_lg_n_test_name = "BM_Complexity_O_N_log_N_RMS" |
Definition at line 151 of file protobuf/third_party/benchmark/test/complexity_test.cc.
| const char* rms_o_n_test_name = "BM_Complexity_O_N_RMS" |
Definition at line 116 of file protobuf/third_party/benchmark/test/complexity_test.cc.