#include "lib/trace.h"
#include "lib/tlist.h"
#include "lib/assert.h"
#include "lib/misc.h"
#include "lib/memory.h"
#include "rpc/item.h"
#include "fop/fop_item_type.h"
#include "rpc/rpc_opcodes.h"
#include "stats/stats_srv.h"
#include "fop/fop.h"
#include "fop/fom_generic.h"
#include "reqh/reqh_service.h"
#include "stats/stats_fops.h"
#include "stats/stats_fops_xc.h"
Go to the source code of this file.
|
| M0_TL_DESCR_DEFINE (stats, "statistic objects", M0_INTERNAL, struct m0_stats, s_linkage, s_magic, M0_STATS_MAGIC, M0_STATS_HEAD_MAGIC) |
|
| M0_TL_DEFINE (stats, M0_INTERNAL, struct m0_stats) |
|
| M0_BOB_DEFINE (static, &stats_svc_bob, stats_svc) |
|
static bool | stats_svc_invariant (const struct stats_svc *svc) |
|
static int | stats_svc_rso_start (struct m0_reqh_service *service) |
|
static void | stats_svc_rso_stop (struct m0_reqh_service *service) |
|
static void | stats_svc_rso_fini (struct m0_reqh_service *service) |
|
static int | stats_svc_rsto_service_allocate (struct m0_reqh_service **srv, const struct m0_reqh_service_type *stype) |
|
M0_INTERNAL int | m0_stats_svc_init (void) |
|
M0_INTERNAL void | m0_stats_svc_fini (void) |
|
static int | stats_update_fom_create (struct m0_fop *fop, struct m0_fom **out, struct m0_reqh *reqh) |
|
static int | stats_update_fom_tick (struct m0_fom *fom) |
|
static void | stats_update_fom_fini (struct m0_fom *fom) |
|
static size_t | stats_fom_home_locality (const struct m0_fom *fom) |
|
static bool | stats_invariant (const struct m0_stats *stats) |
|
M0_INTERNAL struct m0_stats * | m0_stats_get (struct m0_tl *stats_list, uint64_t id) |
|
static int | stats_sum_copy (struct m0_stats_sum *s, struct m0_stats_sum *d) |
|
static int | stats_add (struct m0_tl *stats_list, struct m0_stats_sum *sum) |
|
static int | stats_update (struct m0_fom *fom) |
|
static int | stats_query_fom_create (struct m0_fop *fop, struct m0_fom **out, struct m0_reqh *reqh) |
|
static int | stats_query_fom_tick (struct m0_fom *fom) |
|
static void | stats_query_fom_fini (struct m0_fom *fom) |
|
static int | read_stats (struct m0_fom *fom) |
|
◆ M0_TRACE_SUBSYSTEM
#define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_STATS |
◆ REP_STATS_SUM_DATA
◆ SUM_DATA_SIZE
#define SUM_DATA_SIZE |
( |
|
sum_data | ) |
(sum_data->ss_data.se_nr * sizeof(uint64_t)) |
◆ M0_BOB_DEFINE()
M0_BOB_DEFINE |
( |
static |
, |
|
|
& |
stats_svc_bob, |
|
|
stats_svc |
|
|
) |
| |
◆ M0_TL_DEFINE()
◆ M0_TL_DESCR_DEFINE()
◆ read_stats()
static int read_stats |
( |
struct m0_fom * |
fom | ) |
|
|
static |
◆ stats_add()
◆ stats_fom_home_locality()
static size_t stats_fom_home_locality |
( |
const struct m0_fom * |
fom | ) |
|
|
static |
Get stats update FOM locality.
Definition at line 526 of file stats_srv.c.
◆ stats_invariant()
static bool stats_invariant |
( |
const struct m0_stats * |
stats | ) |
|
|
static |
◆ stats_query_fom_create()
static int stats_query_fom_create |
( |
struct m0_fop * |
fop, |
|
|
struct m0_fom ** |
out, |
|
|
struct m0_reqh * |
reqh |
|
) |
| |
|
static |
Create and initialize stats query FOM.
Definition at line 617 of file stats_srv.c.
◆ stats_query_fom_fini()
static void stats_query_fom_fini |
( |
struct m0_fom * |
fom | ) |
|
|
static |
◆ stats_query_fom_tick()
static int stats_query_fom_tick |
( |
struct m0_fom * |
fom | ) |
|
|
static |
State transition function for stats query FOM.
- Note
- only M0_FOPH_QUEUE_REPLY & M0_FOPH_QUEUE_REPLY_WAIT are required.
Definition at line 679 of file stats_srv.c.
◆ stats_sum_copy()
◆ stats_svc_invariant()
static bool stats_svc_invariant |
( |
const struct stats_svc * |
svc | ) |
|
|
static |
◆ stats_svc_rso_fini()
The rso_fini method to finalise the Stats service.
Definition at line 241 of file stats_srv.c.
◆ stats_svc_rso_start()
The rso_start methods to start stats service.
Definition at line 224 of file stats_srv.c.
◆ stats_svc_rso_stop()
The rso_stop method to stop Stats service.
Definition at line 233 of file stats_srv.c.
◆ stats_svc_rsto_service_allocate()
◆ stats_update()
static int stats_update |
( |
struct m0_fom * |
fom | ) |
|
|
static |
◆ stats_update_fom_create()
static int stats_update_fom_create |
( |
struct m0_fop * |
fop, |
|
|
struct m0_fom ** |
out, |
|
|
struct m0_reqh * |
reqh |
|
) |
| |
|
static |
Create and initiate stats update FOM.
Definition at line 458 of file stats_srv.c.
◆ stats_update_fom_fini()
static void stats_update_fom_fini |
( |
struct m0_fom * |
fom | ) |
|
|
static |
Finalise stats update FOM.
Definition at line 512 of file stats_srv.c.
◆ stats_update_fom_tick()
static int stats_update_fom_tick |
( |
struct m0_fom * |
fom | ) |
|
|
static |
State transition function for stats update FOM.
Definition at line 485 of file stats_srv.c.
◆ stats_query_fom_ops
Initial value:= {
}
static void stats_query_fom_fini(struct m0_fom *fom)
static int stats_query_fom_tick(struct m0_fom *fom)
static size_t stats_fom_home_locality(const struct m0_fom *fom)
Stats update FOM operation vector.
Definition at line 542 of file stats_srv.c.
◆ stats_query_fom_sm_conf
Initial value:= {
.scf_name = "stats-query-fom-sm",
}
struct m0_sm_state_descr stats_query_phases[]
Definition at line 209 of file stats_srv.c.
◆ stats_query_fom_type_ops
Initial value:= {
}
static int stats_query_fom_create(struct m0_fop *fop, struct m0_fom **out, struct m0_reqh *reqh)
Stats update FOP type operation vector.
Definition at line 207 of file stats_srv.c.
◆ stats_query_phases
Initial value:= {
.sd_name = "Read",
}
}
Definition at line 555 of file stats_srv.c.
◆ stats_service_type_ops
Initial value:= {
}
static int stats_svc_rsto_service_allocate(struct m0_reqh_service **srv, const struct m0_reqh_service_type *stype)
Definition at line 293 of file stats_srv.c.
◆ stats_svc_bob
Initial value:= {
.bt_name = "stats svc",
}
#define M0_MAGIX_OFFSET(type, field)
Definition at line 197 of file stats_srv.c.
◆ stats_svc_ops
Initial value:= {
}
static void stats_svc_rso_fini(struct m0_reqh_service *service)
int m0_reqh_service_async_start_simple(struct m0_reqh_service_start_async_ctx *asc)
static int stats_svc_rso_start(struct m0_reqh_service *service)
static void stats_svc_rso_stop(struct m0_reqh_service *service)
Definition at line 262 of file stats_srv.c.
◆ stats_update_fom_ops
Initial value:= {
}
static int stats_update_fom_tick(struct m0_fom *fom)
static size_t stats_fom_home_locality(const struct m0_fom *fom)
static void stats_update_fom_fini(struct m0_fom *fom)
Stats update FOM operation vector.
Definition at line 330 of file stats_srv.c.
◆ stats_update_fom_sm_conf
Initial value:= {
.scf_name = "stats-update-fom-sm",
}
struct m0_sm_state_descr stats_update_phases[]
Definition at line 208 of file stats_srv.c.
◆ stats_update_fom_type_ops
Initial value:= {
}
static int stats_update_fom_create(struct m0_fop *fop, struct m0_fom **out, struct m0_reqh *reqh)
Stats update FOP type operation vector.
Definition at line 206 of file stats_srv.c.
◆ stats_update_phases
Initial value:= {
.sd_name = "Init",
},
.sd_name = "Update",
},
.sd_name = "Finish",
.sd_allowed = 0
},
}
Definition at line 343 of file stats_srv.c.