Motr  M0
stats_srv.h
Go to the documentation of this file.
1 /* -*- C -*- */
2 /*
3  * Copyright (c) 2013-2020 Seagate Technology LLC and/or its Affiliates
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  * For any questions about this software or licensing,
18  * please email opensource@seagate.com or cortx-questions@seagate.com.
19  *
20  */
21 
22 
23 #pragma once
24 
25 #ifndef __MOTR_STATS_STATS_SVC_H__
26 #define __MOTR_STATS_STATS_SVC_H__
27 #ifndef __KERNEL__
28 
65 #include "stats/stats_fops.h"
66 #include "reqh/reqh.h"
67 #include "reqh/reqh_service.h"
68 #include "fop/fom_generic.h"
69 
76 
80 struct m0_stats {
81  uint64_t s_magic;
86 };
87 
91 struct stats_svc {
92  uint64_t ss_magic;
99  struct m0_tl ss_stats;
102 };
103 
108  uint64_t suf_magic;
109  struct m0_fom suf_fom;
110 };
111 
116 };
117 
118 /*
119  * Stats query fom.
120  */
122  uint64_t sqf_magic;
123  struct m0_fom sqf_fom;
124 };
125 
128 };
129 
133 M0_INTERNAL int m0_stats_svc_init(void);
134 
138 M0_INTERNAL void m0_stats_svc_fini(void);
139 
140 M0_INTERNAL struct m0_stats *
141 m0_stats_get(struct m0_tl *stats_list, uint64_t id);
142 
143 #define STATS_SVC_ALLOC_PTR(ptr) M0_ALLOC_PTR(ptr)
144 
147 #endif /* __KERNEL__ */
148 #endif /* __MOTR_STATS_STATS_SVC_H_ */
149 /*
150  * Local variables:
151  * c-indentation-style: "K&R"
152  * c-basic-offset: 8
153  * tab-width: 8
154  * fill-column: 80
155  * scroll-step: 1
156  * End:
157  */
M0_INTERNAL void m0_stats_svc_fini(void)
Definition: stats_srv.c:313
struct m0_tlink s_linkage
Definition: stats_srv.h:83
struct m0_fom sqf_fom
Definition: stats_srv.h:123
struct m0_stats_sum s_sum
Definition: stats_srv.h:85
struct m0_tl ss_stats
Definition: stats_srv.h:99
Definition: tlist.h:251
uint64_t ss_magic
Definition: stats_srv.h:92
uint64_t suf_magic
Definition: stats_srv.h:108
struct m0_fom suf_fom
Definition: stats_srv.h:109
uint64_t s_magic
Definition: stats_srv.h:81
M0_INTERNAL int m0_stats_svc_init(void)
Definition: stats_srv.c:307
Definition: fom.h:481
stats_query_fom_phases
Definition: stats_srv.h:126
uint64_t sqf_magic
Definition: stats_srv.h:122
struct m0_reqh_service_type m0_stats_svc_type
Definition: stats_srv.c:297
struct m0_reqh_service ss_reqhs
Definition: stats_srv.h:101
M0_INTERNAL struct m0_stats * m0_stats_get(struct m0_tl *stats_list, uint64_t id)
Definition: stats_srv.c:371
stats_update_fom_phases
Definition: stats_srv.h:112