27 #include <boost/random.hpp> 35 using namespace folly;
41 template <
class Integral1,
class Integral2>
42 Integral2
random(Integral1 low, Integral2 up) {
43 boost::uniform_int<>
range(low, up);
47 template <
class String>
54 template <
class String>
61 template <
class String,
class Integral>
64 sprintf(&str[0],
"%lu", static_cast<unsigned long>(n));
65 str.resize(strlen(str.c_str()));
69 std::list<char> lst(
random(0u, maxSize));
70 std::list<char>::iterator
i = lst.begin();
71 for (; i != lst.end(); ++
i) {
77 #define CONCAT(A, B) CONCAT_HELPER(A, B) 78 #define CONCAT_HELPER(A, B) A##B 79 #define BENCHFUN(F) CONCAT(CONCAT(BM_, F), CONCAT(_, STRING)) 84 #define STRING fbstring 89 gflags::ParseCommandLineFlags(&argc, &argv,
true);
void Num2String(String &str, Integral n)
Integral2 random(Integral1 low, Integral2 up)
void randomBinaryString(String *toFill, size_t size=1000)
—— Concurrent Priority Queue Implementation ——
std::list< char > RandomList(unsigned int maxSize)
Gen range(Value begin, Value end)
constexpr auto size(C const &c) -> decltype(c.size())
uint32_t randomNumberSeed()
int main(int argc, char **argv)
void randomString(String *toFill, size_t size=1000)