diff options
| author | chenzizhan <[email protected]> | 2024-04-16 15:40:09 +0800 |
|---|---|---|
| committer | chenzizhan <[email protected]> | 2024-04-16 15:40:09 +0800 |
| commit | bab8c29dc98dfa4515fffa077e0f234b541560f3 (patch) | |
| tree | 0344ea555f48ba2b08f4f9efa9e16b65a5158af2 /include/fieldstat/fieldstat_easy.h | |
| parent | d94c4d5ed20d5a88c03260169b31f0db46ab8c5a (diff) | |
can enable delta in fse active outputv4.5.6
Diffstat (limited to 'include/fieldstat/fieldstat_easy.h')
| -rw-r--r-- | include/fieldstat/fieldstat_easy.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/fieldstat/fieldstat_easy.h b/include/fieldstat/fieldstat_easy.h index 3cb9429..7403c3f 100644 --- a/include/fieldstat/fieldstat_easy.h +++ b/include/fieldstat/fieldstat_easy.h @@ -27,6 +27,17 @@ void fieldstat_easy_free(struct fieldstat_easy *fse); * @return: 0 if success, -1 if failed to open file. -2 if the output is already enabled. */ int fieldstat_easy_enable_auto_output(struct fieldstat_easy *pthis, const char *output_path, int interval_second); + +/* + affect the output of fieldstat_easy_output and fieldstat_easy_output_array. + let json exporter output delta value by the side of the original value(accumulated). If a cell / metric is new, the delta value is the same as the original value. + Outputting delta value is disabled by default. + When the fieldstat instance is reset, the delta value will be reset. (next output will be the original value) + Only affects the metrics of counter type. + Outputting delta value is time-consuming. Be cautious when enabling it. +*/ +void fieldstat_easy_enable_delta_in_active_output(struct fieldstat_easy *fse); + /* * @brief add a metric to the cube of cube_id. One metric may be associated with different cells. * @param metric_name: name of the metric. Cannot be NULL. Must be unique. |
