souffle  2.0.2-371-g6315b36
Public Member Functions | Private Attributes
souffle::profile::Iteration Class Reference

#include <Iteration.h>

Collaboration diagram for souffle::profile::Iteration:
Collaboration graph

Public Member Functions

void addRule (const std::string &ruleKey, std::shared_ptr< Rule > &rule)
 
std::chrono::microseconds getCopytime () const
 
std::chrono::microseconds getEndtime () const
 
const std::string & getLocator () const
 
const std::unordered_map< std::string, std::shared_ptr< Rule > > & getRules () const
 
std::chrono::microseconds getRuntime () const
 
std::chrono::microseconds getStarttime () const
 
 Iteration ()
 
void setCopytime (std::chrono::microseconds copy_time)
 
void setEndtime (std::chrono::microseconds time)
 
void setLocator (std::string locator)
 
void setNumTuples (long numTuples)
 
void setStarttime (std::chrono::microseconds time)
 
size_t size () const
 
std::string toString () const
 

Private Attributes

std::chrono::microseconds copytime {}
 
std::chrono::microseconds endtime {}
 
std::string locator = ""
 
size_t numTuples = 0
 
std::unordered_map< std::string, std::shared_ptr< Rule > > rules
 
std::chrono::microseconds starttime {}
 

Detailed Description

Definition at line 26 of file Iteration.h.

Constructor & Destructor Documentation

◆ Iteration()

souffle::profile::Iteration::Iteration ( )
inline

Definition at line 37 of file Iteration.h.

37 : rules() {}

Member Function Documentation

◆ addRule()

void souffle::profile::Iteration::addRule ( const std::string &  ruleKey,
std::shared_ptr< Rule > &  rule 
)
inline

Definition at line 39 of file Iteration.h.

39  {
40  rules[ruleKey] = rule;
41  }

References rule, and rules.

◆ getCopytime()

std::chrono::microseconds souffle::profile::Iteration::getCopytime ( ) const
inline

Definition at line 79 of file Iteration.h.

79  {
80  return copytime;
81  }

References copytime.

◆ getEndtime()

std::chrono::microseconds souffle::profile::Iteration::getEndtime ( ) const
inline

Definition at line 67 of file Iteration.h.

67  {
68  return endtime;
69  }

References endtime.

◆ getLocator()

const std::string& souffle::profile::Iteration::getLocator ( ) const
inline

Definition at line 95 of file Iteration.h.

95  {
96  return locator;
97  }

References locator.

◆ getRules()

const std::unordered_map<std::string, std::shared_ptr<Rule> >& souffle::profile::Iteration::getRules ( ) const
inline

Definition at line 43 of file Iteration.h.

43  {
44  return rules;
45  }

References rules.

◆ getRuntime()

std::chrono::microseconds souffle::profile::Iteration::getRuntime ( ) const
inline

Definition at line 59 of file Iteration.h.

59  {
60  return endtime - starttime;
61  }

References endtime, and starttime.

Referenced by toString().

◆ getStarttime()

std::chrono::microseconds souffle::profile::Iteration::getStarttime ( ) const
inline

Definition at line 63 of file Iteration.h.

63  {
64  return starttime;
65  }

References starttime.

◆ setCopytime()

void souffle::profile::Iteration::setCopytime ( std::chrono::microseconds  copy_time)
inline

Definition at line 83 of file Iteration.h.

83  {
84  this->copytime = copy_time;
85  }

References copytime.

◆ setEndtime()

void souffle::profile::Iteration::setEndtime ( std::chrono::microseconds  time)
inline

Definition at line 91 of file Iteration.h.

91  {
92  endtime = time;
93  }

References endtime, and souffle::test::time().

Here is the call graph for this function:

◆ setLocator()

void souffle::profile::Iteration::setLocator ( std::string  locator)
inline

Definition at line 99 of file Iteration.h.

99  {
100  this->locator = locator;
101  }

References locator.

◆ setNumTuples()

void souffle::profile::Iteration::setNumTuples ( long  numTuples)
inline

Definition at line 75 of file Iteration.h.

75  {
76  this->numTuples = numTuples;
77  }

References numTuples.

◆ setStarttime()

void souffle::profile::Iteration::setStarttime ( std::chrono::microseconds  time)
inline

Definition at line 87 of file Iteration.h.

87  {
88  starttime = time;
89  }

References starttime, and souffle::test::time().

Here is the call graph for this function:

◆ size()

size_t souffle::profile::Iteration::size ( ) const
inline

Definition at line 71 of file Iteration.h.

71  {
72  return numTuples;
73  }

References numTuples.

◆ toString()

std::string souffle::profile::Iteration::toString ( ) const
inline

Definition at line 47 of file Iteration.h.

47  {
48  std::ostringstream output;
49 
50  output << getRuntime().count() << "," << numTuples << "," << copytime.count() << ",";
51  output << " recRule:";
52  for (auto& rul : rules) {
53  output << rul.second->toString();
54  }
55  output << "\n";
56  return output.str();
57  }

References copytime, getRuntime(), numTuples, rul(), and rules.

Here is the call graph for this function:

Field Documentation

◆ copytime

std::chrono::microseconds souffle::profile::Iteration::copytime {}
private

Definition at line 31 of file Iteration.h.

Referenced by getCopytime(), setCopytime(), and toString().

◆ endtime

std::chrono::microseconds souffle::profile::Iteration::endtime {}
private

Definition at line 29 of file Iteration.h.

Referenced by getEndtime(), getRuntime(), and setEndtime().

◆ locator

std::string souffle::profile::Iteration::locator = ""
private

Definition at line 32 of file Iteration.h.

Referenced by getLocator(), and setLocator().

◆ numTuples

size_t souffle::profile::Iteration::numTuples = 0
private

Definition at line 30 of file Iteration.h.

Referenced by setNumTuples(), size(), and toString().

◆ rules

std::unordered_map<std::string, std::shared_ptr<Rule> > souffle::profile::Iteration::rules
private

Definition at line 34 of file Iteration.h.

Referenced by addRule(), getRules(), and toString().

◆ starttime

std::chrono::microseconds souffle::profile::Iteration::starttime {}
private

Definition at line 28 of file Iteration.h.

Referenced by getRuntime(), getStarttime(), and setStarttime().


The documentation for this class was generated from the following file:
souffle::profile::Iteration::numTuples
size_t numTuples
Definition: Iteration.h:30
souffle::profile::Iteration::rules
std::unordered_map< std::string, std::shared_ptr< Rule > > rules
Definition: Iteration.h:34
souffle::profile::Iteration::locator
std::string locator
Definition: Iteration.h:32
souffle::profile::Iteration::endtime
std::chrono::microseconds endtime
Definition: Iteration.h:29
souffle::profile::Iteration::copytime
std::chrono::microseconds copytime
Definition: Iteration.h:31
souffle::profile::Iteration::starttime
std::chrono::microseconds starttime
Definition: Iteration.h:28
rul
void rul(size_t limit, bool showLimit=true)
Definition: Tui.h:1106
souffle::profile::Iteration::getRuntime
std::chrono::microseconds getRuntime() const
Definition: Iteration.h:59
souffle::test::time
long time(const std::string &name, const Op &operation)
Definition: btree_multiset_test.cpp:411
souffle::ast::DirectiveType::output
@ output
rule
Rule & rule
Definition: Reader.h:85