proxygen
|
#include <folly/Benchmark.h>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
#include <limits>
#include <map>
#include <memory>
#include <utility>
#include <vector>
#include <boost/regex.hpp>
#include <folly/MapUtil.h>
#include <folly/String.h>
#include <folly/container/Foreach.h>
#include <folly/json.h>
Go to the source code of this file.
Classes | |
struct | folly::ScaleInfo |
Namespaces | |
folly | |
—— Concurrent Priority Queue Implementation —— | |
Macros | |
#define | FB_FOLLY_GLOBAL_BENCHMARK_BASELINE fbFollyGlobalBenchmarkBaseline |
#define | FB_STRINGIZE_X2(x) FB_STRINGIZE(x) |
Typedefs | |
typedef function< detail::TimeIterPair(unsigned int)> | folly::BenchmarkFun |
Functions | |
DEFINE_bool (benchmark, false,"Run benchmarks.") | |
DEFINE_bool (json, false,"Output in JSON format.") | |
DEFINE_bool (json_verbose, false,"Output in verbose JSON format.") | |
DEFINE_string (bm_regex,"","Only benchmarks whose names match this regex will be run.") | |
DEFINE_int64 (bm_min_usec, 100,"Minimum # of microseconds we'll accept for each benchmark.") | |
DEFINE_int32 (bm_min_iters, 1,"Minimum # of iterations we'll try for each benchmark.") | |
DEFINE_int64 (bm_max_iters, 1<< 30,"Maximum # of iterations we'll try for each benchmark.") | |
DEFINE_int32 (bm_max_secs, 1,"Maximum # of seconds we'll spend on each benchmark.") | |
vector< detail::BenchmarkRegistration > & | folly::benchmarks () |
folly::BENCHMARK (fbFollyGlobalBenchmarkBaseline) | |
size_t | folly::getGlobalBenchmarkBaselineIndex () |
static double | folly::estimateTime (double *begin, double *end) |
static double | folly::runBenchmarkGetNSPerIteration (const BenchmarkFun &fun, const double globalBaseline) |
static string | folly::humanReadable (double n, unsigned int decimals, const ScaleInfo *scales) |
static string | folly::readableTime (double n, unsigned int decimals) |
static string | folly::metricReadable (double n, unsigned int decimals) |
static void | folly::printBenchmarkResultsAsJson (const vector< detail::BenchmarkResult > &data) |
static void | folly::printBenchmarkResultsAsVerboseJson (const vector< detail::BenchmarkResult > &data) |
static void | folly::printBenchmarkResults (const vector< detail::BenchmarkResult > &data) |
void | folly::benchmarkResultsToDynamic (const vector< detail::BenchmarkResult > &data, dynamic &out) |
void | folly::benchmarkResultsFromDynamic (const dynamic &d, vector< detail::BenchmarkResult > &results) |
static pair< StringPiece, StringPiece > | folly::resultKey (const detail::BenchmarkResult &result) |
void | folly::printResultComparison (const vector< detail::BenchmarkResult > &base, const vector< detail::BenchmarkResult > &test) |
void | folly::checkRunMode () |
void | folly::runBenchmarks () |
Variables | |
static const ScaleInfo | folly::kTimeSuffixes [] |
static const ScaleInfo | folly::kMetricSuffixes [] |
#define FB_FOLLY_GLOBAL_BENCHMARK_BASELINE fbFollyGlobalBenchmarkBaseline |
Definition at line 80 of file Benchmark.cpp.
Referenced by folly::getGlobalBenchmarkBaselineIndex().
#define FB_STRINGIZE_X2 | ( | x | ) | FB_STRINGIZE(x) |
Definition at line 81 of file Benchmark.cpp.
Referenced by folly::getGlobalBenchmarkBaselineIndex().
DEFINE_bool | ( | benchmark | , |
false | , | ||
"Run benchmarks." | |||
) |
DEFINE_bool | ( | json | , |
false | , | ||
"Output in JSON format." | |||
) |
DEFINE_bool | ( | json_verbose | , |
false | , | ||
"Output in verbose JSON format." | |||
) |
DEFINE_int32 | ( | bm_min_iters | , |
1 | , | ||
"Minimum # of iterations we'll try for each benchmark." | |||
) |
DEFINE_int32 | ( | bm_max_secs | , |
1 | , | ||
"Maximum # of seconds we'll spend on each benchmark." | |||
) |
DEFINE_int64 | ( | bm_min_usec | , |
100 | , | ||
"Minimum # of microseconds we'll accept for each benchmark." | |||
) |
DEFINE_int64 | ( | bm_max_iters | , |
1<< | 30, | ||
"Maximum # of iterations we'll try for each benchmark." | |||
) |
DEFINE_string | ( | bm_regex | , |
"" | , | ||
"Only benchmarks whose names match this regex will be run." | |||
) |
double baselineNsPerIter {numeric_limits<double>::max()} |
Definition at line 254 of file Benchmark.cpp.
|
static |
Definition at line 253 of file Benchmark.cpp.
Referenced by folly::printResultComparison().
string lastFile |
Definition at line 255 of file Benchmark.cpp.
Referenced by folly::printResultComparison().