Rename PREBUILT_FIELDS to PREBUILT_COUNTERS
There has been an implicit assumption that fields in PREBUILT_FIELDS are also aggregatable counters. This patch renames the macro to clarify this assumption as well.
@@ -404,10 +404,10 @@ struct st_quicly_conn_streamgroup_state_t {
};
/**
- * Values that do not need to be gathered upon the invocation of `quicly_get_stats`. We use typedef to define the same fields in
- * the same order for quicly_stats_t and `struct st_quicly_conn_public_t::stats`.
+ * Aggregatable counters that do not need to be gathered upon the invocation of `quicly_get_stats`. We use typedef to define the
+ * same fields in the same order for quicly_stats_t and `struct st_quicly_conn_public_t::stats`.
*/
-#define QUICLY_STATS_PREBUILT_FIELDS \
+#define QUICLY_STATS_PREBUILT_COUNTERS \
struct { \
/** \
* Total number of packets received. \
@@ -481,10 +481,6 @@ struct st_quicly_conn_streamgroup_state_t {
* Total number of PTOs observed during the connection. \
*/ \
uint64_t num_ptos; \
- /** \
- * Time took until handshake is confirmed. UINT64_MAX if handshake is not confirmed yet. \
- */ \
- uint64_t handshake_confirmed_msec; \
/** \
* number of timeouts occurred during handshake due to no progress being made (see `handshake_timeout_rtt_multiplier`) \
*/ \
@@ -498,7 +494,7 @@ typedef struct st_quicly_stats_t {
/**
* The pre-built fields. This MUST be the first member of `quicly_stats_t` so that we can use `memcpy`.
*/
- QUICLY_STATS_PREBUILT_FIELDS;
+ QUICLY_STATS_PREBUILT_COUNTERS;
/**
* RTT stats.
*/
@@ -583,7 +579,11 @@ struct _st_quicly_conn_public_t {
quicly_cid_t original_dcid;
struct st_quicly_default_scheduler_state_t _default_scheduler;
struct {
- QUICLY_STATS_PREBUILT_FIELDS;
+ QUICLY_STATS_PREBUILT_COUNTERS;
+ /**
+ * Time took until handshake is confirmed. UINT64_MAX if handshake is not confirmed yet.
+ */
+ uint64_t handshake_confirmed_msec;
} stats;
uint32_t version;
void *data;
