CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
StorageAccount.h
Go to the documentation of this file.
1 #ifndef STORAGE_FACTORY_STORAGE_ACCOUNT_H
2 # define STORAGE_FACTORY_STORAGE_ACCOUNT_H
3 
4 # include <boost/shared_ptr.hpp>
5 # include <stdint.h>
6 # include <string>
7 # include <map>
8 
10 public:
11  struct Counter {
14  double amount;
15  double timeTotal;
16  double timeMin;
17  double timeMax;
18  };
19 
20  class Stamp {
21  public:
23 
24  void tick (double amount = 0.) const;
25  protected:
27  double m_start;
28  };
29 
30  typedef std::map<std::string, Counter> OperationStats;
31  typedef std::map<std::string, boost::shared_ptr<OperationStats> > StorageStats;
32 
33  static const StorageStats& summary(void);
34  static std::string summaryXML(void);
35  static std::string summaryText(bool banner=false);
36  static void fillSummary(std::map<std::string, std::string> &summary);
37  static Counter& counter (const std::string &storageClass,
38  const std::string &operation);
39 };
40 
41 #endif // STORAGE_FACTORY_STORAGE_ACCOUNT_H
static void fillSummary(std::map< std::string, std::string > &summary)
std::map< std::string, Counter > OperationStats
static const StorageStats & summary(void)
std::map< std::string, boost::shared_ptr< OperationStats > > StorageStats
static std::string summaryXML(void)
void tick(double amount=0.) const
unsigned long long uint64_t
Definition: Time.h:15
static Counter & counter(const std::string &storageClass, const std::string &operation)
Stamp(Counter &counter)
static std::string summaryText(bool banner=false)