MIDAS
Loading...
Searching...
No Matches
RequestTraceBuf Class Reference
Collaboration diagram for RequestTraceBuf:

Public Member Functions

 RequestTraceBuf ()
 
void AddTrace (RequestTrace *t)
 
void AddTraceMTS (RequestTrace *t)
 
void Clear ()
 

Public Attributes

MUTEX_TfMutex
 
std::vector< RequestTrace * > fBuf
 

Detailed Description

Definition at line 437 of file mhttpd.cxx.

Constructor & Destructor Documentation

◆ RequestTraceBuf()

RequestTraceBuf::RequestTraceBuf ( )
inline

Definition at line 444 of file mhttpd.cxx.

445 {
446 int status;
448 assert(status==SS_SUCCESS || status==SS_CREATED);
449 }
#define FALSE
Definition cfortran.h:309
MUTEX_T * fMutex
Definition mhttpd.cxx:440
#define SS_SUCCESS
Definition midas.h:663
#define SS_CREATED
Definition midas.h:664
INT ss_mutex_create(MUTEX_T **mutex, BOOL recursive)
Definition system.cxx:3013
DWORD status
Definition odbhist.cxx:39
Here is the call graph for this function:

Member Function Documentation

◆ AddTrace()

void RequestTraceBuf::AddTrace ( RequestTrace t)
inline

Definition at line 458 of file mhttpd.cxx.

459 {
460 fBuf.push_back(t);
461 }
std::vector< RequestTrace * > fBuf
Definition mhttpd.cxx:441

◆ AddTraceMTS()

void RequestTraceBuf::AddTraceMTS ( RequestTrace t)
inline

Definition at line 463 of file mhttpd.cxx.

464 {
466 if (http_trace) {
467 t->PrintTrace0();
468 }
469 delete t;
470 //AddTrace(t);
472 }
void PrintTrace0() const
Definition mhttpd.cxx:413
INT ss_mutex_release(MUTEX_T *mutex)
Definition system.cxx:3229
INT ss_mutex_wait_for(MUTEX_T *mutex, INT timeout)
Definition system.cxx:3109
static int http_trace
Definition mhttpd.cxx:435
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Clear()

void RequestTraceBuf::Clear ( )
inline

Definition at line 474 of file mhttpd.cxx.

475 {
476 // delete all completed requests
477 for (unsigned i=0; i<fBuf.size(); i++) {
478 if (fBuf[i] && fBuf[i]->fCompleted) {
479 delete fBuf[i];
480 fBuf[i] = NULL;
481 }
482 }
483
484 // compact all non-completed requests
485 unsigned k = 0;
486 for (unsigned i=0; i<fBuf.size(); i++) {
487 if (fBuf[i]) {
488 if (fBuf[k] != NULL) {
489 for (; k<i; k++) {
490 if (fBuf[k] == NULL) {
491 break;
492 }
493 }
494 }
495 // if we found an empty spot between "k" and "i" move "i" there
496 // if there is no empty spot, then "i" does not need to be moved
497 if (fBuf[k] == NULL) {
498 fBuf[k] = fBuf[i];
499 fBuf[i] = NULL;
500 }
501 }
502 }
503 }
INT i
Definition mdump.cxx:32
INT k
Definition odbhist.cxx:40
TH1X EXPRT * h1_book(const char *name, const char *title, int bins, double min, double max)
Definition rmidas.h:24
Here is the call graph for this function:

Member Data Documentation

◆ fBuf

std::vector<RequestTrace*> RequestTraceBuf::fBuf

Definition at line 441 of file mhttpd.cxx.

◆ fMutex

MUTEX_T* RequestTraceBuf::fMutex

Definition at line 440 of file mhttpd.cxx.


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