mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 15:17:01 +02:00
CLEANUP: promex: remove unused PROMEX_FL_{INFO,FRONT,BACK,LI,SRV} flags
Now promex metric dumping relies on stat_cols API, we don't make use of these flags, so let's remove them.
This commit is contained in:
parent
2ab82124ec
commit
85f2f93d11
@ -32,11 +32,11 @@
|
||||
|
||||
/* Prometheus exporter flags (ctx->flags) */
|
||||
#define PROMEX_FL_METRIC_HDR 0x00000001
|
||||
#define PROMEX_FL_INFO_METRIC 0x00000002
|
||||
#define PROMEX_FL_FRONT_METRIC 0x00000004
|
||||
#define PROMEX_FL_BACK_METRIC 0x00000008
|
||||
#define PROMEX_FL_SRV_METRIC 0x00000010
|
||||
#define PROMEX_FL_LI_METRIC 0x00000020
|
||||
/* unused: 0x00000002 */
|
||||
/* unused: 0x00000004 */
|
||||
/* unused: 0x00000008 */
|
||||
/* unused: 0x00000010 */
|
||||
/* unused: 0x00000020 */
|
||||
#define PROMEX_FL_MODULE_METRIC 0x00000040
|
||||
#define PROMEX_FL_SCOPE_GLOBAL 0x00000080
|
||||
#define PROMEX_FL_SCOPE_FRONT 0x00000100
|
||||
|
@ -1805,7 +1805,7 @@ static int promex_dump_metrics(struct appctx *appctx, struct stconn *sc, struct
|
||||
|
||||
switch (appctx->st1) {
|
||||
case PROMEX_DUMPER_INIT:
|
||||
ctx->flags |= (PROMEX_FL_METRIC_HDR|PROMEX_FL_INFO_METRIC);
|
||||
ctx->flags |= PROMEX_FL_METRIC_HDR;
|
||||
ctx->obj_state = 0;
|
||||
ctx->field_num = ST_I_INF_NAME;
|
||||
appctx->st1 = PROMEX_DUMPER_GLOBAL;
|
||||
@ -1821,8 +1821,7 @@ static int promex_dump_metrics(struct appctx *appctx, struct stconn *sc, struct
|
||||
}
|
||||
}
|
||||
|
||||
ctx->flags &= ~PROMEX_FL_INFO_METRIC;
|
||||
ctx->flags |= (PROMEX_FL_METRIC_HDR|PROMEX_FL_FRONT_METRIC);
|
||||
ctx->flags |= PROMEX_FL_METRIC_HDR;
|
||||
ctx->obj_state = 0;
|
||||
ctx->field_num = ST_I_PX_PXNAME;
|
||||
ctx->mod_field_num = 0;
|
||||
@ -1839,8 +1838,7 @@ static int promex_dump_metrics(struct appctx *appctx, struct stconn *sc, struct
|
||||
}
|
||||
}
|
||||
|
||||
ctx->flags &= ~PROMEX_FL_FRONT_METRIC;
|
||||
ctx->flags |= (PROMEX_FL_METRIC_HDR|PROMEX_FL_LI_METRIC);
|
||||
ctx->flags |= PROMEX_FL_METRIC_HDR;
|
||||
ctx->obj_state = 0;
|
||||
ctx->field_num = ST_I_PX_PXNAME;
|
||||
ctx->mod_field_num = 0;
|
||||
@ -1857,8 +1855,7 @@ static int promex_dump_metrics(struct appctx *appctx, struct stconn *sc, struct
|
||||
}
|
||||
}
|
||||
|
||||
ctx->flags &= ~PROMEX_FL_LI_METRIC;
|
||||
ctx->flags |= (PROMEX_FL_METRIC_HDR|PROMEX_FL_BACK_METRIC);
|
||||
ctx->flags |= PROMEX_FL_METRIC_HDR;
|
||||
ctx->obj_state = 0;
|
||||
ctx->field_num = ST_I_PX_PXNAME;
|
||||
ctx->mod_field_num = 0;
|
||||
@ -1875,8 +1872,7 @@ static int promex_dump_metrics(struct appctx *appctx, struct stconn *sc, struct
|
||||
}
|
||||
}
|
||||
|
||||
ctx->flags &= ~PROMEX_FL_BACK_METRIC;
|
||||
ctx->flags |= (PROMEX_FL_METRIC_HDR|PROMEX_FL_SRV_METRIC);
|
||||
ctx->flags |= PROMEX_FL_METRIC_HDR;
|
||||
ctx->obj_state = 0;
|
||||
ctx->field_num = ST_I_PX_PXNAME;
|
||||
ctx->mod_field_num = 0;
|
||||
@ -1893,7 +1889,6 @@ static int promex_dump_metrics(struct appctx *appctx, struct stconn *sc, struct
|
||||
}
|
||||
}
|
||||
|
||||
ctx->flags &= ~(PROMEX_FL_METRIC_HDR|PROMEX_FL_SRV_METRIC);
|
||||
ctx->flags |= (PROMEX_FL_METRIC_HDR|PROMEX_FL_MODULE_METRIC);
|
||||
ctx->field_num = 0;
|
||||
ctx->mod_field_num = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user