1 #ifndef NETCACHE__NC_STAT__HPP
2 #define NETCACHE__NC_STAT__HPP
40 bool operator() (
const char* left,
const char* right)
const;
Mutex created to have minimum possible size (its size is 4 bytes) and to sleep using kernel capabilit...
Class collecting statistics about NetCache server.
static bool AddUnknownServer(Uint8 srv_id)
void x_CopyStartState(CNCStat *src_stat)
static void AddSyncServer(Uint8 srv_id)
static Uint4 GetCntRunningCmds(void)
static void CmdFinished(const char *cmd, Uint8 len_usec, int status)
vector< TSrvTimeTerm > m_ClRdLenBySize
TCmdCountsMap m_CmdsByName
static CSrvRef< CNCStat > GetStat(const string &stat_type, bool is_prev)
static void ConnClosing(Uint8 cnt_cmds)
CNCStat & operator=(const CNCStat &)
void x_CopyEndState(CNCStat *src_stat)
CSrvStatTerm< Uint8 > m_CntKeys
CSrvStatTerm< Uint4 > m_CntFiles
void AddAllStats(CNCStat *src_stat)
static void DiskDataWrite(size_t data_size)
static void SaveCurStateStat(const SNCStateStat &state)
static void PeerSyncFinished(Uint8 srv_id, Uint2 slot, Uint8 cnt_ops, bool success)
CSrvStatTerm< Uint8 > m_MirrorQSize
map< const char *, TSrvTimeTerm, SConstCharCompare > TCmdLensMap
CSrvStatTerm< size_t > m_WBReleasing
void PrintToLogs(CTempString stat_name)
CSrvStatTerm< Uint4 > m_CheckedRecs
vector< Uint8 > m_DiskWrBySize
void InitStartState(void)
map< const char *, Uint8, SConstCharCompare > TCmdCountsMap
CSrvStatTerm< int > m_MirrorActiveConns
CSrvStatTerm< size_t > m_WBReleasable
CSrvStatTerm< Uint4 > m_MovedSize
SNCStateStat m_StartState
static void DiskBlobWrite(Uint8 blob_size)
static void ClientDataRead(size_t data_size)
static void PeerDataWrite(size_t data_size)
static void CmdStarted(const char *cmd)
static void ClientBlobRollback(Uint8 written_size)
CSrvStatTerm< Uint8 > m_ConnCmds
void PrintState(CSrvSocketTask &sock)
void TransferEndState(CNCStat *src_stat)
static void InitialSyncDone(Uint8 srv_id, bool succeeded)
CSrvStatTerm< int > m_MirrorBGConns
static void DumpAllStats(void)
static void ClientBlobWrite(Uint8 blob_size, Uint8 len_usec)
void x_AddStats(CNCStat *src_stat)
CSrvStatTerm< Uint8 > m_SyncLogSize
void x_SaveEndState(void)
static void DBFileCleaned(bool success, Uint4 seen_recs, Uint4 moved_recs, Uint4 moved_size)
void PrintToSocket(CSrvSocketTask *sock)
void x_PrintUnstructured(CSrvPrintProxy &proxy)
static void PeerDataRead(size_t data_size)
CSrvStatTerm< Uint8 > m_CntBlobs
static void CollectThreads(CNCStat *dst_stat, bool need_clear)
vector< TSrvTimeTerm > m_ClWrLenBySize
static void ClientBlobRead(Uint8 blob_size, Uint8 len_usec)
unique_ptr< CSrvStat > m_SrvStat
map< int, TCmdLensMap > TStatusCmdLens
static void ClientDataWrite(size_t data_size)
CSrvStatTerm< Uint4 > m_MovedRecs
CSrvStatTerm< size_t > m_WBMemSize
static void Initialize(void)
static void DiskDataRead(size_t data_size)
CSrvStatTerm< Uint8 > m_GarbageSize
CSrvStatTerm< Uint8 > m_DBSize
TStatusCmdLens m_LensByStatus
Stream-like class to help unify printing some text messages to diagnostics and to any socket.
Special variant of CRef that doesn't check for NULL when dereferencing.
Task controlling a socket.
Main working entity in TaskServer.
Class incorporating convenient methods to work with struct timespec.
static CSrvTime Current(void)
Exact current time with precision up to nanoseconds.
virtual ~CStatRotator(void)
virtual void ExecuteSlice(TSrvThreadNum thr_num)
This is the main method to do all work this task should do.
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
uint32_t Uint4
4-byte (32-bit) unsigned integer
uint16_t Uint2
2-byte (16-bit) unsigned integer
int64_t Int8
8-byte (64-bit) signed integer
uint64_t Uint8
8-byte (64-bit) unsigned integer
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
bool operator()(const char *left, const char *right) const
Uint8 cnt_another_server_main
Uint8 avg_tdiff_blobnotify
Uint8 max_tdiff_blobnotify
Uint2 TSrvThreadNum
Type for thread number in TaskServer.