CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes
StorageAccount::Stamp Class Reference

#include <StorageAccount.h>

Public Member Functions

 Stamp (Counter &counter)
 
void tick (uint64_t amount=0, int64_t tick=0) const
 

Protected Attributes

Counterm_counter
 
std::chrono::time_point< std::chrono::high_resolution_clock > m_start
 

Detailed Description

Definition at line 93 of file StorageAccount.h.

Constructor & Destructor Documentation

◆ Stamp()

StorageAccount::Stamp::Stamp ( Counter counter)

Member Function Documentation

◆ tick()

void StorageAccount::Stamp::tick ( uint64_t  amount = 0,
int64_t  tick = 0 
) const

Definition at line 108 of file StorageAccount.cc.

108  {
110  uint64_t elapsed = elapsed_ns.count();
112 
115  m_counter.amount += amount;
116  Counter::addTo(m_counter.amount_square, amount * amount);
117 
119  if (elapsed < m_counter.timeMin || m_counter.successes == 1)
120  m_counter.timeMin = elapsed;
121  if (elapsed > m_counter.timeMax)
122  m_counter.timeMax = elapsed;
123 }

References StorageAccount::Counter::addTo(), KineDebug3::count(), and fileCollector::now.

Referenced by TStorageFactoryFile::ReadBuffer(), TStorageFactoryFile::ReadBuffers(), TStorageFactoryFile::ReadBuffersSync(), and TStorageFactoryFile::WriteBuffer().

Member Data Documentation

◆ m_counter

Counter& StorageAccount::Stamp::m_counter
protected

Definition at line 100 of file StorageAccount.h.

Referenced by Stamp().

◆ m_start

std::chrono::time_point<std::chrono::high_resolution_clock> StorageAccount::Stamp::m_start
protected

Definition at line 101 of file StorageAccount.h.

counter
Definition: counter.py:1
cond::time::nanoseconds
boost::date_time::subsecond_duration< boost::posix_time::time_duration, 1000000000 > nanoseconds
Definition: TimeConversions.h:16
StorageAccount::Counter::timeTotal
std::atomic< double > timeTotal
Definition: StorageAccount.h:80
StorageAccount::Counter::amount
std::atomic< uint64_t > amount
Definition: StorageAccount.h:74
StorageAccount::Counter::timeMax
std::atomic< double > timeMax
Definition: StorageAccount.h:82
StorageAccount::Counter::vector_square
std::atomic< int64_t > vector_square
Definition: StorageAccount.h:79
fileCollector.now
now
Definition: fileCollector.py:207
StorageAccount::Counter::successes
std::atomic< uint64_t > successes
Definition: StorageAccount.h:73
StorageAccount::Stamp::m_start
std::chrono::time_point< std::chrono::high_resolution_clock > m_start
Definition: StorageAccount.h:101
StorageAccount::Counter::vector_count
std::atomic< int64_t > vector_count
Definition: StorageAccount.h:78
StorageAccount::Counter::attempts
std::atomic< uint64_t > attempts
Definition: StorageAccount.h:72
KineDebug3::count
void count()
Definition: KinematicConstrainedVertexUpdatorT.h:21
StorageAccount::Counter::addTo
static void addTo(std::atomic< double > &iAtomic, double iToAdd)
Definition: StorageAccount.h:84
StorageAccount::Counter::amount_square
std::atomic< double > amount_square
Definition: StorageAccount.h:77
StorageAccount::Counter::timeMin
std::atomic< double > timeMin
Definition: StorageAccount.h:81
cond::uint64_t
unsigned long long uint64_t
Definition: Time.h:13
StorageAccount::Stamp::m_counter
Counter & m_counter
Definition: StorageAccount.h:100