MySQL 26.7.0
Source Code Documentation
srv0monitoring_interface.h
Go to the documentation of this file.
1/* Copyright (c) 2022, 2026, Oracle and/or its affiliates.
2
3This program is free software; you can redistribute it and/or modify it under
4the terms of the GNU General Public License, version 2.0, as published by the
5Free Software Foundation.
6
7This program is designed to work with certain software (including
8but not limited to OpenSSL) that is licensed under separate terms,
9as designated in a particular file or component or in included license
10documentation. The authors of MySQL hereby grant you an additional
11permission to link the program and your derivative works with the
12separately licensed software that they have either included with
13the program or referenced in the documentation.
14
15This program is distributed in the hope that it will be useful, but WITHOUT
16ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
18for more details.
19
20You should have received a copy of the GNU General Public License along with
21this program; if not, write to the Free Software Foundation, Inc.,
2251 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23*/
24#pragma once
25#include <optional>
26#include "srv0mon.h" /*mon_type_t, mon_id_t*/
27namespace ib {
28
29/** Interface for repoting values of some INFORMATION_SCHEMA.INNODB_METRICS */
31 public:
32 /** Default destructor */
33 virtual ~Monitoring_interface() = default;
34
35 /** Returns the value of given Innodb-specific monitor by id or std::nullopt
36 if not supported.
37 @param[in] id The id of the monitor
38 @return The value for that monitor, or std::nullopt if not supported by
39 implementation.
40 */
41 [[nodiscard]] virtual std::optional<mon_type_t> get_value(
42 monitor_id_t id) = 0;
43};
44
45} // namespace ib
Interface for repoting values of some INFORMATION_SCHEMA.INNODB_METRICS.
Definition: srv0monitoring_interface.h:30
virtual ~Monitoring_interface()=default
Default destructor.
virtual std::optional< mon_type_t > get_value(monitor_id_t id)=0
Returns the value of given Innodb-specific monitor by id or std::nullopt if not supported.
Definition: fil0fil.cc:1392
Server monitor counter related defines.
monitor_id_t
This enumeration defines internal monitor identifier used internally to identify each particular coun...
Definition: srv0mon.h:133