MCPcopy Create free account
hub / github.com/baidu/tera / MakeNString

Method MakeNString

src/benchmark/tpcc/random_generator.cc:74–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74std::string RandomGenerator::MakeNString(int lower_len, int upper_len) {
75 int len = GetRandom(lower_len, upper_len);
76 std::string ret;
77 for (int i = 0; i < len; ++i) {
78 ret += (char)('0' + GetRandom(0, 9));
79 }
80 return ret;
81}
82
83float RandomGenerator::MakeFloat(float lower, float upper, int digits) {
84 float num = 1.0;

Callers 2

GenZipFunction · 0.80
CustomerMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected