mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
wsperf bug fixes, adds Xcode target
This commit is contained in:
@@ -58,6 +58,7 @@ public:
|
||||
|
||||
m_start = boost::chrono::steady_clock::now();
|
||||
m_bytes = 0;
|
||||
m_pass = RUNNING;
|
||||
}
|
||||
|
||||
void mark() {
|
||||
@@ -212,7 +213,8 @@ protected:
|
||||
enum status {
|
||||
FAIL = 0,
|
||||
PASS = 1,
|
||||
TIME_OUT = 2
|
||||
TIME_OUT = 2,
|
||||
RUNNING = 3
|
||||
};
|
||||
|
||||
std::string m_name;
|
||||
|
||||
@@ -90,6 +90,8 @@ public:
|
||||
mark();
|
||||
m_timer->cancel();
|
||||
m_msg.reset();
|
||||
m_pass = FAIL;
|
||||
std::cout << "foo" << std::endl;
|
||||
this->end(con);
|
||||
}
|
||||
|
||||
@@ -98,7 +100,7 @@ public:
|
||||
m_timer->cancel();
|
||||
m_msg.reset();
|
||||
this->end(con);
|
||||
} else if (m_sync) {
|
||||
} else if (m_sync && m_pass == RUNNING) {
|
||||
con->send(m_msg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -270,6 +270,9 @@ int main(int argc, char* argv[]) {
|
||||
unsigned short port = 9002;
|
||||
unsigned short num_threads = 2;
|
||||
|
||||
std::list<boost::shared_ptr<boost::thread> > threads;
|
||||
std::list<boost::shared_ptr<boost::thread> >::iterator thit;
|
||||
|
||||
try {
|
||||
if (argc == 2) {
|
||||
std::stringstream buffer(argv[1]);
|
||||
@@ -299,8 +302,6 @@ int main(int argc, char* argv[]) {
|
||||
echo_endpoint.elog().set_level(websocketpp::log::elevel::ERROR);
|
||||
echo_endpoint.elog().set_level(websocketpp::log::elevel::FATAL);
|
||||
|
||||
std::list<boost::shared_ptr<boost::thread> > threads;
|
||||
|
||||
for (int i = 0; i < num_threads; i++) {
|
||||
threads.push_back(boost::shared_ptr<boost::thread>(new boost::thread(boost::bind(&process_requests, &rc))));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user