Skip to content

Commit

Permalink
cat: Make copy_labels function as public
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Hatake <[email protected]>
  • Loading branch information
cosmo0920 committed May 9, 2024
1 parent 48ca7d2 commit f0b16e9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions include/cmetrics/cmt_cat.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ struct cmt_untyped;
struct cmt_histogram;
struct cmt_summary;

int cmt_cat_copy_label_keys(struct cmt_map *map, char **out);
int cmt_cat_copy_map(struct cmt_opts *opts, struct cmt_map *dst, struct cmt_map *src);
int cmt_cat_counter(struct cmt *cmt, struct cmt_counter *counter, struct cmt_map *filtered_map);
int cmt_cat_gauge(struct cmt *cmt, struct cmt_gauge *gauge, struct cmt_map *filtered_map);
Expand Down
12 changes: 6 additions & 6 deletions src/cmt_cat.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <cmetrics/cmt_histogram.h>
#include <cmetrics/cmt_summary.h>

static int copy_label_keys(struct cmt_map *map, char **out)
int cmt_cat_copy_label_keys(struct cmt_map *map, char **out)
{
int i;
int s;
Expand Down Expand Up @@ -225,7 +225,7 @@ int cmt_cat_counter(struct cmt *cmt, struct cmt_counter *counter,
map = counter->map;
opts = map->opts;

ret = copy_label_keys(map, (char **) &labels);
ret = cmt_cat_copy_label_keys(map, (char **) &labels);
if (ret == -1) {
return -1;
}
Expand Down Expand Up @@ -269,7 +269,7 @@ int cmt_cat_gauge(struct cmt *cmt, struct cmt_gauge *gauge,
map = gauge->map;
opts = map->opts;

ret = copy_label_keys(map, (char **) &labels);
ret = cmt_cat_copy_label_keys(map, (char **) &labels);
if (ret == -1) {
return -1;
}
Expand Down Expand Up @@ -312,7 +312,7 @@ int cmt_cat_untyped(struct cmt *cmt, struct cmt_untyped *untyped,
map = untyped->map;
opts = map->opts;

ret = copy_label_keys(map, (char **) &labels);
ret = cmt_cat_copy_label_keys(map, (char **) &labels);
if (ret == -1) {
return -1;
}
Expand Down Expand Up @@ -361,7 +361,7 @@ int cmt_cat_histogram(struct cmt *cmt, struct cmt_histogram *histogram,
opts = map->opts;
timestamp = cmt_metric_get_timestamp(&map->metric);

ret = copy_label_keys(map, (char **) &labels);
ret = cmt_cat_copy_label_keys(map, (char **) &labels);
if (ret == -1) {
return -1;
}
Expand Down Expand Up @@ -415,7 +415,7 @@ int cmt_cat_summary(struct cmt *cmt, struct cmt_summary *summary,
opts = map->opts;
timestamp = cmt_metric_get_timestamp(&map->metric);

ret = copy_label_keys(map, (char **) &labels);
ret = cmt_cat_copy_label_keys(map, (char **) &labels);
if (ret == -1) {
return -1;
}
Expand Down

0 comments on commit f0b16e9

Please sign in to comment.