xrootd
Main Page
Namespaces
Classes
Files
File List
File Members
src
XrdOfs
XrdOfsStats.hh
Go to the documentation of this file.
1
#ifndef __XRDOFS_STATS_H__
2
#define __XRDOFS_STATS_H__
3
/******************************************************************************/
4
/* */
5
/* X r d O f s S t a t s . h h */
6
/* */
7
/* (c) 2009 by the Board of Trustees of the Leland Stanford, Jr., University */
8
/* All Rights Reserved. See XrdInfo.cc for complete License Terms */
9
/* Produced by Andrew Hanushevsky for Stanford University under contract */
10
/* DE-AC02-76-SFO0515 with the Department of Energy */
11
/******************************************************************************/
12
13
// $Id$
14
15
#include <stdlib.h>
16
17
#include "
XrdSys/XrdSysPthread.hh
"
18
19
class
XrdOfsStats
20
{
21
public
:
22
23
struct
StatsData
24
{
25
int
numOpenR
;
// Read
26
int
numOpenW
;
// Write
27
int
numOpenP
;
// Posc
28
int
numUnpsist
;
// Posc
29
int
numHandles
;
30
int
numRedirect
;
31
int
numStarted
;
32
int
numReplies
;
33
int
numErrors
;
34
int
numDelays
;
35
int
numSeventOK
;
36
int
numSeventER
;
37
}
Data
;
38
39
XrdSysMutex
sdMutex
;
40
41
inline
void
Add
(
int
&Cntr) {
sdMutex
.
Lock
(); Cntr++;
sdMutex
.
UnLock
();}
42
43
inline
void
Dec
(
int
&Cntr) {
sdMutex
.
Lock
(); Cntr--;
sdMutex
.
UnLock
();}
44
45
int
Report
(
char
*Buff,
int
Blen);
46
47
void
setRole
(
const
char
*theRole) {
myRole
= theRole;}
48
49
XrdOfsStats
() {memset(&
Data
, 0,
sizeof
(
Data
));}
50
~XrdOfsStats
() {}
51
52
private
:
53
54
const
char
*
myRole
;
55
};
56
#endif
Generated by
1.8.1.2