XRootD
XrdPfcDirStateSnapshot.hh
Go to the documentation of this file.
1 #ifndef __XRDPFC_DIRSTATESNAPSHOT_HH__
2 #define __XRDPFC_DIRSTATESNAPSHOT_HH__
3 
4 #include "XrdPfcDirState.hh"
5 
6 #include <vector>
7 
8 class XrdOss;
9 
10 
11 //==============================================================================
12 // Structs for DirState export in vector form
13 //==============================================================================
14 
15 namespace XrdPfc
16 {
17 
19 {
22  long long m_st_blocks_fuzz = 0;
23 
24  int m_parent = -1;
26 
28  DirStateElement(const DirState &b, int parent) :
29  DirStateBase(b),
30  m_stats(b.m_sshot_stats),
31  m_usage(b.m_here_usage, b.m_recursive_subdir_usage),
32  m_st_blocks_fuzz(b.m_StBlocksFuzz + b.m_RecursiveStBlocksFuzz),
34  {}
35 };
36 
38 {
39  std::vector<DirStateElement> m_dir_states;
41  long long m_st_blocks_fuzz = 0;
42 
44  DataFsSnapshot(const DataFsStateBase &b, time_t sshot_stats_reset_time) :
45  DataFsStateBase(b),
46  m_sshot_stats_reset_time(sshot_stats_reset_time)
47  {}
48 
49  // Import of data into vector form is implemented in ResourceMonitor
50  // in order to avoid dependence of this struct on DirState.
51 
52  void write_json_file(const std::string &fname, XrdOss& oss, bool include_preamble);
53  void dump();
54 };
55 
56 }
57 
58 #endif
static void parent()
Definition: XrdPfc.hh:44
DataFsSnapshot(const DataFsStateBase &b, time_t sshot_stats_reset_time)
void write_json_file(const std::string &fname, XrdOss &oss, bool include_preamble)
std::vector< DirStateElement > m_dir_states
long long m_st_blocks_fuzz
DataFsState::m_st_blocks_fuzz.
long long m_st_blocks_fuzz
subtree total, see DirState::m_StBlocksFuzz
DirStateElement(const DirState &b, int parent)