XRootD
Loading...
Searching...
No Matches
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 }

Referenced by DirState(), find_dir(), find_path(), and get_parent().

Here is the caller graph for this function:

◆ 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()

References DirState(), and parent().

Here is the call graph for this function:

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); }

◆ 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 }

◆ 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 }

References DirState().

Here is the call 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 }

References DirState().

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

Here is the call graph for this function:
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; }

References DirState().

Here is the call 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 }

◆ 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; }

◆ 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 }

◆ 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 }

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