mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-28 20:02:00 +03:00
Compute transactions per second
This commit is contained in:
@ -65,12 +65,16 @@ public:
|
|||||||
{ return params_; }
|
{ return params_; }
|
||||||
std::string stats() const
|
std::string stats() const
|
||||||
{
|
{
|
||||||
|
size_t transactions(params_.n_servers * params_.n_clients
|
||||||
|
* params_.n_transactions);
|
||||||
|
auto duration(std::chrono::duration<double>(
|
||||||
|
clients_stop_ - clients_start_).count());
|
||||||
std::ostringstream os;
|
std::ostringstream os;
|
||||||
os << "Number of transactions: " <<
|
os << "Number of transactions: " << transactions
|
||||||
(params_.n_servers * params_.n_clients * params_.n_transactions)
|
|
||||||
<< "\n"
|
<< "\n"
|
||||||
<< "Seconds: "
|
<< "Seconds: " << duration
|
||||||
<< std::chrono::duration<double>(clients_stop_ - clients_start_).count()
|
<< " \n"
|
||||||
|
<< "Transactions per second: " << transactions/duration
|
||||||
<< "\n";
|
<< "\n";
|
||||||
return os.str();
|
return os.str();
|
||||||
}
|
}
|
||||||
@ -466,7 +470,6 @@ void dbms_simulator::stop()
|
|||||||
server.provider().disconnect();
|
server.provider().disconnect();
|
||||||
server.wait_until_disconnected();
|
server.wait_until_disconnected();
|
||||||
server.stop_applier();
|
server.stop_applier();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user