projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Run all changed files 68 8.c/1*.h through clang-format
[collectd.git]
/
src
/
utils
/
format_stackdriver
/
format_stackdriver.c
diff --git
a/src/utils/format_stackdriver/format_stackdriver.c
b/src/utils/format_stackdriver/format_stackdriver.c
index
80b85ae
..
ccb1c77
100644
(file)
--- a/
src/utils/format_stackdriver/format_stackdriver.c
+++ b/
src/utils/format_stackdriver/format_stackdriver.c
@@
-144,16
+144,16
@@
static int format_typed_value(yajl_gen gen, int ds_type, value_t v,
}
case DS_TYPE_DERIVE: {
derive_t diff = v.derive - (derive_t)start_value;
}
case DS_TYPE_DERIVE: {
derive_t diff = v.derive - (derive_t)start_value;
- snprintf(integer, sizeof(integer), "%" PRIi64, diff);
+ s
s
nprintf(integer, sizeof(integer), "%" PRIi64, diff);
break;
}
case DS_TYPE_COUNTER: {
counter_t diff = counter_diff((counter_t)start_value, v.counter);
break;
}
case DS_TYPE_COUNTER: {
counter_t diff = counter_diff((counter_t)start_value, v.counter);
- snprintf(integer, sizeof(integer), "%llu", diff);
+ s
s
nprintf(integer, sizeof(integer), "%llu", diff);
break;
}
case DS_TYPE_ABSOLUTE: {
break;
}
case DS_TYPE_ABSOLUTE: {
- snprintf(integer, sizeof(integer), "%" PRIu64, v.absolute);
+ s
s
nprintf(integer, sizeof(integer), "%" PRIu64, v.absolute);
break;
}
default: {
break;
}
default: {
@@
-177,7
+177,7
@@
static int format_typed_value(yajl_gen gen, int ds_type, value_t v,
* "CUMULATIVE",
* "GAUGE"
* )
* "CUMULATIVE",
* "GAUGE"
* )
-*/
+
*/
static int format_metric_kind(yajl_gen gen, int ds_type) {
switch (ds_type) {
case DS_TYPE_GAUGE:
static int format_metric_kind(yajl_gen gen, int ds_type) {
switch (ds_type) {
case DS_TYPE_GAUGE:
@@
-198,7
+198,7
@@
static int format_metric_kind(yajl_gen gen, int ds_type) {
* "DOUBLE",
* "INT64"
* )
* "DOUBLE",
* "INT64"
* )
-*/
+
*/
static int format_value_type(yajl_gen gen, int ds_type) {
return json_string(gen, (ds_type == DS_TYPE_GAUGE) ? "DOUBLE" : "INT64");
}
static int format_value_type(yajl_gen gen, int ds_type) {
return json_string(gen, (ds_type == DS_TYPE_GAUGE) ? "DOUBLE" : "INT64");
}
@@
-210,10
+210,10
@@
static int metric_type(char *buffer, size_t buffer_size, data_set_t const *ds,
#define GCM_PREFIX "custom.googleapis.com/collectd/"
if ((ds_index != 0) || strcmp("value", ds_name) != 0) {
#define GCM_PREFIX "custom.googleapis.com/collectd/"
if ((ds_index != 0) || strcmp("value", ds_name) != 0) {
- snprintf(buffer, buffer_size, GCM_PREFIX "%s/%s_%s", vl->plugin, vl->type,
- ds_name);
+ s
s
nprintf(buffer, buffer_size, GCM_PREFIX "%s/%s_%s", vl->plugin, vl->type,
+
ds_name);
} else {
} else {
- snprintf(buffer, buffer_size, GCM_PREFIX "%s/%s", vl->plugin, vl->type);
+ s
s
nprintf(buffer, buffer_size, GCM_PREFIX "%s/%s", vl->plugin, vl->type);
}
char const *whitelist = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
}
char const *whitelist = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
@@
-280,8
+280,8
@@
static int read_cumulative_state(data_set_t const *ds, value_list_t const *vl,
}
char start_value_key[DATA_MAX_NAME_LEN];
}
char start_value_key[DATA_MAX_NAME_LEN];
- snprintf(start_value_key, sizeof(start_value_key),
- "stackdriver:start_value[%d]", ds_index);
+ s
s
nprintf(start_value_key, sizeof(start_value_key),
+
"stackdriver:start_value[%d]", ds_index);
int status =
uc_meta_data_get_signed_int(vl, start_value_key, ret_start_value);
int status =
uc_meta_data_get_signed_int(vl, start_value_key, ret_start_value);