proxygen
|
#include <folly/FBString.h>
#include <cstdlib>
#include <fstream>
#include <list>
#include <sstream>
#include <boost/random.hpp>
#include <folly/Benchmark.h>
#include <folly/Random.h>
#include <folly/container/Foreach.h>
#include <folly/portability/GFlags.h>
#include <folly/test/FBStringTestBenchmarks.cpp.h>
Go to the source code of this file.
Macros | |
#define | CONCAT(A, B) CONCAT_HELPER(A, B) |
#define | CONCAT_HELPER(A, B) A##B |
#define | BENCHFUN(F) CONCAT(CONCAT(BM_, F), CONCAT(_, STRING)) |
#define | STRING string |
#define | STRING fbstring |
Typedefs | |
typedef boost::mt19937 | RandomT |
Functions | |
static RandomT | rng (seed) |
template<class Integral1 , class Integral2 > | |
Integral2 | random (Integral1 low, Integral2 up) |
template<class String > | |
void | randomString (String *toFill, size_t size=1000) |
template<class String > | |
void | randomBinaryString (String *toFill, size_t size=1000) |
template<class String , class Integral > | |
void | Num2String (String &str, Integral n) |
std::list< char > | RandomList (unsigned int maxSize) |
int | main (int argc, char **argv) |
Variables | |
static const int | seed = folly::randomNumberSeed() |
Definition at line 79 of file FBStringBenchmark.cpp.
Referenced by assignmentFill(), assignmentOp(), copyCtor(), ctorFromArray(), ctorFromChar(), ctorFromTwoPointers(), defaultCtor(), equality(), fillCtor(), findSuccessful(), findUnsuccessful(), getline(), initRNG(), insertFront(), push_back(), pushBack(), replace(), reserve(), resize(), short_append(), and sizeCtor().
#define CONCAT | ( | A, | |
B | |||
) | CONCAT_HELPER(A, B) |
Definition at line 77 of file FBStringBenchmark.cpp.
#define STRING string |
Definition at line 84 of file FBStringBenchmark.cpp.
Referenced by assignmentFill(), assignmentOp(), folly::bser::bserEncode(), cmake_minimum_required(), folly::compareDynamicWithTolerance(), copyCtor(), ctorFromArray(), ctorFromChar(), ctorFromTwoPointers(), defaultCtor(), folly::FormatArg::doSplitKey(), proxygen::StructuredHeadersEncoder::encodeItem(), equality(), findSuccessful(), findUnsuccessful(), getline(), folly::dynamic::hash(), folly::detail::DynamicKeyEqual::operator()(), push_back(), replace(), resize(), folly::FormatArg::setNextKey(), short_append(), proxygen::TEST_F(), and proxygen::TEST_P().
#define STRING fbstring |
Definition at line 84 of file FBStringBenchmark.cpp.
typedef boost::mt19937 RandomT |
Definition at line 38 of file FBStringBenchmark.cpp.
int main | ( | int | argc, |
char ** | argv | ||
) |
void Num2String | ( | String & | str, |
Integral | n | ||
) |
Definition at line 62 of file FBStringBenchmark.cpp.
Referenced by clause11_21_4_7_2_a(), clause11_21_4_7_2_a1(), clause11_21_4_7_2_a2(), clause11_21_4_7_2_b(), clause11_21_4_7_2_b1(), clause11_21_4_7_2_b2(), clause11_21_4_7_2_c(), clause11_21_4_7_2_c1(), clause11_21_4_7_2_c2(), clause11_21_4_7_2_d(), clause11_21_4_7_3_a(), clause11_21_4_7_3_b(), clause11_21_4_7_3_c(), clause11_21_4_7_3_d(), clause11_21_4_7_4_a(), clause11_21_4_7_4_b(), clause11_21_4_7_4_c(), clause11_21_4_7_4_d(), clause11_21_4_7_5_a(), clause11_21_4_7_5_b(), clause11_21_4_7_5_c(), clause11_21_4_7_5_d(), clause11_21_4_7_6_a(), clause11_21_4_7_6_b(), clause11_21_4_7_6_c(), clause11_21_4_7_6_d(), clause11_21_4_7_7_a(), clause11_21_4_7_7_b(), clause11_21_4_7_7_c(), clause11_21_4_7_7_d(), clause11_21_4_7_9_a(), clause11_21_4_7_9_b(), clause11_21_4_7_9_c(), clause11_21_4_7_9_d(), and clause11_21_4_7_9_e().
Integral2 random | ( | Integral1 | low, |
Integral2 | up | ||
) |
Definition at line 42 of file FBStringBenchmark.cpp.
References folly::gen::range(), and rng().
Referenced by clause11_21_4_2_d(), clause11_21_4_2_e(), clause11_21_4_2_f(), clause11_21_4_2_g(), clause11_21_4_2_j(), clause11_21_4_2_k(), clause11_21_4_2_l(), clause11_21_4_2_lprime(), clause11_21_4_2_m(), clause11_21_4_5(), clause11_21_4_6_1(), clause11_21_4_6_2(), clause11_21_4_6_3_b(), clause11_21_4_6_3_c(), clause11_21_4_6_3_e(), clause11_21_4_6_3_h(), clause11_21_4_6_3_i(), clause11_21_4_6_4(), clause11_21_4_6_5(), clause11_21_4_6_6(), clause11_21_4_6_7(), clause11_21_4_7_2_a(), clause11_21_4_7_2_a1(), clause11_21_4_7_2_a2(), clause11_21_4_7_2_b(), clause11_21_4_7_2_b1(), clause11_21_4_7_2_b2(), clause11_21_4_7_2_c(), clause11_21_4_7_2_c1(), clause11_21_4_7_2_c2(), clause11_21_4_7_2_d(), clause11_21_4_7_3_a(), clause11_21_4_7_3_b(), clause11_21_4_7_3_c(), clause11_21_4_7_3_d(), clause11_21_4_7_4_a(), clause11_21_4_7_4_b(), clause11_21_4_7_4_c(), clause11_21_4_7_4_d(), clause11_21_4_7_5_a(), clause11_21_4_7_5_b(), clause11_21_4_7_5_c(), clause11_21_4_7_5_d(), clause11_21_4_7_6_a(), clause11_21_4_7_6_b(), clause11_21_4_7_6_c(), clause11_21_4_7_6_d(), clause11_21_4_7_7_a(), clause11_21_4_7_7_b(), clause11_21_4_7_7_c(), clause11_21_4_7_7_d(), clause11_21_4_7_8(), clause11_21_4_7_9_b(), clause11_21_4_7_9_c(), clause11_21_4_7_9_e(), clause11_21_4_8_1_g(), clause11_21_4_8_1_h(), clause11_21_4_8_1_k(), findSuccessful(), fizz::RandomGenerator< Size >::generateRandom(), fizz::RandomNumGenerator< T, typename >::generateRandom(), fizz::sm::getClientHello(), fizz::sm::getEarlyDataParams(), operator<<(), testing::internal::PrintOnOneLine(), randomBinaryString(), RandomList(), randomString(), replace(), reserve(), resize(), fizz::test::MockFactory::setDefaults(), fizz::client::test::ClientProtocolTest::setupExpectingServerHello(), testing::TestCase::ShouldRunTest(), testing::internal::TearDownEnvironment(), fizz::test::TEST(), TEST(), fizz::client::test::TEST_F(), fizz::server::test::TEST_F(), TestDeltas(), TESTFUN(), and testing::internal::GTestFlagSaver::~GTestFlagSaver().
void randomBinaryString | ( | String * | toFill, |
size_t | size = 1000 |
||
) |
Definition at line 55 of file FBStringBenchmark.cpp.
References FOR_EACH, i, random(), and folly::size().
Referenced by equality().
std::list<char> RandomList | ( | unsigned int | maxSize | ) |
Definition at line 68 of file FBStringBenchmark.cpp.
Referenced by clause11_21_4_6_2(), clause11_21_4_6_3_f(), and clause11_21_4_6_4().
void randomString | ( | String * | toFill, |
size_t | size = 1000 |
||
) |
Definition at line 48 of file FBStringBenchmark.cpp.
References FOR_EACH, i, random(), and folly::size().
Referenced by assignmentOp(), clause11_21_4_6_1(), clause11_21_4_6_2(), clause11_21_4_6_3_a(), clause11_21_4_6_3_b(), clause11_21_4_6_3_c(), clause11_21_4_6_3_d(), clause11_21_4_6_3_e(), clause11_21_4_6_4(), clause11_21_4_6_6(), clause11_21_4_6_8(), clause11_21_4_7_1(), clause11_21_4_7_4_a(), clause11_21_4_7_4_b(), clause11_21_4_7_4_c(), clause11_21_4_7_5_a(), clause11_21_4_7_5_b(), clause11_21_4_7_5_c(), clause11_21_4_7_6_a(), clause11_21_4_7_6_b(), clause11_21_4_7_6_c(), clause11_21_4_7_7_a(), clause11_21_4_7_7_b(), clause11_21_4_7_7_c(), clause11_21_4_7_9_a(), clause11_21_4_7_9_b(), clause11_21_4_7_9_c(), clause11_21_4_7_9_d(), clause11_21_4_7_9_e(), clause11_21_4_8_1_a(), clause11_21_4_8_1_b(), clause11_21_4_8_1_c(), clause11_21_4_8_1_d(), clause11_21_4_8_1_e(), clause11_21_4_8_1_f(), clause11_21_4_8_1_g(), clause11_21_4_8_1_h(), clause11_21_4_8_1_i(), clause11_21_4_8_1_j(), clause11_21_4_8_1_k(), clause11_21_4_8_1_l(), copyCtor(), ctorFromArray(), getline(), replace(), and TEST().
|
static |
Definition at line 37 of file FBStringBenchmark.cpp.
Referenced by BENCHMARK(), folly::hash::commutative_hash_combine_generic(), folly::hash::commutative_hash_combine_range_generic(), DoTimingBig(), DoTimingSmall(), folly::gen::foldl(), folly::sync_tests::getRNG(), folly::IPAddressV4::hash(), folly::IPAddressV6::hash(), folly::SocketAddress::hash(), folly::hash::SpookyHashV1::Hash32(), folly::hash::SpookyHashV2::Hash32(), folly::hash::SpookyHashV1::Hash64(), folly::hash::SpookyHashV2::Hash64(), Random::Init(), initRNG(), folly::RelaxedConcurrentPriorityQueue< T, MayBlock, SupportsSize, PopBatch, ListTargetSize, Mutex, Atom >::moundPush(), operator<<(), folly::io::test::RandomDataHolder::RandomDataHolder(), testing::internal::Random::Reseed(), runMtNeverFailDeterministic(), folly::Random::secureRandDouble(), folly::RelaxedConcurrentPriorityQueue< T, MayBlock, SupportsSize, PopBatch, ListTargetSize, Mutex, Atom >::selectPosition(), wangle::ServerSocketConfig::ServerSocketConfig(), fizz::server::SlidingBloomReplayCache::SlidingBloomReplayCache(), TEST(), TEST_F(), testing::gmock_matchers_test::TEST_P(), folly::test::DeterministicSchedule::uniform(), and folly::test::DeterministicSchedule::uniformSubset().