diff options
| author | fumingwei <[email protected]> | 2023-03-13 18:06:52 +0800 |
|---|---|---|
| committer | fumingwei <[email protected]> | 2023-03-13 18:06:52 +0800 |
| commit | 00b85a300d7afb70d71373b9457530de08bc96eb (patch) | |
| tree | 1998add4254c51ce14392279d5919c8e5d90c8e8 /inc | |
| parent | 86c09082ae13bb4aebf7bdcd38edd62e16a0e809 (diff) | |
feature:修改出现的笔误
Diffstat (limited to 'inc')
| -rw-r--r-- | inc/fieldstat.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/inc/fieldstat.h b/inc/fieldstat.h index af28345..388d1ca 100644 --- a/inc/fieldstat.h +++ b/inc/fieldstat.h @@ -4,6 +4,9 @@ extern "C" { #endif + +#define TABLE_COLUMN_MAX_SIZE 64 + enum field_type { FIELD_TYPE_COUNTER, @@ -16,13 +19,13 @@ struct fieldstat_instance; struct metric_id_list { int count; - int id[64]; // define marco + int id[TABLE_COLUMN_MAX_SIZE]; // define marco }; /** * Create fieldstat instance. * @param name The instance name. - * @return Instance id. NULL is failed, Not NULL is successd. + * @return Instance ptr. NULL is failed, Not NULL is successd. */ struct fieldstat_instance * fieldstat_instance_create(const char *name); /** @@ -67,7 +70,7 @@ int fieldstat_set_local_output(struct fieldstat_instance *instance, const char * * @param instance The Fieldstat instance. * @return -1 is failed. 0 is success. */ -int fieldstat_background_thead_disable(struct fieldstat_instance *instance); +int fieldstat_background_thread_disable(struct fieldstat_instance *instance); /** * Set the output interval in seconds * @param seconds In seconds. @@ -82,7 +85,7 @@ int fieldstat_set_output_interval(struct fieldstat_instance *instance, int secon * @param tag_key Tag key array * @param tag_value Tag key array * @param n_tag size of tag_key[] and tag_value[] - * @return -1 is failed. 0 is success. + * @return metric id. -1 is failed. >=0 is success. */ int fieldstat_register(struct fieldstat_instance *instance, enum field_type type, const char *field_name, const char *tag_key[], const char *tag_value[], size_t n_tag); /** @@ -92,7 +95,7 @@ int fieldstat_register(struct fieldstat_instance *instance, enum field_type type * @param column_name column name array. * @param column_type column type array. Type in [counter, gauge] * @param n_column size of column_type[] and column_name[] - * @return -1 is failed. 0 is success. + * @return metric id. -1 is failed. >=0 is success. */ int fieldstat_register_table(struct fieldstat_instance *instance, const char *name, const char *column_name[], enum field_type column_type[], size_t n_column); /** @@ -103,7 +106,7 @@ int fieldstat_register_table(struct fieldstat_instance *instance, const char *na * @param tag_key Tag key array * @param tag_value Tag key array * @param n_tag size of tag_key[] and tag_value[] - * @return -1 is failed. 0 is success. + * @return metric id. -1 is failed. >=0 is success. */ struct metric_id_list fieldstat_register_table_metrics(struct fieldstat_instance * instance, int table_id, const char *line_name, const char *tag_key[], const char *tag_value[],size_t n_tag); /** @@ -149,7 +152,7 @@ void fieldstat_passive_output(struct fieldstat_instance *instance); * @param tag_value the array of tag value * @param n_tag the number of tags * @param quantiles the quantiles of summary output - * @return metric id: -1 is failed, > 0 is success + * @return metric id: -1 is failed, >= 0 is success * the output. */ int fieldstat_register_histogram(struct fieldstat_instance *instance, const char *field_name, const char *tag_key[], const char *tag_value[], size_t n_tag, @@ -163,7 +166,7 @@ int fieldstat_register_histogram(struct fieldstat_instance *instance, const char * @param tag_value the array of tag value * @param n_tag the number of tags * @param quantiles the quantiles of summary output - * @return metric id: -1 is failed, > 0 is success + * @return metric id: -1 is failed, >= 0 is success * the output. */ int fieldstat_register_summary(struct fieldstat_instance *instance, const char *field_name, const char *tag_key[], const char *tag_value[], size_t n_tag, |
