Skip to content

Commit

Permalink
Add hardware column
Browse files Browse the repository at this point in the history
  • Loading branch information
jesse-r-s-hines committed Mar 29, 2022
1 parent 9cef024 commit 6ef4a0e
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ class Benchmark {
/** Directory to save the stores */
path storeDir;

/** Name of the system the benchmark is running on */
string hardware;

/** How many iterations of each measurement to do */
const int repeats;

Expand Down Expand Up @@ -101,10 +104,9 @@ class Benchmark {
return dataSize;
}

inline static const string CSV_HEADER = "store,op,size,records,data type,measurements,sum,min,max,avg\n";
static string getCSVRow(const string& store, const string& op, const UsagePattern& pattern, const Stats& stats) {
return store + "," +
op + "," +
inline static const string CSV_HEADER = "hardware,store,op,size,records,data type,measurements,sum,min,max,avg\n";
string getCSVRow(const string& store, const string& op, const UsagePattern& pattern, const Stats& stats) {
return hardware + "," + store + "," + op + "," +
utils::prettySize(pattern.size.min) + " to " + utils::prettySize(pattern.size.max + 1) + "," +
to_string(pattern.count.min) + "," +
pattern.dataType + "," +
Expand Down Expand Up @@ -243,6 +245,10 @@ int main(int argc, char** argv) {
int res = context.run();
if(context.shouldExit()) return res;

string hardware;
std::cout << "Name of the system the benchmark is running on: ";
std::cin >> hardware; // Get user input from the keyboard

std::cout << "Starting benchmark...\n";

const std::time_t now = chrono::system_clock::to_time_t(chrono::system_clock::now());
Expand All @@ -256,6 +262,7 @@ int main(int argc, char** argv) {
utils::ClobGenerator randClob{"./randomText"};
Benchmark benchmark{
"out/stores", // storeDir
hardware, // hardware
1000, // repeats
50 * GiB, // maxDbSize
{"LevelDB", "RocksDB", "BerkeleyDB", "FlatFolder", "NestedFolder", "SQLite3"}, // storeTypes
Expand Down

0 comments on commit 6ef4a0e

Please sign in to comment.