klee
klee::Statistic Class Referencefinal

#include <Statistic.h>

Public Member Functions

 Statistic (const std::string &name, const std::string &shortName)
 
 ~Statistic ()=default
 
std::uint32_t getID () const
 getID - Get the unique statistic ID. More...
 
const std::string & getName () const
 getName - Get the statistic name. More...
 
const std::string & getShortName () const
 
std::uint64_t getValue () const
 getValue - Get the current primary statistic value. More...
 
 operator std::uint64_t () const
 operator std::uint64_t - Get the current primary statistic value. More...
 
Statisticoperator++ ()
 operator++ - Increment the statistic by 1. More...
 
Statisticoperator+= (std::uint64_t addend)
 operator+= - Increment the statistic by More...
 

Private Attributes

std::uint32_t id
 
const std::string name
 
const std::string shortName
 

Friends

class StatisticManager
 
class StatisticRecord
 

Detailed Description

Statistic - A named statistic instance.

The Statistic class holds information about the statistic, but not the actual values. Values are managed by the global StatisticManager to enable transparent support for instruction level and call path level statistics.

Definition at line 26 of file Statistic.h.

Constructor & Destructor Documentation

◆ Statistic()

Statistic::Statistic ( const std::string &  name,
const std::string &  shortName 
)

Definition at line 67 of file Statistics.cpp.

References getStatisticManager(), and klee::StatisticManager::registerStatistic().

Here is the call graph for this function:

◆ ~Statistic()

klee::Statistic::~Statistic ( )
default

Member Function Documentation

◆ getID()

std::uint32_t klee::Statistic::getID ( ) const
inline

getID - Get the unique statistic ID.

Definition at line 40 of file Statistic.h.

References id.

Referenced by klee::StatsTracker::writeIStats().

Here is the caller graph for this function:

◆ getName()

const std::string & klee::Statistic::getName ( ) const
inline

getName - Get the statistic name.

Definition at line 43 of file Statistic.h.

References name.

Referenced by klee::StatsTracker::writeIStats().

Here is the caller graph for this function:

◆ getShortName()

const std::string & klee::Statistic::getShortName ( ) const
inline

getShortName - Get the "short" statistic name, used in callgrind output for example.

Definition at line 47 of file Statistic.h.

References shortName.

Referenced by klee::StatsTracker::writeIStats().

Here is the caller graph for this function:

◆ getValue()

std::uint64_t Statistic::getValue ( ) const

getValue - Get the current primary statistic value.

Definition at line 77 of file Statistics.cpp.

References klee::StatisticManager::getValue(), and klee::theStatisticManager.

Referenced by operator std::uint64_t(), QueryLoggingSolver::startQuery(), and klee::StatsTracker::stepInstruction().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator std::uint64_t()

klee::Statistic::operator std::uint64_t ( ) const
inline

operator std::uint64_t - Get the current primary statistic value.

Definition at line 53 of file Statistic.h.

References getValue().

Here is the call graph for this function:

◆ operator++()

Statistic & klee::Statistic::operator++ ( )
inline

operator++ - Increment the statistic by 1.

Definition at line 56 of file Statistic.h.

◆ operator+=()

Statistic & Statistic::operator+= ( std::uint64_t  addend)

operator+= - Increment the statistic by

  • addend.

Definition at line 72 of file Statistics.cpp.

References klee::StatisticManager::incrementStatistic(), and klee::theStatisticManager.

Here is the call graph for this function:

Friends And Related Function Documentation

◆ StatisticManager

friend class StatisticManager
friend

Definition at line 27 of file Statistic.h.

◆ StatisticRecord

friend class StatisticRecord
friend

Definition at line 28 of file Statistic.h.

Member Data Documentation

◆ id

◆ name

const std::string klee::Statistic::name
private

Definition at line 32 of file Statistic.h.

Referenced by getName().

◆ shortName

const std::string klee::Statistic::shortName
private

Definition at line 33 of file Statistic.h.

Referenced by getShortName().


The documentation for this class was generated from the following files: