Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
33 lines (25 sloc) 514 Bytes
#include <istat/IRecorder.h>
#include <istat/Atomic.h>
using namespace istat;
void RecordStat::record(int64_t value)
{
atomic_add(&stat_, value);
}
RecordStats::RecordStats()
{
statHit = &nHits;
statMiss = &nMisses;
}
RecordStats::RecordStats(RecordStats const &rs)
{
(Stats &)*this = rs;
statHit = &nHits;
statMiss = &nMisses;
}
RecordStats &RecordStats::operator=(RecordStats const &rs)
{
(Stats &)*this = rs;
statHit = &nHits;
statMiss = &nMisses;
return *this;
}
Something went wrong with that request. Please try again.