OpenMAMA
stat.h File Reference
#include "mama/status.h"

Go to the source code of this file.

Macros

#define MAMA_STAT_NOT_LOCKABLE   0
 
#define MAMA_STAT_LOCKABLE   1
 

Typedefs

typedef enum mamaStatType mamaStatType
 

Enumerations

enum  mamaStatType {
  MAMA_STAT_TYPE_INITIALS = 105, MAMA_STAT_TYPE_RECAPS = 106, MAMA_STAT_TYPE_NUM_MESSAGES = 107, MAMA_STAT_TYPE_FT_TAKEOVERS = 108,
  MAMA_STAT_TYPE_QUEUE_SIZE = 109, MAMA_STAT_TYPE_SUBSCRIPTIONS = 110, MAMA_STAT_TYPE_TIMEOUTS = 111, MAMA_STAT_TYPE_MSG_INDEX = 112,
  MAMA_STAT_TYPE_NAK_PACKETS_SENT = 113, MAMA_STAT_TYPE_NAKS_SENT = 114, MAMA_STAT_TYPE_MSGS_LOST = 115, MAMA_STAT_TYPE_NCFS_IGNORE = 116,
  MAMA_STAT_TYPE_NCFS_SHED = 117, MAMA_STAT_TYPE_NCFS_RX_DELAY = 118, MAMA_STAT_TYPE_NCFS_UNKNOWN = 119, MAMA_STAT_TYPE_DUPLICATE_MSGS = 120,
  MAMA_STAT_TYPE_UNRECOVERABLE_WINDOW_ADVANCE = 121, MAMA_STAT_TYPE_UNRECOVERABLE_TIMEOUT = 122, MAMA_STAT_TYPE_LBM_MSGS_RECEIVED_NO_TOPIC = 123, MAMA_STAT_TYPE_LBM_REQUESTS_RECEIVED = 124,
  MAMA_STAT_TYPE_WOMBAT_MSGS = 125, MAMA_STAT_TYPE_RV_MSGS = 126, MAMA_STAT_TYPE_FAST_MSGS = 127, MAMA_STAT_TYPE_UNKNOWN_MSGS = 128,
  MAMA_STAT_TYPE_PUBLISHER_SEND = 129, MAMA_STAT_TYPE_PUBLISHER_INBOX_SEND = 130, MAMA_STAT_TYPE_PUBLISHER_REPLY_SEND = 131, MAMA_STAT_TYPE_UNKNOWN = 999
}
 

Functions

MAMAExpDLL mama_status mamaStat_create (mamaStat *stat, mamaStatsCollector collector, int lockable, const char *name, mama_fid_t type)
 Create a mamaStats object. More...
 
MAMAExpDLL mama_status mamaStat_destroy (mamaStat stat)
 Destroy a mamaStats object. More...
 
MAMAExpDLL mama_status mamaStat_increment (mamaStat stat)
 Increment the stats object counter. More...
 
MAMAExpDLL mama_status mamaStat_decrement (mamaStat stat)
 Decrement the stats object counter. More...
 
MAMAExpDLL mama_status mamaStat_reset (mamaStat stat)
 Reset the stats object counter. More...
 
MAMAExpDLL mama_status mamaStat_add (mamaStat stat, int value)
 Adds the stats object counter with the value. More...
 
MAMAExpDLL mama_status mamaStat_subtract (mamaStat stat, int value)
 Subtract the stats object counter with the value. More...
 
MAMAExpDLL mama_status mamaStat_setIntervalValue (mamaStat stat, int value)
 set the Interval value More...
 
MAMAExpDLL mama_fid_t mamaStat_getFid (mamaStat stat)
 Get the FID used when publishing the stat via the stats logger. More...
 
MAMAExpDLL int mamaStat_getIntervalValue (mamaStat stat)
 Get the value of the stat for the current interval. More...
 
MAMAExpDLL int mamaStat_getMaxValue (mamaStat stat)
 Get the maximum value of the stat. More...
 
MAMAExpDLL int mamaStat_getTotalValue (mamaStat stat)
 Get the total value of the stat. More...
 
MAMAExpDLL void mamaStat_getStats (mamaStat stat, mama_i32_t *intervalValue, mama_u32_t *maxValue, mama_u32_t *totalValue)
 Get the interval, maximum, and total values for the stat. More...
 
MAMAExpDLL const char * mamaStat_getName (mamaStat stat)
 Get the name of the stat. More...
 
MAMAExpDLL mama_status mamaStat_setLog (mamaStat stat, int log)
 Set whether or not this stat should be logged in the MAMA log. More...
 
MAMAExpDLL int mamaStat_getLog (mamaStat stat)
 Returns whether or not the stat is currently being logged to the MAMA log. More...
 
MAMAExpDLL mama_status mamaStat_setPublish (mamaStat stat, int publish)
 Set whether or not to publish this stat. More...
 
MAMAExpDLL int mamaStat_getPublish (mamaStat stat)
 Returns whether or not the stat is currently being published. More...
 
MAMAExpDLL mamaStatType mamaStatType_fromString (const char *statTypeString)
 Returns a mamaStatType from a string. More...
 
MAMAExpDLL const char * mamaStatType_toString (mamaStatType statType)
 Returns a string representation of a mamaStatType. More...
 

Macro Definition Documentation

◆ MAMA_STAT_NOT_LOCKABLE

#define MAMA_STAT_NOT_LOCKABLE   0

◆ MAMA_STAT_LOCKABLE

#define MAMA_STAT_LOCKABLE   1

Typedef Documentation

◆ mamaStatType

typedef enum mamaStatType mamaStatType

Enumeration Type Documentation

◆ mamaStatType

Enumerator
MAMA_STAT_TYPE_INITIALS 
MAMA_STAT_TYPE_RECAPS 
MAMA_STAT_TYPE_NUM_MESSAGES 
MAMA_STAT_TYPE_FT_TAKEOVERS 
MAMA_STAT_TYPE_QUEUE_SIZE 
MAMA_STAT_TYPE_SUBSCRIPTIONS 
MAMA_STAT_TYPE_TIMEOUTS 
MAMA_STAT_TYPE_MSG_INDEX 
MAMA_STAT_TYPE_NAK_PACKETS_SENT 
MAMA_STAT_TYPE_NAKS_SENT 
MAMA_STAT_TYPE_MSGS_LOST 
MAMA_STAT_TYPE_NCFS_IGNORE 
MAMA_STAT_TYPE_NCFS_SHED 
MAMA_STAT_TYPE_NCFS_RX_DELAY 
MAMA_STAT_TYPE_NCFS_UNKNOWN 
MAMA_STAT_TYPE_DUPLICATE_MSGS 
MAMA_STAT_TYPE_UNRECOVERABLE_WINDOW_ADVANCE 
MAMA_STAT_TYPE_UNRECOVERABLE_TIMEOUT 
MAMA_STAT_TYPE_LBM_MSGS_RECEIVED_NO_TOPIC 
MAMA_STAT_TYPE_LBM_REQUESTS_RECEIVED 
MAMA_STAT_TYPE_WOMBAT_MSGS 
MAMA_STAT_TYPE_RV_MSGS 
MAMA_STAT_TYPE_FAST_MSGS 
MAMA_STAT_TYPE_UNKNOWN_MSGS 
MAMA_STAT_TYPE_PUBLISHER_SEND 
MAMA_STAT_TYPE_PUBLISHER_INBOX_SEND 
MAMA_STAT_TYPE_PUBLISHER_REPLY_SEND 
MAMA_STAT_TYPE_UNKNOWN 
35 {
Definition: stat.h:38
Definition: stat.h:57
Definition: stat.h:48
Definition: stat.h:44
Definition: stat.h:50
Definition: stat.h:56
Definition: stat.h:40
Definition: stat.h:49
Definition: stat.h:42
Definition: stat.h:51
Definition: stat.h:59
Definition: stat.h:63
Definition: stat.h:39
Definition: stat.h:45
Definition: stat.h:37
Definition: stat.h:46
Definition: stat.h:47
Definition: stat.h:60
Definition: stat.h:43
Definition: stat.h:41
Definition: stat.h:36
Definition: stat.h:58
mamaStatType
Definition: stat.h:34

Function Documentation

◆ mamaStat_create()

MAMAExpDLL mama_status mamaStat_create ( mamaStat stat,
mamaStatsCollector  collector,
int  lockable,
const char *  name,
mama_fid_t  type 
)

Create a mamaStats object.

Parameters
statThe location of a mamaStats to store the result

◆ mamaStat_destroy()

MAMAExpDLL mama_status mamaStat_destroy ( mamaStat  stat)

Destroy a mamaStats object.

Parameters
statThe stats object to destroy

◆ mamaStat_increment()

MAMAExpDLL mama_status mamaStat_increment ( mamaStat  stat)

Increment the stats object counter.

Parameters
statThe stats object to increment

◆ mamaStat_decrement()

MAMAExpDLL mama_status mamaStat_decrement ( mamaStat  stat)

Decrement the stats object counter.

Parameters
statThe stats object to decrement

◆ mamaStat_reset()

MAMAExpDLL mama_status mamaStat_reset ( mamaStat  stat)

Reset the stats object counter.

Parameters
statThe stat object to reset

◆ mamaStat_add()

MAMAExpDLL mama_status mamaStat_add ( mamaStat  stat,
int  value 
)

Adds the stats object counter with the value.

Parameters
statThe stats object to added
valueThe value to be added to be stat

◆ mamaStat_subtract()

MAMAExpDLL mama_status mamaStat_subtract ( mamaStat  stat,
int  value 
)

Subtract the stats object counter with the value.

Parameters
statThe stats object to subtracted
valuethe value to be subtracted from stat

◆ mamaStat_setIntervalValue()

MAMAExpDLL mama_status mamaStat_setIntervalValue ( mamaStat  stat,
int  value 
)

set the Interval value

Parameters
statThe stats object to be changed
valuethe value to be used

◆ mamaStat_getFid()

MAMAExpDLL mama_fid_t mamaStat_getFid ( mamaStat  stat)

Get the FID used when publishing the stat via the stats logger.

Parameters
statThe stat object from which to get the FID

◆ mamaStat_getIntervalValue()

MAMAExpDLL int mamaStat_getIntervalValue ( mamaStat  stat)

Get the value of the stat for the current interval.

Parameters
statThe stat object from which to get the invterval value

◆ mamaStat_getMaxValue()

MAMAExpDLL int mamaStat_getMaxValue ( mamaStat  stat)

Get the maximum value of the stat.

Parameters
statThe stat object from which to get the maximum value

◆ mamaStat_getTotalValue()

MAMAExpDLL int mamaStat_getTotalValue ( mamaStat  stat)

Get the total value of the stat.

Parameters
statThe stat object from which to get the total value

◆ mamaStat_getStats()

MAMAExpDLL void mamaStat_getStats ( mamaStat  stat,
mama_i32_t intervalValue,
mama_u32_t maxValue,
mama_u32_t totalValue 
)

Get the interval, maximum, and total values for the stat.

Parameters
statThe stat object from which to get the values
intervalValueAddress to which the interval value will be written
maxValueAddress to which the maximum value will be written
totalValueAddress to which the total value will be written

◆ mamaStat_getName()

MAMAExpDLL const char* mamaStat_getName ( mamaStat  stat)

Get the name of the stat.

Parameters
Thestat object from which to get the name

◆ mamaStat_setLog()

MAMAExpDLL mama_status mamaStat_setLog ( mamaStat  stat,
int  log 
)

Set whether or not this stat should be logged in the MAMA log.

Parameters
statThe stat object to set logging for
logWhether or not to log the stat

◆ mamaStat_getLog()

MAMAExpDLL int mamaStat_getLog ( mamaStat  stat)

Returns whether or not the stat is currently being logged to the MAMA log.

Parameters
Thestat object to get logging for

◆ mamaStat_setPublish()

MAMAExpDLL mama_status mamaStat_setPublish ( mamaStat  stat,
int  publish 
)

Set whether or not to publish this stat.

stat The stat object to set publishing for publish Whether or not to publish the stat

◆ mamaStat_getPublish()

MAMAExpDLL int mamaStat_getPublish ( mamaStat  stat)

Returns whether or not the stat is currently being published.

Parameters
statThe stat object to check whether or not it is being published

◆ mamaStatType_fromString()

MAMAExpDLL mamaStatType mamaStatType_fromString ( const char *  statTypeString)

Returns a mamaStatType from a string.

Parameters
statTypeStringThe stat type as a string

◆ mamaStatType_toString()

MAMAExpDLL const char* mamaStatType_toString ( mamaStatType  statType)

Returns a string representation of a mamaStatType.

Parameters
statTypeThe statType to return as a string


© 2012 Linux Foundation