Skip to content

Commit

Permalink
Add getters for XrdFileCachePrint.
Browse files Browse the repository at this point in the history
  • Loading branch information
alja committed Mar 31, 2015
1 parent 92a68d9 commit 2617650
Showing 1 changed file with 27 additions and 9 deletions.
36 changes: 27 additions & 9 deletions src/XrdFileCache/XrdFileCacheInfo.hh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@ namespace XrdFileCache
static unsigned char cfiBIT(int n) { return 1 << n; }

public:
// !Access statistics
struct AStat
{
time_t DetachTime; //! close time
long long BytesDisk; //! read from disk
long long BytesRam; //! read from ram
long long BytesMissed; //! read remote client
};

//------------------------------------------------------------------------
//! Constructor.
//------------------------------------------------------------------------
Expand All @@ -62,9 +71,14 @@ namespace XrdFileCache
//!
//! @param i block index
//---------------------------------------------------------------------
void SetBitWriteCalled(int i);
void SetBitFetched(int i);

//! \brief Mark block as disk written
//!
//! @param i block index
//---------------------------------------------------------------------
void SetBitWriteCalled(int i);

//---------------------------------------------------------------------
//! \brief Reserve buffer for fileSize/bufferSize bytes
//!
Expand Down Expand Up @@ -141,22 +155,26 @@ namespace XrdFileCache
//---------------------------------------------------------------------
void CheckComplete();

//---------------------------------------------------------------------
//! Get number of accesses
//---------------------------------------------------------------------
int GetAccessCnt() { return m_accessCnt; }

//---------------------------------------------------------------------
//! Get version
//---------------------------------------------------------------------
int GetVersion() { return m_version; }


const static char* m_infoExtension;

private:
protected:

XrdCl::Log* clLog() const { return XrdCl::DefaultEnv::GetLog(); }

//---------------------------------------------------------------------
//! Cache statistics and time of access.
//---------------------------------------------------------------------
struct AStat
{
time_t DetachTime;
long long BytesDisk;
long long BytesRam;
long long BytesMissed;
};

int m_version; //!< info version
long long m_bufferSize; //!< prefetch buffer size
Expand Down

0 comments on commit 2617650

Please sign in to comment.