 |
|
 |
|
| Files: |
1 |
|
Branches Taken: |
0.0% |
0 / 0 |
| Generated: |
2009-05-17 22:47 |
|
Branches Executed: |
0.0% |
0 / 0 |
| |
|
Line Coverage: |
100.0% |
5 / 5 |
| |
 |
|
 |
1 : //===- Statistic.h - Cross project integer statistics -----------*- C++ -*-===//
2 :
3 : #ifndef KLEE_STATISTIC_H
4 : #define KLEE_STATISTIC_H
5 :
6 : #include <string>
7 :
8 : namespace klee {
9 : class Statistic;
10 : class StatisticManager;
11 : class StatisticRecord;
12 :
13 : /// Statistic - A named statistic instance.
14 : ///
15 : /// The Statistic class holds information about the statistic, but
16 : /// not the actual values. Values are managed by the global
17 : /// StatisticManager to enable transparent support for instruction
18 : /// level and call path level statistics.
19 : class Statistic {
20 : friend class StatisticManager;
21 : friend class StatisticRecord;
22 :
23 : private:
24 : unsigned id;
25 : const std::string name;
26 : const std::string shortName;
27 :
28 : public:
29 : Statistic(const std::string &_name,
30 : const std::string &_shortName);
31 : ~Statistic();
32 :
33 : /// getID - Get the unique statistic ID.
34 210: unsigned getID() { return id; }
35 :
36 : /// getName - Get the statistic name.
37 40574: const std::string &getName() const { return name; }
38 :
39 : /// getShortName - Get the "short" statistic name, used in
40 : /// callgrind output for example.
41 2730: const std::string &getShortName() const { return shortName; }
42 :
43 : /// getValue - Get the current primary statistic value.
44 : uint64_t getValue() const;
45 :
46 : /// operator uint64_t - Get the current primary statistic value.
47 20100912: operator uint64_t () const { return getValue(); }
48 :
49 : /// operator++ - Increment the statistic by 1.
50 11319505: Statistic &operator ++() { return (*this += 1); }
51 :
52 : /// operator+= - Increment the statistic by \arg addend.
53 : Statistic &operator +=(const uint64_t addend);
54 : };
55 : }
56 :
57 : #endif
58 :
Generated: 2009-05-17 22:47 by zcov