proxygen
ClientRunner Class Reference

Public Member Functions

 ClientRunner ()
 
void run ()
 

Public Attributes

int reqs
 
int hits
 
int miss
 
int num
 

Detailed Description

Definition at line 40 of file SSLCacheTest.cpp.

Constructor & Destructor Documentation

ClientRunner::ClientRunner ( )
inline

Definition at line 43 of file SSLCacheTest.cpp.

References folly::run().

43 : reqs(0), hits(0), miss(0), num(tnum++) {}
int tnum

Member Function Documentation

void ClientRunner::run ( )

Definition at line 161 of file SSLCacheTest.cpp.

References c, i, folly::EventBase::loop(), and SSLCacheClient::start().

Referenced by main().

162 {
163  EventBase eb;
164  std::list<SSLCacheClient *> clients;
165  SSL_SESSION* session = nullptr;
166 
167  for (int i = 0; i < FLAGS_clients; i++) {
168  SSLCacheClient* c = new SSLCacheClient(&eb, &session, this);
169  c->start();
170  clients.push_back(c);
171  }
172 
173  eb.loop();
174 
175  for (auto it = clients.begin(); it != clients.end(); it++) {
176  delete* it;
177  }
178 
179  reqs += hits + miss;
180 }
char c

Member Data Documentation

int ClientRunner::hits

Definition at line 47 of file SSLCacheTest.cpp.

Referenced by SSLCacheClient::handshakeSuc(), and main().

int ClientRunner::miss

Definition at line 48 of file SSLCacheTest.cpp.

Referenced by SSLCacheClient::handshakeSuc(), and main().

int ClientRunner::num

Definition at line 49 of file SSLCacheTest.cpp.

Referenced by SSLCacheClient::handshakeSuc().

int ClientRunner::reqs

Definition at line 46 of file SSLCacheTest.cpp.

Referenced by main().


The documentation for this class was generated from the following file: