Motr  M0
Messages Per Second Statistics
Collaboration diagram for Messages Per Second Statistics:

Data Structures

struct  m0_net_test_mps
 

Functions

void m0_net_test_mps_init (struct m0_net_test_mps *mps, unsigned long messages, m0_time_t timestamp, m0_time_t interval)
 
m0_time_t m0_net_test_mps_add (struct m0_net_test_mps *mps, unsigned long messages, m0_time_t timestamp)
 

Detailed Description

end of NetTestTimestampDFS group

See also
Motr Network Benchmark

Function Documentation

◆ m0_net_test_mps_add()

m0_time_t m0_net_test_mps_add ( struct m0_net_test_mps mps,
unsigned long  messages,
m0_time_t  timestamp 
)

Add sample to the MPS statistics if time interval [mps->ntmps_last_time, timestamp] is greater than mps->ntmps_interval. This function will use previous call (or initializer) parameters to calculate MPS: number of messages [mps->ntmps_last_nr, messages] in the time range [mps->ntmps_last_time, timestamp].

Parameters
mpsMPS statistics structure.
messagesTotal number of messages transferred.
timestampTimestamp of messages value.
Returns
Value will not be added to the sample before this time.
Todo:
problem with small mps->ntmps_time_interval can be here

Definition at line 241 of file stats.c.

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

◆ m0_net_test_mps_init()

void m0_net_test_mps_init ( struct m0_net_test_mps mps,
unsigned long  messages,
m0_time_t  timestamp,
m0_time_t  interval 
)

Initialize MPS statistics.

Parameters
mpsMPS statistics structure.
messagesNext call to m0_net_test_mps_add() will use this value as previous value to measure number of messages transferred in time interval.
timestampThe same as messages, but for time difference.
intervalMPS measure interval. m0_net_test_mps_add() will not add sample to stats if time from last addition to statistics is less than interval.

Definition at line 227 of file stats.c.

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