Loading...
Searching...
No Matches
XrdOssStatsDirectory.hh
Go to the documentation of this file.
#ifndef __XRDSTATS_DIRECTORY_H
#define __XRDSTATS_DIRECTORY_H
#include "XrdOuc/XrdOucEnv.hh"
#include "XrdOss/XrdOssWrapper.hh"
#include "XrdOssStatsFileSystem.hh"
#include "XrdSys/XrdSysError.hh"
#include <memory>
namespace XrdOssStats {
class Directory : public XrdOssWrapDF {
public:
Directory(std::unique_ptr<XrdOssDF> ossDF, XrdSysError &log, FileSystem &oss) :
XrdOssWrapDF(*ossDF),
m_wrappedDir(std::move(ossDF)),
m_log(log),
m_oss(oss)
{
}
virtual ~Directory() {}
virtual int
Opendir(const char *path,
XrdOucEnv &env) override
{
FileSystem::OpTimer op(m_oss.m_ops.m_dirlist_ops, m_oss.m_slow_ops.m_dirlist_ops, m_oss.m_times.m_dirlist, m_oss.m_slow_times.m_dirlist, m_oss.m_slow_duration);
return wrapDF.Opendir(path, env);
}
int Readdir(char *buff, int blen) override
{
FileSystem::OpTimer op(m_oss.m_ops.m_dirlist_entries, m_oss.m_slow_ops.m_dirlist_entries, m_oss.m_times.m_dirlist, m_oss.m_slow_times.m_dirlist, m_oss.m_slow_duration);
return wrapDF.Readdir(buff, blen);
}
private:
std::unique_ptr<XrdOssDF> m_wrappedDir;
XrdSysError m_log;
FileSystem &m_oss;
};
} // namespace XrdOssStats
#endif // __XRDSTATS_DIRECTORY_H
XrdOssStatsFileSystem.hh
XrdOssWrapper.hh
XrdOucEnv.hh
XrdSysError.hh
XrdOssStats::Directory::Directory
Directory(std::unique_ptr< XrdOssDF > ossDF, XrdSysError &log, FileSystem &oss)
Definition XrdOssStatsDirectory.hh:16
XrdOssStats::Directory::Opendir
virtual int Opendir(const char *path, XrdOucEnv &env) override
Definition XrdOssStatsDirectory.hh:27
XrdOssStats::Directory::~Directory
virtual ~Directory()
Definition XrdOssStatsDirectory.hh:24
XrdOssStats::Directory::Readdir
int Readdir(char *buff, int blen) override
Definition XrdOssStatsDirectory.hh:34
XrdOssStats::FileSystem
Definition XrdOssStatsFileSystem.hh:22
XrdOssWrapDF::wrapDF
XrdOssDF & wrapDF
Definition XrdOssWrapper.hh:439
XrdOssWrapDF::XrdOssWrapDF
XrdOssWrapDF(XrdOssDF &df2Wrap)
Definition XrdOssWrapper.hh:432
XrdOucEnv
Definition XrdOucEnv.hh:42
XrdSysError
Definition XrdSysError.hh:90
XrdOssStats
Definition XrdOssStatsConfig.hh:8