geopm 3.1.1.dev456+g3ba31824
GEOPM - Global Extensible Open Power Manager
Loading...
Searching...
No Matches
geopm_stats_collector.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2015 - 2024 Intel Corporation
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef GEOPM_STATS_COLLECTOR_H_INCLUDE
7#define GEOPM_STATS_COLLECTOR_H_INCLUDE
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12#include "geopm_public.h"
13#include "geopm_pio.h"
14#include <stddef.h>
15
16struct geopm_request_s;
17struct geopm_stats_collector_s;
18
26
37
42
50
68 geopm_stats_collector_create(size_t num_requests, const struct geopm_request_s *requests,
69 struct geopm_stats_collector_s **collector);
70
80 geopm_stats_collector_update(struct geopm_stats_collector_s *collector);
81
97 geopm_stats_collector_update_count(const struct geopm_stats_collector_s *collector,
98 size_t *update_count);
99
120int GEOPM_PUBLIC
121 geopm_stats_collector_report_yaml(const struct geopm_stats_collector_s *collector,
122 size_t *max_report_size, char *report_yaml);
123
124int GEOPM_PUBLIC
125 geopm_stats_collector_report(const struct geopm_stats_collector_s *collector,
126 size_t num_requests, struct geopm_report_s *report);
127
138int GEOPM_PUBLIC
139 geopm_stats_collector_reset(struct geopm_stats_collector_s *collector);
140
146int GEOPM_PUBLIC
147 geopm_stats_collector_free(struct geopm_stats_collector_s *collector);
148
149#ifdef __cplusplus
150}
151#endif
152#endif
#define GEOPM_NAME_MAX
String size limit for names.
Definition geopm_pio.h:22
#define GEOPM_PUBLIC
Definition geopm_public.h:10
geopm_metric_stats_e
Definition geopm_stats_collector.h:27
@ GEOPM_METRIC_MEAN
Definition geopm_stats_collector.h:33
@ GEOPM_METRIC_STD
Definition geopm_stats_collector.h:34
@ GEOPM_METRIC_MIN
Definition geopm_stats_collector.h:31
@ GEOPM_METRIC_LAST
Definition geopm_stats_collector.h:30
@ GEOPM_NUM_METRIC_STATS
Definition geopm_stats_collector.h:35
@ GEOPM_METRIC_COUNT
Definition geopm_stats_collector.h:28
@ GEOPM_METRIC_MAX
Definition geopm_stats_collector.h:32
@ GEOPM_METRIC_FIRST
Definition geopm_stats_collector.h:29
int GEOPM_PUBLIC geopm_stats_collector_create(size_t num_requests, const struct geopm_request_s *requests, struct geopm_stats_collector_s **collector)
Create a stats collector handle.
Definition StatsCollector.cpp:211
geopm_sample_stats_e
Definition geopm_stats_collector.h:19
@ GEOPM_SAMPLE_COUNT
Definition geopm_stats_collector.h:21
@ GEOPM_SAMPLE_PERIOD_MEAN
Definition geopm_stats_collector.h:22
@ GEOPM_NUM_SAMPLE_STATS
Definition geopm_stats_collector.h:24
@ GEOPM_SAMPLE_TIME_TOTAL
Definition geopm_stats_collector.h:20
@ GEOPM_SAMPLE_PERIOD_STD
Definition geopm_stats_collector.h:23
int GEOPM_PUBLIC geopm_stats_collector_reset(struct geopm_stats_collector_s *collector)
Reset statistics.
Definition StatsCollector.cpp:327
int GEOPM_PUBLIC geopm_stats_collector_update_count(const struct geopm_stats_collector_s *collector, size_t *update_count)
Number of updates since last reset.
Definition StatsCollector.cpp:239
int GEOPM_PUBLIC geopm_stats_collector_free(struct geopm_stats_collector_s *collector)
Release resources associated with collector handle.
Definition StatsCollector.cpp:340
int GEOPM_PUBLIC geopm_stats_collector_report(const struct geopm_stats_collector_s *collector, size_t num_requests, struct geopm_report_s *report)
Definition StatsCollector.cpp:284
int GEOPM_PUBLIC geopm_stats_collector_report_yaml(const struct geopm_stats_collector_s *collector, size_t *max_report_size, char *report_yaml)
Create a yaml report.
Definition StatsCollector.cpp:254
int GEOPM_PUBLIC geopm_stats_collector_update(struct geopm_stats_collector_s *collector)
Update a stat collector with new values.
Definition StatsCollector.cpp:226
Definition geopm_stats_collector.h:38
double stats[GEOPM_NUM_METRIC_STATS]
Definition geopm_stats_collector.h:40
char name[GEOPM_NAME_MAX]
Definition geopm_stats_collector.h:39
Definition geopm_stats_collector.h:43
size_t num_metric
Definition geopm_stats_collector.h:47
char sample_time_first[GEOPM_NAME_MAX]
Definition geopm_stats_collector.h:45
double sample_stats[GEOPM_NUM_SAMPLE_STATS]
Definition geopm_stats_collector.h:46
struct geopm_metric_stats_s * metric_stats
Definition geopm_stats_collector.h:48
char host[GEOPM_NAME_MAX]
Definition geopm_stats_collector.h:44
Definition geopm_pio.h:387