OpenClovis Logo

clEoQueueStats.h
1 /*
2  * Copyright (C) 2002-2012 OpenClovis Solutions Inc. All Rights Reserved.
3  *
4  * This file is available under a commercial license from the
5  * copyright holder or the GNU General Public License Version 2.0.
6  *
7  * The source code for this program is not published or otherwise
8  * divested of its trade secrets, irrespective of what has been
9  * deposited with the U.S. Copyright office.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * General Public License for more details.
15  *
16  * For more information, see the file COPYING provided with this
17  * material.
18  */
19 #ifndef _CL_EO_QUEUE_STATS_H_
20 #define _CL_EO_QUEUE_STATS_H_
21 
22 #include <clEoQueue.h>
23 
24 typedef struct ClEoQueueStats
25 {
26  ClBoolT used;
27  ClUint8T priority;
28  ClUint8T proto;
29  ClUint32T count;
30  struct timeval start;
31  struct timeval end;
32  ClUint64T minTime;
33  ClUint64T maxTime;
34  ClUint64T totalTime;
35  ClUint32T minQueueSize;
36  ClUint32T maxQueueSize;
37  ClUint64T totalQueueSize;
38 }ClEoQueueStatsT;
39 
40 typedef struct ClEoQueueProtoUsage
41 {
42  ClInt64T bytes;
43  ClUint8T proto;
44  ClUint32T numMsgs;
45 }ClEoQueueProtoUsageT;
46 
47 typedef struct ClEoQueuePriorityUsage
48 {
49  ClInt64T bytes;
50  ClUint8T priority;
51  ClUint32T numMsgs;
52  ClTaskPoolUsageT taskPoolUsage;
53 }ClEoQueuePriorityUsageT;
54 
55 typedef struct ClEoQueueDetails
56 {
57  ClEoQueueProtoUsageT *protos; /*protos map*/
58  ClUint32T numProtos;
59  ClEoQueuePriorityUsageT *priorities; /*priorities map*/
60  ClUint32T numPriorities;
61 }ClEoQueueDetailsT;
62 
63 #if defined (EO_QUEUE_STATS)
64 extern void clEoQueueStatsStart(ClUint32T queueSize, ClEoJobT *pJob, ClEoQueueStatsT *pStats);
65 extern void clEoQueueStatsStop(ClUint32T queueSize, ClEoJobT *pJob, ClEoQueueStatsT *pStats);
66 
67 #else
68 
69 #define clEoQueueStatsStart(size, job, stats) do { (void)(stats); (void)(size); } while(0)
70 #define clEoQueueStatsStop(size, job, stats) do { (void)(stats); (void)(size); } while(0)
71 
72 #endif
73 
74 extern ClRcT clEoQueueStatsGet(ClEoQueueDetailsT *pEoQueueDetails);
75 
76 #endif

Generated on Tue Jan 10 10:29:15 PST 2012 for OpenClovis SDK using Doxygen