Merge branch 'master' of https://phabricator.tomicevic.com/diffusion/MG/memgraph
This commit is contained in:
commit
8cecbc5ad8
@ -94,6 +94,8 @@ std::string benchmark_json(const std::string& host,
|
||||
[](auto acc, auto x) { return acc + x; }
|
||||
);
|
||||
|
||||
auto created_count = counter.load();
|
||||
|
||||
std::string json = "{\"total\":" + std::to_string(total / elapsed) + ","
|
||||
+ " \"per_query\": [";
|
||||
for(size_t i = 0; i < queries.size(); ++i) {
|
||||
@ -103,6 +105,6 @@ std::string benchmark_json(const std::string& host,
|
||||
}
|
||||
json += ", " + std::to_string(reqs[i] / elapsed);
|
||||
}
|
||||
json += "]}";
|
||||
json += "], \"counter\": " + std::to_string(created_count) + " }";
|
||||
return json;
|
||||
}
|
||||
|
@ -10,8 +10,12 @@ int main(int argc, char* argv[])
|
||||
auto port = std::string(argv[2]);
|
||||
auto connections = std::stoi(argv[3]);
|
||||
auto duration = std::stod(argv[4]);
|
||||
auto count = std::stoi(argv[5]);
|
||||
|
||||
counter.store(count);
|
||||
|
||||
std::vector<std::string> queries;
|
||||
for (int i = 5; i < argc; ++i) {
|
||||
for (int i = 6; i < argc; ++i) {
|
||||
queries.emplace_back(std::string(argv[i]));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user