Motr  M0
stats_fom.c File Reference
#include "lib/memory.h"
#include "lib/misc.h"
#include "fop/ut/stats/stats_fom.h"
Include dependency graph for stats_fom.c:

Go to the source code of this file.

Functions

static size_t fom_stats_home_locality (const struct m0_fom *fom)
 
static void fop_stats_fom_fini (struct m0_fom *fom)
 
static int fom_stats_tick (struct m0_fom *fom)
 
static int stats_fom_create (struct m0_fom **m, struct m0_reqh *reqh)
 
static void test_stats_req_handle (struct m0_reqh *reqh)
 

Variables

static struct m0_chan chan
 
static struct m0_mutex mutex
 
static struct m0_clink clink
 
static struct m0_sm_state_descr phases []
 
static struct m0_sm_trans_descr trans []
 
static struct m0_sm_conf fom_phases_conf
 
struct m0_reqh_service_type ut_stats_service_type
 
static const struct m0_fom_ops fom_stats_ops
 
const struct m0_fom_type_ops fom_stats_type_ops
 
struct m0_fom_type stats_fom_type
 

Function Documentation

◆ fom_stats_home_locality()

static size_t fom_stats_home_locality ( const struct m0_fom fom)
static

Definition at line 82 of file stats_fom.c.

Here is the call graph for this function:

◆ fom_stats_tick()

static int fom_stats_tick ( struct m0_fom fom)
static

Definition at line 115 of file stats_fom.c.

Here is the call graph for this function:

◆ fop_stats_fom_fini()

static void fop_stats_fom_fini ( struct m0_fom fom)
static

Definition at line 107 of file stats_fom.c.

Here is the call graph for this function:

◆ stats_fom_create()

static int stats_fom_create ( struct m0_fom **  m,
struct m0_reqh reqh 
)
static

Definition at line 90 of file stats_fom.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_stats_req_handle()

static void test_stats_req_handle ( struct m0_reqh reqh)
static

Definition at line 132 of file stats_fom.c.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ chan

struct m0_chan chan
static

Definition at line 27 of file stats_fom.c.

◆ clink

struct m0_clink clink
static

Definition at line 29 of file stats_fom.c.

◆ fom_phases_conf

struct m0_sm_conf fom_phases_conf
static
Initial value:
= {
.scf_name = "FOM phases",
.scf_nr_states = ARRAY_SIZE(phases),
.scf_state = phases,
.scf_trans_nr = ARRAY_SIZE(trans),
.scf_trans = trans
}
static struct m0_sm_state_descr phases[]
Definition: stats_fom.c:31
static struct m0_sm_trans_descr trans[]
Definition: stats_fom.c:47
#define ARRAY_SIZE(a)
Definition: misc.h:45

Definition at line 53 of file stats_fom.c.

◆ fom_stats_ops

const struct m0_fom_ops fom_stats_ops
static
Initial value:
= {
.fo_fini = fop_stats_fom_fini,
.fo_tick = fom_stats_tick,
.fo_home_locality = fom_stats_home_locality
}
static void fop_stats_fom_fini(struct m0_fom *fom)
Definition: stats_fom.c:107
static size_t fom_stats_home_locality(const struct m0_fom *fom)
Definition: stats_fom.c:82
static int fom_stats_tick(struct m0_fom *fom)
Definition: stats_fom.c:115

Ops object for fom_stats FOM

Definition at line 68 of file stats_fom.c.

◆ fom_stats_type_ops

const struct m0_fom_type_ops fom_stats_type_ops
Initial value:
= {
.fto_create = NULL
}
#define NULL
Definition: misc.h:38

FOM type specific functions for stats FOP.

Definition at line 75 of file stats_fom.c.

◆ mutex

struct m0_mutex mutex
static

Definition at line 28 of file stats_fom.c.

◆ phases

struct m0_sm_state_descr phases[]
static
Initial value:
= {
[PH_INIT] = {
.sd_flags = M0_SDF_INITIAL,
.sd_name = "Init",
.sd_allowed = M0_BITS(PH_RUN, PH_FINISH)
},
[PH_RUN] = {
.sd_name = "fom_run",
.sd_allowed = M0_BITS(PH_FINISH)
},
[PH_FINISH] = {
.sd_flags = M0_SDF_TERMINAL,
.sd_name = "SM finish",
}
}
#define M0_BITS(...)
Definition: misc.h:236

Definition at line 31 of file stats_fom.c.

◆ stats_fom_type

struct m0_fom_type stats_fom_type

Stats specific FOM type operations vector.

Definition at line 80 of file stats_fom.c.

◆ trans

struct m0_sm_trans_descr trans[]
static
Initial value:
= {
{ "Start", PH_INIT, PH_RUN },
{ "Failed", PH_INIT, PH_FINISH },
{ "Stop", PH_RUN, PH_FINISH }
}

Definition at line 47 of file stats_fom.c.

◆ ut_stats_service_type

struct m0_reqh_service_type ut_stats_service_type

Definition at line 88 of file stats_ut.c.