version 1.5, 2004/06/10 00:05:28
|
version 1.7, 2004/08/12 10:47:43
|
|
|
// | // |
// Author: Arthur Pichlkostner | // Author: Arthur Pichlkostner |
// (checked in: Markus Mueller sedgewick_de@yahoo.de) | // (checked in: Markus Mueller sedgewick_de@yahoo.de) |
|
// Modified By: Amit K Arora, IBM (amita@in.ibm.com) for Bug#1090 |
// | // |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
|
|
| |
StatisticalData::StatisticalData(){ | StatisticalData::StatisticalData(){ |
| |
|
|
|
copyGSD = 0; |
|
|
for (unsigned int i=0; i<StatisticalData::length; i++){ | for (unsigned int i=0; i<StatisticalData::length; i++){ |
numCalls[i] = 0; | numCalls[i] = 0; |
cimomTime[i] = 0; | cimomTime[i] = 0; |
|
|
} | } |
| |
void StatisticalData::addToValue(Sint64 value, Uint16 type, Uint32 t){ | void StatisticalData::addToValue(Sint64 value, Uint16 type, Uint32 t){ |
_mutex.lock( pegasus_thread_self() ); |
AutoMutex autoMut(_mutex); |
switch(t){ | switch(t){ |
case SERVER: numCalls[type] += 1; | case SERVER: numCalls[type] += 1; |
cimomTime[type] += value; | cimomTime[type] += value; |
|
|
case BYTES_READ: requestSize[type] += value; | case BYTES_READ: requestSize[type] += value; |
break; | break; |
} | } |
_mutex.unlock(); |
|
} | } |
| |
|
void StatisticalData::setCopyGSD(Boolean flag) |
|
{ |
|
|
|
copyGSD = flag; |
|
} |
| |
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |