hashmap-bench/src/generator.cpp

28 lines
566 B
C++
Raw Normal View History

2020-02-03 18:10:29 +00:00
#include "./includes/generator.h"
std::string gen_string() { // 90^size posibilities
std::string randomstring;
for (int i = 0; i < 5; ++i) {
randomstring += gen_char(generator);
}
return randomstring;
}
std::string gen_unsuccesfull_string() { // 90^size posibilities
std::string randomstring;
for (int i = 0; i < 4; ++i) {
randomstring += gen_char(generator);
}
return randomstring;
}
int gen_int(){
return gen_insert_int(generator);
}
int gen_unsuccesfull_int(){
return gen_noninsert_int(generator);
}