xref: /plan9-contrib/sys/src/cmd/fscfs/stats.h (revision 4366bb713c6d061e46ce8907c3b6797dc3f83d93)
1 typedef struct Cfsmsg Cfsmsg;
2 typedef struct Cfsstat Cfsstat;
3 
4 struct Cfsmsg {
5 	ulong	n;			/* number of messages (of some type) */
6 	vlong	t;			/* time spent in these messages */
7 	vlong	s;			/* start time of last call */
8 };
9 
10 struct Cfsstat {
11 	Cfsmsg cm[128];		/* client messages */
12 	Cfsmsg sm[128];		/* server messages */
13 
14 	ulong ndirread;			/* # of directory read ops */
15 	ulong ndelegateread;		/* # of read ops delegated */
16 	ulong ninsert;			/* # of cache insert ops */
17 	ulong ndelete;			/* # of cache delete ops */
18 	ulong nupdate;			/* # of cache update ops */
19 
20 	uvlong bytesread;		/* # of bytes read by client */
21 	uvlong byteswritten;		/* # of bytes written by client */
22 	uvlong bytesfromserver;		/* # of bytes read from server */
23 	uvlong bytesfromdirs;		/* # of directory bytes read from server */
24 	uvlong bytesfromcache;		/* # of bytes read from cache */
25 	uvlong bytestocache;		/* # of bytes written to cache */
26 };
27 
28 extern Cfsstat cfsstat, cfsprev;
29 extern int statson;
30