proxygen
SettingsBenchmarks.cpp File Reference

Go to the source code of this file.

Functions

 FOLLY_SETTING_DEFINE (follytest, benchmarked, int, 100,"desc")
 
 BENCHMARK (settings_get_bench, iters)
 
int main (int argc, char **argv)
 

Function Documentation

BENCHMARK ( settings_get_bench  ,
iters   
)

Definition at line 31 of file SettingsBenchmarks.cpp.

References folly::doNotOptimizeAway(), FOLLY_SETTING, i, and value.

31  {
32  for (unsigned int i = 0; i < iters; ++i) {
33  auto value = *FOLLY_SETTING(follytest, benchmarked);
35  }
36 }
static const char *const value
Definition: Conv.cpp:50
#define FOLLY_SETTING(_project, _name)
Definition: Settings.h:192
auto doNotOptimizeAway(const T &datum) -> typename std::enable_if< !detail::DoNotOptimizeAwayNeedsIndirect< T >::value >::type
Definition: Benchmark.h:258
FOLLY_SETTING_DEFINE ( follytest  ,
benchmarked  ,
int  ,
100  ,
"desc"   
)
int main ( int  argc,
char **  argv 
)

Definition at line 38 of file SettingsBenchmarks.cpp.

References folly::init(), and folly::runBenchmarks().

38  {
39  folly::init(&argc, &argv);
41 
42  return 0;
43 }
void runBenchmarks()
Definition: Benchmark.cpp:456
void init(int *argc, char ***argv, bool removeFlags)
Definition: Init.cpp:34
char ** argv