3 * Copyright (c) 2020 Samsung Electronics Co., Ltd
5 * Permission is hereby granted, free of charge, to any person obtaining a copy
6 * of this software and associated documentation files (the "Software"), to deal
7 * in the Software without restriction, including without limitation the rights
8 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
9 * of the Software, and to permit persons to whom the Software is furnished to do
10 * so, subject to the following conditions:
12 * The above copyright notice and this permission notice shall be included in all
13 * copies or substantial portions of the Software.
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27 struct metrics *metrics_create(void);
28 void metrics_destroy(struct metrics *);
30 bool metrics_add_log(struct metrics *, const dlogutil_entry_s *);
35 int count[DLOG_PRIO_MAX];
38 struct metrics_info *metrics_get_info(const struct metrics *, int *count);
39 int metrics_get_total(const struct metrics *m);
40 void metrics_clear(struct metrics *m);
42 int metrics_sort_by_pid_first(const void *vlhs, const void *vrhs);
43 int metrics_sort_by_tag_first(const void *vlhs, const void *vrhs);