19 #ifndef EQ_STATISTICSAMPLER_H
20 #define EQ_STATISTICSAMPLER_H
22 #include <eq/client/configEvent.h>
45 const uint32_t frameNumber = LB_UNDEFINED_UINT32 )
49 LBASSERT( owner->getID() != 0 );
50 LBASSERT( owner->getSerial() != CO_INSTANCE_INVALID );
51 event.data.type = Event::STATISTIC;
52 event.data.serial = owner->getSerial();
53 event.data.originator = owner->getID();
54 event.data.statistic.type = type;
55 event.data.statistic.frameNumber = frameNumber;
56 event.data.statistic.resourceName[0] =
'\0';
57 event.data.statistic.startTime = 0;
58 event.data.statistic.endTime = 0;
60 if( event.data.statistic.frameNumber == LB_UNDEFINED_UINT32 )
61 event.data.statistic.frameNumber = owner->getCurrentFrame();
67 LBASSERTINFO( event.data.statistic.startTime <=
68 event.data.statistic.endTime, event.data.statistic );
79 #endif // EQ_STATISTICSAMPLER_H
Utility to sample an statistics event.
virtual ~StatisticSampler()
Destruct and finish statistics sampling.
StatisticSampler(const Statistic::Type type, Owner *owner, const uint32_t frameNumber=LB_UNDEFINED_UINT32)
Construct a new statistics sampler.
ConfigEvent event
The statistics event.