OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
com.mapd.tests.ConcurrencyTest.MonitoringThread Class Reference
+ Inheritance diagram for com.mapd.tests.ConcurrencyTest.MonitoringThread:
+ Collaboration diagram for com.mapd.tests.ConcurrencyTest.MonitoringThread:

Public Member Functions

void run ()
 

Package Functions

 MonitoringThread (List< SqlCommandThread[]> monitoredThreads, int numThreads)
 

Package Attributes

List< SqlCommandThread[]> monitoredThreads
 
int numThreads
 

Detailed Description

Definition at line 198 of file ConcurrencyTest.java.

Constructor & Destructor Documentation

com.mapd.tests.ConcurrencyTest.MonitoringThread.MonitoringThread ( List< SqlCommandThread[]>  monitoredThreads,
int  numThreads 
)
inlinepackage

Member Function Documentation

void com.mapd.tests.ConcurrencyTest.MonitoringThread.run ( )
inline

Definition at line 208 of file ConcurrencyTest.java.

References com.mapd.tests.ConcurrencyTest.MonitoringThread.monitoredThreads, and com.mapd.tests.ConcurrencyTest.MonitoringThread.numThreads.

208  {
209  int finishedThreads = 0;
210  int totalThreads = monitoredThreads.size() * numThreads;
211  while (finishedThreads < totalThreads) {
212  finishedThreads = 0;
213  for (SqlCommandThread threadGroup[] : monitoredThreads) {
214  for (SqlCommandThread thread : threadGroup) {
215  if (thread.getState() == Thread.State.TERMINATED) {
216  finishedThreads++;
217  }
218  }
219  }
220  logger.info("Threads running: " + (totalThreads - finishedThreads));
221  try {
222  Thread.sleep(60000);
223  } catch (Exception e) {
224  logger.error("Monitoring thread: " + e.getMessage());
225  }
226  }
227  }

Member Data Documentation

List<SqlCommandThread[]> com.mapd.tests.ConcurrencyTest.MonitoringThread.monitoredThreads
package
int com.mapd.tests.ConcurrencyTest.MonitoringThread.numThreads
package

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