XRootD
Loading...
Searching...
No Matches
XrdPfc::Stats Class Reference

Statistics of cache utilisation by a File object. More...

#include <XrdPfcStats.hh>

Inheritance diagram for XrdPfc::Stats:
Collaboration diagram for XrdPfc::Stats:

Public Member Functions

 Stats ()=default
 Stats (const Stats &a, const Stats &b)
 Stats (const Stats &s)=default
void AddBytesHit (long long bh)
void AddReadStats (const Stats &s)
void AddUp (const Stats &s)
void AddWriteStats (long long bytes_written, int n_cks_errs)
long long BytesRead () const
long long BytesReadAndWritten () const
void DeltaToReference (const Stats &ref)
void IoAttach ()
void IoDetach (int duration)
Statsoperator= (const Stats &)=default
void Reset ()

Public Attributes

long long m_BytesBypassed = 0
 number of bytes served directly through XrdCl
long long m_BytesHit = 0
 number of bytes served from disk
long long m_BytesMissed = 0
 number of bytes served from remote and cached
long long m_BytesWritten = 0
 number of bytes written to disk
int m_Duration = 0
 total duration of all IOs attached
int m_NCksumErrors = 0
 number of checksum errors while getting data from remote
int m_NumIos = 0
 number of IO objects attached during this access
long long m_StBlocksAdded = 0
 number of 512-byte blocks the file has grown by

Detailed Description

Statistics of cache utilisation by a File object.

Definition at line 34 of file XrdPfcStats.hh.

Constructor & Destructor Documentation

◆ Stats() [1/3]

XrdPfc::Stats::Stats ( )
default

Referenced by XrdPfc::DirStats::DirStats(), Stats(), Stats(), AddReadStats(), AddUp(), DeltaToReference(), and operator=().

Here is the caller graph for this function:

◆ Stats() [2/3]

XrdPfc::Stats::Stats ( const Stats & s)
default

References Stats().

Here is the call graph for this function:

◆ Stats() [3/3]

XrdPfc::Stats::Stats ( const Stats & a,
const Stats & b )
inline

Definition at line 54 of file XrdPfcStats.hh.

54 :
55 m_NumIos (a.m_NumIos + b.m_NumIos),
56 m_Duration (a.m_Duration + b.m_Duration),
57 m_BytesHit (a.m_BytesHit + b.m_BytesHit),
58 m_BytesMissed (a.m_BytesMissed + b.m_BytesMissed),
59 m_BytesBypassed (a.m_BytesBypassed + b.m_BytesBypassed),
60 m_BytesWritten (a.m_BytesWritten + b.m_BytesWritten),
61 m_StBlocksAdded (a.m_StBlocksAdded + b.m_StBlocksAdded),
62 m_NCksumErrors (a.m_NCksumErrors + b.m_NCksumErrors)
63 {}
long long m_BytesMissed
number of bytes served from remote and cached
long long m_StBlocksAdded
number of 512-byte blocks the file has grown by
long long m_BytesBypassed
number of bytes served directly through XrdCl
int m_NCksumErrors
number of checksum errors while getting data from remote
int m_Duration
total duration of all IOs attached
int m_NumIos
number of IO objects attached during this access
long long m_BytesHit
number of bytes served from disk
long long m_BytesWritten
number of bytes written to disk

References Stats(), m_BytesBypassed, m_BytesHit, m_BytesMissed, m_BytesWritten, m_Duration, m_NCksumErrors, m_NumIos, and m_StBlocksAdded.

Here is the call graph for this function:

Member Function Documentation

◆ AddBytesHit()

void XrdPfc::Stats::AddBytesHit ( long long bh)
inline

Definition at line 74 of file XrdPfcStats.hh.

75 {
76 m_BytesHit += bh;
77 }

References m_BytesHit.

◆ AddReadStats()

void XrdPfc::Stats::AddReadStats ( const Stats & s)
inline

Definition at line 67 of file XrdPfcStats.hh.

68 {
69 m_BytesHit += s.m_BytesHit;
70 m_BytesMissed += s.m_BytesMissed;
71 m_BytesBypassed += s.m_BytesBypassed;
72 }

References Stats(), m_BytesBypassed, m_BytesHit, and m_BytesMissed.

Here is the call graph for this function:

◆ AddUp()

void XrdPfc::Stats::AddUp ( const Stats & s)
inline

Definition at line 119 of file XrdPfcStats.hh.

120 {
121 m_NumIos += s.m_NumIos;
122 m_Duration += s.m_Duration;
123 m_BytesHit += s.m_BytesHit;
124 m_BytesMissed += s.m_BytesMissed;
125 m_BytesBypassed += s.m_BytesBypassed;
126 m_BytesWritten += s.m_BytesWritten;
127 m_StBlocksAdded += s.m_StBlocksAdded;
128 m_NCksumErrors += s.m_NCksumErrors;
129 }

References Stats(), m_BytesBypassed, m_BytesHit, m_BytesMissed, m_BytesWritten, m_Duration, m_NCksumErrors, m_NumIos, and m_StBlocksAdded.

Referenced by XrdPfc::DirStats::AddUp(), and XrdPfc::ResourceMonitor::register_file_update_stats().

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

◆ AddWriteStats()

void XrdPfc::Stats::AddWriteStats ( long long bytes_written,
int n_cks_errs )
inline

Definition at line 79 of file XrdPfcStats.hh.

80 {
81 m_BytesWritten += bytes_written;
82 m_NCksumErrors += n_cks_errs;
83 }

References m_BytesWritten, and m_NCksumErrors.

◆ BytesRead()

long long XrdPfc::Stats::BytesRead ( ) const
inline

Definition at line 97 of file XrdPfcStats.hh.

98 {
100 }

References m_BytesBypassed, m_BytesHit, and m_BytesMissed.

Referenced by BytesReadAndWritten().

Here is the caller graph for this function:

◆ BytesReadAndWritten()

long long XrdPfc::Stats::BytesReadAndWritten ( ) const
inline

Definition at line 102 of file XrdPfcStats.hh.

103 {
104 return BytesRead() + m_BytesWritten;
105 }
long long BytesRead() const

References BytesRead(), and m_BytesWritten.

Here is the call graph for this function:

◆ DeltaToReference()

void XrdPfc::Stats::DeltaToReference ( const Stats & ref)
inline

Definition at line 107 of file XrdPfcStats.hh.

108 {
109 m_NumIos = ref.m_NumIos - m_NumIos;
110 m_Duration = ref.m_Duration - m_Duration;
111 m_BytesHit = ref.m_BytesHit - m_BytesHit;
112 m_BytesMissed = ref.m_BytesMissed - m_BytesMissed;
113 m_BytesBypassed = ref.m_BytesBypassed - m_BytesBypassed;
114 m_BytesWritten = ref.m_BytesWritten - m_BytesWritten;
115 m_StBlocksAdded = ref.m_StBlocksAdded - m_StBlocksAdded;
116 m_NCksumErrors = ref.m_NCksumErrors - m_NCksumErrors;
117 }

References Stats(), m_BytesBypassed, m_BytesHit, m_BytesMissed, m_BytesWritten, m_Duration, m_NCksumErrors, m_NumIos, and m_StBlocksAdded.

Referenced by XrdPfc::DirStats::DeltaToReference().

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

◆ IoAttach()

void XrdPfc::Stats::IoAttach ( )
inline

Definition at line 85 of file XrdPfcStats.hh.

86 {
87 ++m_NumIos;
88 }

References m_NumIos.

◆ IoDetach()

void XrdPfc::Stats::IoDetach ( int duration)
inline

Definition at line 90 of file XrdPfcStats.hh.

91 {
92 m_Duration += duration;
93 }

References m_Duration.

◆ operator=()

Stats & XrdPfc::Stats::operator= ( const Stats & )
default

References Stats().

Here is the call graph for this function:

◆ Reset()

void XrdPfc::Stats::Reset ( )
inline

Definition at line 131 of file XrdPfcStats.hh.

132 {
133 m_NumIos = 0;
134 m_Duration = 0;
135 m_BytesHit = 0;
136 m_BytesMissed = 0;
137 m_BytesBypassed = 0;
138 m_BytesWritten = 0;
139 m_StBlocksAdded = 0;
140 m_NCksumErrors = 0;
141 }

References m_BytesBypassed, m_BytesHit, m_BytesMissed, m_BytesWritten, m_Duration, m_NCksumErrors, m_NumIos, and m_StBlocksAdded.

Referenced by XrdPfc::DirStats::Reset().

Here is the caller graph for this function:

Member Data Documentation

◆ m_BytesBypassed

long long XrdPfc::Stats::m_BytesBypassed = 0

number of bytes served directly through XrdCl

Definition at line 41 of file XrdPfcStats.hh.

Referenced by Stats(), AddReadStats(), AddUp(), BytesRead(), DeltaToReference(), Reset(), and XrdPfc::Info::WriteIOStat().

◆ m_BytesHit

long long XrdPfc::Stats::m_BytesHit = 0

number of bytes served from disk

Definition at line 39 of file XrdPfcStats.hh.

Referenced by Stats(), AddBytesHit(), AddReadStats(), AddUp(), BytesRead(), DeltaToReference(), Reset(), and XrdPfc::Info::WriteIOStat().

◆ m_BytesMissed

long long XrdPfc::Stats::m_BytesMissed = 0

number of bytes served from remote and cached

Definition at line 40 of file XrdPfcStats.hh.

Referenced by Stats(), AddReadStats(), AddUp(), BytesRead(), DeltaToReference(), Reset(), and XrdPfc::Info::WriteIOStat().

◆ m_BytesWritten

long long XrdPfc::Stats::m_BytesWritten = 0

number of bytes written to disk

Definition at line 42 of file XrdPfcStats.hh.

Referenced by Stats(), AddUp(), AddWriteStats(), BytesReadAndWritten(), DeltaToReference(), XrdPfc::Cache::ExecuteCommandUrl(), and Reset().

◆ m_Duration

int XrdPfc::Stats::m_Duration = 0

total duration of all IOs attached

Definition at line 38 of file XrdPfcStats.hh.

Referenced by Stats(), AddUp(), DeltaToReference(), IoDetach(), Reset(), and XrdPfc::Info::WriteIOStat().

◆ m_NCksumErrors

int XrdPfc::Stats::m_NCksumErrors = 0

number of checksum errors while getting data from remote

Definition at line 44 of file XrdPfcStats.hh.

Referenced by Stats(), AddUp(), AddWriteStats(), DeltaToReference(), and Reset().

◆ m_NumIos

int XrdPfc::Stats::m_NumIos = 0

number of IO objects attached during this access

Definition at line 37 of file XrdPfcStats.hh.

Referenced by Stats(), AddUp(), DeltaToReference(), IoAttach(), Reset(), and XrdPfc::Info::WriteIOStat().

◆ m_StBlocksAdded

long long XrdPfc::Stats::m_StBlocksAdded = 0

number of 512-byte blocks the file has grown by

Definition at line 43 of file XrdPfcStats.hh.

Referenced by Stats(), AddUp(), DeltaToReference(), XrdPfc::Cache::ExecuteCommandUrl(), Reset(), and XrdPfc::DirUsage::update_from_stats().


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