added category flag to gauger

This commit is contained in:
Fournier Nicolas 2015-07-20 14:38:50 +02:00
parent 7bd896ec09
commit 00fb066842
3 changed files with 13 additions and 1 deletions

View File

@ -121,6 +121,7 @@ main (int argc, char ** argv)
PERF_TALER_MINTDB_INIT_CMD_GAUGER ("", PERF_TALER_MINTDB_INIT_CMD_GAUGER ("",
"05 - start", "05 - start",
"05 - stop", "05 - stop",
"MINTDB",
"Number of reserve inserted per second", "Number of reserve inserted per second",
"item/sec", "item/sec",
NB_RESERVE_SAVE), NB_RESERVE_SAVE),
@ -140,6 +141,7 @@ main (int argc, char ** argv)
PERF_TALER_MINTDB_INIT_CMD_GAUGER ("", PERF_TALER_MINTDB_INIT_CMD_GAUGER ("",
"06 - start", "06 - start",
"06 - stop", "06 - stop",
"MINTDB",
"Number of reserve loaded per second", "Number of reserve loaded per second",
"item/sec", "item/sec",
NB_RESERVE_SAVE), NB_RESERVE_SAVE),
@ -159,6 +161,7 @@ main (int argc, char ** argv)
PERF_TALER_MINTDB_INIT_CMD_GAUGER ("", PERF_TALER_MINTDB_INIT_CMD_GAUGER ("",
"07 - start", "07 - start",
"07 - stop", "07 - stop",
"MINTDB",
"Number of reserve history loaded per second", "Number of reserve history loaded per second",
"item/sec", "item/sec",
NB_RESERVE_SAVE), NB_RESERVE_SAVE),
@ -183,6 +186,7 @@ main (int argc, char ** argv)
PERF_TALER_MINTDB_INIT_CMD_GAUGER ("", PERF_TALER_MINTDB_INIT_CMD_GAUGER ("",
"08 - start", "08 - start",
"08 - stop", "08 - stop",
"MINTDB",
"Number of withdraw insert per second", "Number of withdraw insert per second",
"item/sec", "item/sec",
NB_WITHDRAW_SAVE), NB_WITHDRAW_SAVE),
@ -206,6 +210,7 @@ main (int argc, char ** argv)
PERF_TALER_MINTDB_INIT_CMD_GAUGER ("", PERF_TALER_MINTDB_INIT_CMD_GAUGER ("",
"09 - start", "09 - start",
"09 - stop", "09 - stop",
"MINTDB",
"Number of withdraw loaded per second", "Number of withdraw loaded per second",
"item/sec", "item/sec",
NB_RESERVE_SAVE), NB_RESERVE_SAVE),

View File

@ -126,7 +126,7 @@
* @param _unit the unit of the data measured, typicly something/sec * @param _unit the unit of the data measured, typicly something/sec
* @param _divide number of measurments in the interval * @param _divide number of measurments in the interval
*/ */
#define PERF_TALER_MINTDB_INIT_CMD_GAUGER(_label, _label_start, _label_stop, _description, _unit, _divide) \ #define PERF_TALER_MINTDB_INIT_CMD_GAUGER(_label, _label_start, _label_stop, _category, _description, _unit, _divide) \
{ \ { \
.command = PERF_TALER_MINTDB_CMD_GAUGER, \ .command = PERF_TALER_MINTDB_CMD_GAUGER, \
.label = _label, \ .label = _label, \
@ -134,6 +134,7 @@
.details.gauger = { \ .details.gauger = { \
.label_start = _label_start, \ .label_start = _label_start, \
.label_stop = _label_stop, \ .label_stop = _label_stop, \
.category = _category, \
.description = _description, \ .description = _description, \
.unit = _unit, \ .unit = _unit, \
.divide = _divide, \ .divide = _divide, \
@ -646,6 +647,11 @@ union PERF_TALER_MINTDB_CMD_Details
*/ */
const char *label_stop; const char *label_stop;
/**
* The category of the measurment
*/
const char *category;
/** /**
* Description of the metric, used in Gauger * Description of the metric, used in Gauger
*/ */

View File

@ -119,6 +119,7 @@ main (int argc, char ** argv)
PERF_TALER_MINTDB_INIT_CMD_GAUGER ("04 - gauger", PERF_TALER_MINTDB_INIT_CMD_GAUGER ("04 - gauger",
"04 - time start", "04 - time start",
"04 - time stop", "04 - time stop",
"TEST",
"time to insert a deposit", "time to insert a deposit",
"deposit/sec", "deposit/sec",
NB_DEPOSIT_SAVE), NB_DEPOSIT_SAVE),