XRootD
XrdPfc::DirState Class Reference
+ Collaboration diagram for XrdPfc::DirState:

Public Member Functions

 DirState (DirState *parent)
 
 DirState (int max_depth)
 
void add_up_stats (const Stats &stats)
 
void add_usage_purged (long long up)
 
void dump_recursively (const char *name)
 
DirStatefind_dir (const std::string &dir, bool create_subdirs)
 
DirStatefind_path (const std::string &path, int max_depth, bool parse_as_lfn, bool create_subdirs)
 
DirStateget_parent ()
 
void reset_stats ()
 
void set_usage (long long u)
 
void upward_propagate_stats ()
 
long long upward_propagate_usage_purged ()
 

Detailed Description

Definition at line 31 of file XrdPfcPurge.cc.

Constructor & Destructor Documentation

◆ DirState() [1/2]

XrdPfc::DirState::DirState ( int  max_depth)
inline

Definition at line 91 of file XrdPfcPurge.cc.

91  : m_parent(0), m_depth(0), m_max_depth(max_depth)
92  {
93  init();
94  }

◆ DirState() [2/2]

XrdPfc::DirState::DirState ( DirState parent)
inline

Definition at line 96 of file XrdPfcPurge.cc.

96  : m_parent(parent), m_depth(m_parent->m_depth + 1), m_max_depth(m_parent->m_max_depth)
97  {
98  init();
99  }
static void parent()

Member Function Documentation

◆ add_up_stats()

void XrdPfc::DirState::add_up_stats ( const Stats stats)
inline

Definition at line 104 of file XrdPfcPurge.cc.

104 { m_stats.AddUp(stats); }
void AddUp(const Stats &s)
Definition: XrdPfcStats.hh:118

References XrdPfc::Stats::AddUp().

+ Here is the call graph for this function:

◆ add_usage_purged()

void XrdPfc::DirState::add_usage_purged ( long long  up)
inline

Definition at line 105 of file XrdPfcPurge.cc.

105 { m_usage_purged += up; }

◆ dump_recursively()

void XrdPfc::DirState::dump_recursively ( const char *  name)
inline

Definition at line 160 of file XrdPfcPurge.cc.

161  {
162  printf("%*d %s usage=%lld usage_extra=%lld usage_total=%lld num_ios=%d duration=%d b_hit=%lld b_miss=%lld b_byps=%lld b_wrtn=%lld\n",
163  2 + 2*m_depth, m_depth, name, m_usage, m_usage_extra, m_usage + m_usage_extra,
164  m_stats.m_NumIos, m_stats.m_Duration, m_stats.m_BytesHit, m_stats.m_BytesMissed, m_stats.m_BytesBypassed, m_stats.m_BytesWritten);
165 
166  for (DsMap_i i = m_subdirs.begin(); i != m_subdirs.end(); ++i)
167  {
168  i->second.dump_recursively(i->first.c_str());
169  }
170  }
long long m_BytesMissed
number of bytes served from remote and cached
Definition: XrdPfcStats.hh:36
long long m_BytesBypassed
number of bytes served directly through XrdCl
Definition: XrdPfcStats.hh:37
int m_Duration
total duration of all IOs attached
Definition: XrdPfcStats.hh:34
int m_NumIos
number of IO objects attached during this access
Definition: XrdPfcStats.hh:33
long long m_BytesHit
number of bytes served from disk
Definition: XrdPfcStats.hh:35
long long m_BytesWritten
number of bytes written to disk
Definition: XrdPfcStats.hh:38

References XrdPfc::Stats::m_BytesBypassed, XrdPfc::Stats::m_BytesHit, XrdPfc::Stats::m_BytesMissed, XrdPfc::Stats::m_BytesWritten, XrdPfc::Stats::m_Duration, and XrdPfc::Stats::m_NumIos.

Referenced by XrdPfc::DataFsState::dump_recursively().

+ Here is the caller graph for this function:

◆ find_dir()

DirState* XrdPfc::DirState::find_dir ( const std::string &  dir,
bool  create_subdirs 
)
inline

Definition at line 114 of file XrdPfcPurge.cc.

115  {
116  DsMap_i i = m_subdirs.find(dir);
117 
118  if (i != m_subdirs.end()) return & i->second;
119 
120  if (create_subdirs && m_depth < m_max_depth) return create_child(dir);
121 
122  return 0;
123  }

Referenced by XrdPfc::FPurgeState::cd_down().

+ Here is the caller graph for this function:

◆ find_path()

DirState* XrdPfc::DirState::find_path ( const std::string &  path,
int  max_depth,
bool  parse_as_lfn,
bool  create_subdirs 
)
inline

Definition at line 107 of file XrdPfcPurge.cc.

108  {
109  PathTokenizer pt(path, max_depth, parse_as_lfn);
110 
111  return find_path_tok(pt, 0, create_subdirs);
112  }

Referenced by XrdPfc::DataFsState::find_dirstate_for_lfn().

+ Here is the caller graph for this function:

◆ get_parent()

DirState* XrdPfc::DirState::get_parent ( )
inline

Definition at line 101 of file XrdPfcPurge.cc.

101 { return m_parent; }

Referenced by XrdPfc::FPurgeState::cd_up().

+ Here is the caller graph for this function:

◆ reset_stats()

void XrdPfc::DirState::reset_stats ( )
inline

Definition at line 125 of file XrdPfcPurge.cc.

126  {
127  m_stats.Reset();
128 
129  for (DsMap_i i = m_subdirs.begin(); i != m_subdirs.end(); ++i)
130  {
131  i->second.reset_stats();
132  }
133  }

References XrdPfc::Stats::Reset().

Referenced by XrdPfc::DataFsState::reset_stats().

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

◆ set_usage()

void XrdPfc::DirState::set_usage ( long long  u)
inline

Definition at line 103 of file XrdPfcPurge.cc.

103 { m_usage = u; m_usage_extra = 0; }

Referenced by XrdPfc::FPurgeState::cd_up(), and XrdPfc::FPurgeState::end_traversal().

+ Here is the caller graph for this function:

◆ upward_propagate_stats()

void XrdPfc::DirState::upward_propagate_stats ( )
inline

Definition at line 135 of file XrdPfcPurge.cc.

136  {
137  for (DsMap_i i = m_subdirs.begin(); i != m_subdirs.end(); ++i)
138  {
139  i->second.upward_propagate_stats();
140 
141  m_stats.AddUp(i->second.m_stats);
142  }
143 
144  m_usage_extra += m_stats.m_BytesWritten;
145  }

References XrdPfc::Stats::AddUp(), and XrdPfc::Stats::m_BytesWritten.

Referenced by XrdPfc::DataFsState::upward_propagate_stats().

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

◆ upward_propagate_usage_purged()

long long XrdPfc::DirState::upward_propagate_usage_purged ( )
inline

Definition at line 147 of file XrdPfcPurge.cc.

148  {
149  for (DsMap_i i = m_subdirs.begin(); i != m_subdirs.end(); ++i)
150  {
151  m_usage_purged += i->second.upward_propagate_usage_purged();
152  }
153  m_usage -= m_usage_purged;
154 
155  long long ret = m_usage_purged;
156  m_usage_purged = 0;
157  return ret;
158  }

Referenced by XrdPfc::DataFsState::upward_propagate_usage_purged().

+ Here is the caller graph for this function:

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