proxygen
StringVariadicToBM< String > Struct Template Reference

Public Member Functions

 StringVariadicToBM ()
 
void operator() (unsigned int n, size_t len) const
 

Detailed Description

template<class String>
struct StringVariadicToBM< String >

Definition at line 489 of file ConvBenchmark.cpp.

Constructor & Destructor Documentation

template<class String>
StringVariadicToBM< String >::StringVariadicToBM ( )
inline

Definition at line 490 of file ConvBenchmark.cpp.

490 {}

Member Function Documentation

template<class String>
void StringVariadicToBM< String >::operator() ( unsigned int  n,
size_t  len 
) const
inline

Definition at line 491 of file ConvBenchmark.cpp.

References BENCHMARK_SUSPEND, folly::doNotOptimizeAway(), FOR_EACH_RANGE, i, and s.

491  {
492  String s;
494  s.append(len, '0');
495  }
496  FOR_EACH_RANGE (i, 0, n) {
497  String result = to<String>(s, nullptr);
498  doNotOptimizeAway(result.size());
499  }
500  }
#define BENCHMARK_SUSPEND
Definition: Benchmark.h:576
#define FOR_EACH_RANGE(i, begin, end)
Definition: Foreach.h:313
static set< string > s
auto doNotOptimizeAway(const T &datum) -> typename std::enable_if< !detail::DoNotOptimizeAwayNeedsIndirect< T >::value >::type
Definition: Benchmark.h:258

The documentation for this struct was generated from the following file: