version 1.9, 2004/06/10 00:05:28
|
version 1.10, 2004/06/29 16:12:34
|
|
|
#define STATISTICAL_DATA_H | #define STATISTICAL_DATA_H |
| |
#include <Pegasus/Common/Config.h> | #include <Pegasus/Common/Config.h> |
#include <iostream> |
#include <iostream.h> |
#include <cstring> | #include <cstring> |
#include <Pegasus/Common/InternalException.h> | #include <Pegasus/Common/InternalException.h> |
#include <Pegasus/Common/IPC.h> | #include <Pegasus/Common/IPC.h> |
|
|
| |
#define STAT_SERVEREND \ | #define STAT_SERVEREND \ |
response->endServer();\ | response->endServer();\ |
Uint32 statType = (response->getType() >= CIM_GET_CLASS_RESPONSE_MESSAGE)? \ |
Uint16 statType = (response->getType() >= CIM_GET_CLASS_RESPONSE_MESSAGE)? \ |
response->getType() - CIM_GET_CLASS_RESPONSE_MESSAGE:response->getType() - 1;\ | response->getType() - CIM_GET_CLASS_RESPONSE_MESSAGE:response->getType() - 1;\ |
StatisticalData::current()->addToValue(message.size(), statType, StatisticalData::BYTES_SENT); | StatisticalData::current()->addToValue(message.size(), statType, StatisticalData::BYTES_SENT); |
| |
|
|
|
|
#define STAT_SERVEREND_ERROR \ | #define STAT_SERVEREND_ERROR \ |
response->endServer(); | response->endServer(); |
| |
|
|
the current state of the object, not the pevious (one command ago) state */ | the current state of the object, not the pevious (one command ago) state */ |
| |
#define STAT_BYTESREAD \ | #define STAT_BYTESREAD \ |
Uint32 statType = (request->getType() >= CIM_GET_CLASS_RESPONSE_MESSAGE)? \ |
Uint16 statType = (request->getType() >= CIM_GET_CLASS_RESPONSE_MESSAGE)? \ |
request->getType() - CIM_GET_CLASS_RESPONSE_MESSAGE: request->getType()-1;\ | request->getType() - CIM_GET_CLASS_RESPONSE_MESSAGE: request->getType()-1;\ |
StatisticalData::current()->requSize = contentLength; |
StatisticalData::current()->requSize = contentLength; \ |
|
StatisticalData::current()->addToValue(contentLength, statType, StatisticalData::BYTES_READ); |
|
|
|
|
| |
| |
| |
|
|
Sint64 responseSize[NUMBER_OF_TYPES]; | Sint64 responseSize[NUMBER_OF_TYPES]; |
Sint64 requestSize[NUMBER_OF_TYPES]; | Sint64 requestSize[NUMBER_OF_TYPES]; |
Sint64 requSize; //tempory storage for requestSize vlaue | Sint64 requSize; //tempory storage for requestSize vlaue |
|
Boolean copyGSD; |
|
// Uint64 totalServTime; |
static StatisticalData* cur; | static StatisticalData* cur; |
void addToValue(Sint64 value, Uint16 type, Uint32 t); | void addToValue(Sint64 value, Uint16 type, Uint32 t); |
static String requestName[]; | static String requestName[]; |
|
void setCopyGSD(Boolean flag); |
| |
protected: | protected: |
Mutex _mutex; | Mutex _mutex; |