MySQL 9.1.0
Source Code Documentation
mysql_server_telemetry_metrics_service_imp.h
Go to the documentation of this file.
1/* Copyright (c) 2022, 2024, Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is designed to work with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have either included with
13 the program or referenced in the documentation.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef MYSQL_SERVER_TELEMETRY_METRICS_SERVICE_IMP_H
25#define MYSQL_SERVER_TELEMETRY_METRICS_SERVICE_IMP_H
26
29#include <mysql/plugin.h>
30
31/**
32 @file storage/perfschema/mysql_server_telemetry_metrics_service_imp.h
33 The performance schema implementation of server telemetry metrics service.
34*/
35extern SERVICE_TYPE(mysql_server_telemetry_metrics_v1)
36 SERVICE_IMPLEMENTATION(performance_schema,
37 mysql_server_telemetry_metrics_v1);
38
41
46 my_h_string *out_name_handle);
48 unsigned int &value);
51 my_h_string *out_desc_handle);
52
53bool imp_metrics_iterator_create(const char *meter,
54 telemetry_metrics_iterator *out_iterator);
58 my_h_string *out_group_handle);
60 my_h_string *out_name_handle);
62 my_h_string *out_desc_handle);
64 my_h_string *out_unit_handle);
68 MetricOTELType &metric_type);
71 void *delivery_context);
73 measurement_callback_t &callback,
74 void *&measurement_context);
75
78
79#endif /* MYSQL_SERVER_TELEMETRY_METRICS_SERVICE_IMP_H */
bool imp_metric_get_metric_type(telemetry_metrics_iterator iterator, MetricOTELType &metric_type)
Definition: mysql_server_telemetry_metrics_service_imp.cc:595
bool imp_meters_iterator_create(telemetry_meters_iterator *out_iterator)
Definition: mysql_server_telemetry_metrics_service_imp.cc:277
bool imp_metric_get_numeric_type(telemetry_metrics_iterator iterator, MetricNumType &numeric)
Definition: mysql_server_telemetry_metrics_service_imp.cc:574
bool imp_meters_get_description(telemetry_meters_iterator iterator, my_h_string *out_desc_handle)
Definition: mysql_server_telemetry_metrics_service_imp.cc:389
bool imp_metrics_get_unit(telemetry_metrics_iterator iterator, my_h_string *out_unit_handle)
Definition: mysql_server_telemetry_metrics_service_imp.cc:548
bool imp_metrics_get_name(telemetry_metrics_iterator iterator, my_h_string *out_name_handle)
Definition: mysql_server_telemetry_metrics_service_imp.cc:490
bool imp_meters_iterator_next(telemetry_meters_iterator iterator)
Definition: mysql_server_telemetry_metrics_service_imp.cc:306
void cleanup_mysql_server_telemetry_metrics_service()
Definition: mysql_server_telemetry_metrics_service_imp.cc:271
bool imp_meters_get_enabled(telemetry_meters_iterator iterator, bool &enabled)
Definition: mysql_server_telemetry_metrics_service_imp.cc:369
bool imp_metrics_iterator_destroy(telemetry_metrics_iterator iterator)
Definition: mysql_server_telemetry_metrics_service_imp.cc:435
bool imp_metrics_get_value(telemetry_metrics_iterator iterator, measurement_delivery_callback_t delivery, void *delivery_context)
Definition: mysql_server_telemetry_metrics_service_imp.cc:616
bool imp_meters_get_frequency(telemetry_meters_iterator iterator, unsigned int &value)
Definition: mysql_server_telemetry_metrics_service_imp.cc:348
bool imp_meters_iterator_destroy(telemetry_meters_iterator iterator)
Definition: mysql_server_telemetry_metrics_service_imp.cc:294
bool imp_measurement_start()
Definition: mysql_server_telemetry_metrics_service_imp.cc:665
bool imp_metrics_get_description(telemetry_metrics_iterator iterator, my_h_string *out_desc_handle)
Definition: mysql_server_telemetry_metrics_service_imp.cc:518
bool imp_measurement_end()
Definition: mysql_server_telemetry_metrics_service_imp.cc:674
bool imp_metrics_iterator_next(telemetry_metrics_iterator iterator)
Definition: mysql_server_telemetry_metrics_service_imp.cc:447
bool imp_metrics_get_group(telemetry_metrics_iterator iterator, my_h_string *out_group_handle)
Definition: mysql_server_telemetry_metrics_service_imp.cc:463
bool imp_metrics_get_callback(telemetry_metrics_iterator iterator, measurement_callback_t &callback, void *&measurement_context)
Definition: mysql_server_telemetry_metrics_service_imp.cc:642
const mysql_service_mysql_server_telemetry_metrics_v1_t SERVICE_IMPLEMENTATION(performance_schema, mysql_server_telemetry_metrics_v1)
bool imp_meters_get_name(telemetry_meters_iterator iterator, my_h_string *out_name_handle)
Definition: mysql_server_telemetry_metrics_service_imp.cc:322
bool imp_metrics_iterator_create(const char *meter, telemetry_metrics_iterator *out_iterator)
Definition: mysql_server_telemetry_metrics_service_imp.cc:416
void initialize_mysql_server_telemetry_metrics_service()
Definition: mysql_server_telemetry_metrics_service_imp.cc:264
constexpr value_type numeric
Definition: classic_protocol_constants.h:282
static PSI_meter_info_v1 meter[]
Definition: plugin.cc:96
MetricOTELType
Definition: psi_metric_bits.h:32
MetricNumType
Definition: psi_metric_bits.h:38
void(* measurement_callback_t)(void *measurement_context, measurement_delivery_callback_t delivery, void *delivery_context)
Single metric measurement callback can return multiple measurement values.
Definition: psi_metric_bits.h:97
required bool enabled
Definition: replication_group_member_actions.proto:33
struct telemetry_metrics_iterator_imp * telemetry_metrics_iterator
Definition: server_telemetry_metrics_bits.h:35
struct telemetry_meters_iterator_imp * telemetry_meters_iterator
Definition: server_telemetry_metrics_bits.h:34
#define SERVICE_TYPE(name)
Generates the standard Service type name.
Definition: service.h:76
Definition: psi_metric_bits.h:77
Definition: mysql_string_service.cc:60