]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[MINOR] stick-table: use suffix "_cnt" for cumulated counts
authorWilly Tarreau <w@1wt.eu>
Fri, 18 Jun 2010 18:16:39 +0000 (20:16 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 10 Aug 2010 16:04:12 +0000 (18:04 +0200)
The "_cnt" suffix is already used by ACLs to count various data,
so it makes sense to use the same one in "conn_cnt" instead of
"conn_cum" to count cumulated connections.

This is not a problem because no version was emitted with those
keywords.

Thus we'll try to stick to the following rules :

  xxxx_cnt : cumulated event count for criterion xxxx
  xxxx_cur : current number of concurrent entries for criterion xxxx
  xxxx_rate: event rate for criterion xxxx

doc/configuration.txt
include/types/stick_table.h
src/stick_table.c

index 02e765fd5317a73dd0d3e943285618fe8a1ef382..91c306d9a8424eff2401d546fc4b7e2372845589 100644 (file)
@@ -5116,7 +5116,7 @@ stick-table type {ip | integer | string [len <length>] } size <size>
                may be used by ACLs in order to control various criteria related
                to the activity of the client matching the stick-table. For each
                item specified here, the size of each entry will be inflated so
-               that the additional data can fit. At the moment, only "conn_cum"
+               that the additional data can fit. At the moment, only "conn_cnt"
                is supported, which can be used to store and retrieve the total
                number of connections matching the entry since it was created. A
                "server_id" type is also supported but it's only for internal
index 25bfbd8c15ba5dc35a508b9b867ae69d10c8fbb4..071f74a5b2748181bf2a02e89defd62ccc5ee2ca 100644 (file)
@@ -42,13 +42,13 @@ enum {
 /* The types of extra data we can store in a stick table */
 enum {
        STKTABLE_DT_SERVER_ID,    /* the server ID to use with this session if > 0 */
-       STKTABLE_DT_CONN_CUM,     /* cumulated number of connections */
+       STKTABLE_DT_CONN_CNT,     /* cumulated number of connections */
        STKTABLE_DATA_TYPES       /* Number of data types, must always be last */
 };
 
 /* stick_table extra data. This is mainly used for casting or size computation */
 union stktable_data {
-       unsigned int conn_cum;
+       unsigned int conn_cnt;
        int server_id;
 };
 
index a5e41bf73da71ca6e60fb32c27eafbe023898058..9709b7381570e631042588dfb7429062c68c3259 100644 (file)
@@ -525,7 +525,7 @@ int stktable_compatible_pattern(struct pattern_expr *expr, unsigned long table_t
 
 /* Extra data types processing */
 struct stktable_data_type stktable_data_types[STKTABLE_DATA_TYPES] = {
-       [STKTABLE_DT_CONN_CUM] = { .name = "conn_cum", .data_length = stktable_data_size(conn_cum) },
+       [STKTABLE_DT_CONN_CNT]  = { .name = "conn_cnt", .data_length = stktable_data_size(conn_cnt) },
        [STKTABLE_DT_SERVER_ID] = { .name = "server_id", .data_length = stktable_data_size(server_id) },
 };