Ice 3.8
C++ API Reference
Loading...
Searching...
No Matches
Metrics.h
1// Copyright (c) ZeroC, Inc.
2
3// slice2cpp version 3.8.0
4// <auto-generated>Generated from Slice file 'Metrics.ice'.</auto-generated>
5// clang-format off
6
7#ifndef Ice_Metrics_h_
8#define Ice_Metrics_h_
9
11#include <Ice/Ice.h>
12#include "BuiltinSequences.h"
13
14#ifndef ICE_DISABLE_VERSION
15# if ICE_INT_VERSION / 100 != 308
16# error Ice version mismatch!
17# endif
18# if ICE_INT_VERSION % 100 >= 50
19# error Beta header file detected
20# endif
21# if ICE_INT_VERSION % 100 < 0
22# error Ice patch level mismatch!
23# endif
24#endif
25
26// NOLINTBEGIN(modernize-concat-nested-namespaces)
27
28/// The Ice Management eXtension facility.
29namespace IceMX
30{
31 /// A dictionary of strings to integers.
32 using StringIntDict = std::map<std::string, std::int32_t>;
33
34 class Metrics;
35
36 /// A shared pointer to a Metrics.
37 using MetricsPtr = std::shared_ptr<Metrics>;
38
39 struct MetricsFailures;
40
41 /// A sequence of MetricsFailures.
42 using MetricsFailuresSeq = std::vector<MetricsFailures>;
43
44 /// A sequence of metrics.
45 /// @remarks We use a sequence here instead of a map because the ID of the metrics is already included in the Metrics
46 /// class and using sequences of metrics objects is more efficient than using dictionaries since lookups are not
47 /// necessary.
48 using MetricsMap = std::vector<MetricsPtr>;
49
50 /// A metrics view is a dictionary of metrics maps. The key of the dictionary is the name of the metrics map.
51 using MetricsView = std::map<std::string, MetricsMap>;
52
53 class MetricsAdminPrx;
54
55 class ThreadMetrics;
56
57 /// A shared pointer to a ThreadMetrics.
58 using ThreadMetricsPtr = std::shared_ptr<ThreadMetrics>;
59
60 class DispatchMetrics;
61
62 /// A shared pointer to a DispatchMetrics.
63 using DispatchMetricsPtr = std::shared_ptr<DispatchMetrics>;
64
66
67 /// A shared pointer to a ChildInvocationMetrics.
68 using ChildInvocationMetricsPtr = std::shared_ptr<ChildInvocationMetrics>;
69
71
72 /// A shared pointer to a CollocatedMetrics.
73 using CollocatedMetricsPtr = std::shared_ptr<CollocatedMetrics>;
74
75 class RemoteMetrics;
76
77 /// A shared pointer to a RemoteMetrics.
78 using RemoteMetricsPtr = std::shared_ptr<RemoteMetrics>;
79
81
82 /// A shared pointer to an InvocationMetrics.
83 using InvocationMetricsPtr = std::shared_ptr<InvocationMetrics>;
84
86
87 /// A shared pointer to a ConnectionMetrics.
88 using ConnectionMetricsPtr = std::shared_ptr<ConnectionMetrics>;
89}
90
91namespace IceMX
92{
93 /// The metrics administrative facet interface. This interface allows remote administrative clients to access the
94 /// metrics of an application that enabled the Ice administrative facility and configured one or more metrics views.
95 /// @remarks The Slice compiler generated this proxy class from Slice interface `::IceMX::MetricsAdmin`.
96 /// @headerfile Ice/Ice.h
97 class ICE_API MetricsAdminPrx : public Ice::Proxy<MetricsAdminPrx, Ice::ObjectPrx>
98 {
99 public:
100 /// Constructs a proxy from a Communicator and a proxy string.
101 /// @param communicator The communicator of the new proxy.
102 /// @param proxyString The proxy string to parse.
103 MetricsAdminPrx(const Ice::CommunicatorPtr& communicator, std::string_view proxyString) : Ice::ObjectPrx{communicator, proxyString} {} // NOLINT(modernize-use-equals-default)
104
105 /// Copy constructor. Constructs with a copy of the contents of @p other.
106 /// @param other The proxy to copy from.
107 MetricsAdminPrx(const MetricsAdminPrx& other) noexcept : Ice::ObjectPrx{other} {} // NOLINT(modernize-use-equals-default)
108
109 /// Move constructor. Constructs a proxy with the contents of @p other using move semantics.
110 /// @param other The proxy to move from.
111 MetricsAdminPrx(MetricsAdminPrx&& other) noexcept : Ice::ObjectPrx{std::move(other)} {} // NOLINT(modernize-use-equals-default)
112
113 ~MetricsAdminPrx() override;
114
115 /// Copy assignment operator. Replaces the contents of this proxy with a copy of the contents of @p rhs.
116 /// @param rhs The proxy to copy from.
117 /// @return A reference to this proxy.
119 {
120 if (this != &rhs)
121 {
123 }
124 return *this;
125 }
126
127 /// Move assignment operator. Replaces the contents of this proxy with the contents of @p rhs using move semantics.
128 /// @param rhs The proxy to move from.
130 {
131 if (this != &rhs)
132 {
133 Ice::ObjectPrx::operator=(std::move(rhs));
134 }
135 return *this;
136 }
137
138 /// Gets the names of enabled and disabled metrics.
139 /// @param[out] disabledViews The names of the disabled views.
140 /// @param context The request context.
141 /// @return The names of the enabled views.
143
144 /// Gets the names of enabled and disabled metrics.
145 /// @param context The request context.
146 /// @return A future that becomes available when the invocation completes. This future holds:
147 /// - `returnValue` The names of the enabled views.
148 /// - `disabledViews` The names of the disabled views.
149 [[nodiscard]] std::future<std::tuple<::Ice::StringSeq, ::Ice::StringSeq>> getMetricsViewNamesAsync(const Ice::Context& context = Ice::noExplicitContext) const;
150
151 /// Gets the names of enabled and disabled metrics.
152 /// @param response The response callback. It accepts:
153 /// - `returnValue` The names of the enabled views.
154 /// - `disabledViews` The names of the disabled views.
155 /// @param exception The exception callback.
156 /// @param sent The sent callback.
157 /// @param context The request context.
158 /// @return A function that can be called to cancel the invocation locally.
159 // NOLINTNEXTLINE(modernize-use-nodiscard)
160 std::function<void()> getMetricsViewNamesAsync(std::function<void(::Ice::StringSeq, ::Ice::StringSeq)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
161
162 /// @private
163 void _iceI_getMetricsViewNames(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::tuple<::Ice::StringSeq, ::Ice::StringSeq>>>&, const Ice::Context&) const;
164
165 /// Enables a metrics view.
166 /// @param name The metrics view name.
167 /// @param context The request context.
168 /// @throws IceMX::UnknownMetricsView Thrown when the metrics view cannot be found.
169 void enableMetricsView(std::string_view name, const Ice::Context& context = Ice::noExplicitContext) const;
170
171 /// Enables a metrics view.
172 /// @param name The metrics view name.
173 /// @param context The request context.
174 /// @return A future that becomes available when the invocation completes.
175 [[nodiscard]] std::future<void> enableMetricsViewAsync(std::string_view name, const Ice::Context& context = Ice::noExplicitContext) const;
176
177 /// Enables a metrics view.
178 /// @param name The metrics view name.
179 /// @param response The response callback.
180 /// @param exception The exception callback.
181 /// @param sent The sent callback.
182 /// @param context The request context.
183 /// @return A function that can be called to cancel the invocation locally.
184 // NOLINTNEXTLINE(modernize-use-nodiscard)
185 std::function<void()> enableMetricsViewAsync(std::string_view name, std::function<void()> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
186
187 /// @private
188 void _iceI_enableMetricsView(const std::shared_ptr<IceInternal::OutgoingAsyncT<void>>&, std::string_view, const Ice::Context&) const;
189
190 /// Disables a metrics view.
191 /// @param name The metrics view name.
192 /// @param context The request context.
193 /// @throws IceMX::UnknownMetricsView Thrown when the metrics view cannot be found.
194 void disableMetricsView(std::string_view name, const Ice::Context& context = Ice::noExplicitContext) const;
195
196 /// Disables a metrics view.
197 /// @param name The metrics view name.
198 /// @param context The request context.
199 /// @return A future that becomes available when the invocation completes.
200 [[nodiscard]] std::future<void> disableMetricsViewAsync(std::string_view name, const Ice::Context& context = Ice::noExplicitContext) const;
201
202 /// Disables a metrics view.
203 /// @param name The metrics view name.
204 /// @param response The response callback.
205 /// @param exception The exception callback.
206 /// @param sent The sent callback.
207 /// @param context The request context.
208 /// @return A function that can be called to cancel the invocation locally.
209 // NOLINTNEXTLINE(modernize-use-nodiscard)
210 std::function<void()> disableMetricsViewAsync(std::string_view name, std::function<void()> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
211
212 /// @private
213 void _iceI_disableMetricsView(const std::shared_ptr<IceInternal::OutgoingAsyncT<void>>&, std::string_view, const Ice::Context&) const;
214
215 /// Gets the metrics objects for the given metrics view.
216 /// @param view The name of the metrics view.
217 /// @param[out] timestamp The local time of the process when the metrics objects were retrieved.
218 /// @param context The request context.
219 /// @return The metrics view data, a dictionary of metric maps for each metrics class configured with the view.
220 /// The @p timestamp allows the client to compute averages which are not dependent of the invocation latency for
221 /// this operation.
222 /// @throws IceMX::UnknownMetricsView Thrown when the metrics view cannot be found.
223 MetricsView getMetricsView(std::string_view view, std::int64_t& timestamp, const Ice::Context& context = Ice::noExplicitContext) const;
224
225 /// Gets the metrics objects for the given metrics view.
226 /// @param view The name of the metrics view.
227 /// @param context The request context.
228 /// @return A future that becomes available when the invocation completes. This future holds:
229 /// - `returnValue` The metrics view data, a dictionary of metric maps for each metrics class configured with the view.
230 /// The @p timestamp allows the client to compute averages which are not dependent of the invocation latency for
231 /// this operation.
232 /// - `timestamp` The local time of the process when the metrics objects were retrieved.
233 [[nodiscard]] std::future<std::tuple<MetricsView, std::int64_t>> getMetricsViewAsync(std::string_view view, const Ice::Context& context = Ice::noExplicitContext) const;
234
235 /// Gets the metrics objects for the given metrics view.
236 /// @param view The name of the metrics view.
237 /// @param response The response callback. It accepts:
238 /// - `returnValue` The metrics view data, a dictionary of metric maps for each metrics class configured with the view.
239 /// The @p timestamp allows the client to compute averages which are not dependent of the invocation latency for
240 /// this operation.
241 /// - `timestamp` The local time of the process when the metrics objects were retrieved.
242 /// @param exception The exception callback.
243 /// @param sent The sent callback.
244 /// @param context The request context.
245 /// @return A function that can be called to cancel the invocation locally.
246 // NOLINTNEXTLINE(modernize-use-nodiscard)
247 std::function<void()> getMetricsViewAsync(std::string_view view, std::function<void(::IceMX::MetricsView, std::int64_t)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
248
249 /// @private
250 void _iceI_getMetricsView(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::tuple<MetricsView, std::int64_t>>>&, std::string_view, const Ice::Context&) const;
251
252 /// Gets the metrics failures associated with the given @p view and @p map.
253 /// @param view The name of the metrics view.
254 /// @param map The name of the metrics map.
255 /// @param context The request context.
256 /// @return The metrics failures associated with the map.
257 /// @throws IceMX::UnknownMetricsView Thrown when the metrics view cannot be found.
258 MetricsFailuresSeq getMapMetricsFailures(std::string_view view, std::string_view map, const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
259
260 /// Gets the metrics failures associated with the given @p view and @p map.
261 /// @param view The name of the metrics view.
262 /// @param map The name of the metrics map.
263 /// @param context The request context.
264 /// @return A future that becomes available when the invocation completes. This future holds:
265 /// - The metrics failures associated with the map.
266 [[nodiscard]] std::future<MetricsFailuresSeq> getMapMetricsFailuresAsync(std::string_view view, std::string_view map, const Ice::Context& context = Ice::noExplicitContext) const;
267
268 /// Gets the metrics failures associated with the given @p view and @p map.
269 /// @param view The name of the metrics view.
270 /// @param map The name of the metrics map.
271 /// @param response The response callback. It accepts:
272 /// - The metrics failures associated with the map.
273 /// @param exception The exception callback.
274 /// @param sent The sent callback.
275 /// @param context The request context.
276 /// @return A function that can be called to cancel the invocation locally.
277 // NOLINTNEXTLINE(modernize-use-nodiscard)
278 std::function<void()> getMapMetricsFailuresAsync(std::string_view view, std::string_view map, std::function<void(::IceMX::MetricsFailuresSeq)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
279
280 /// @private
281 void _iceI_getMapMetricsFailures(const std::shared_ptr<IceInternal::OutgoingAsyncT<MetricsFailuresSeq>>&, std::string_view, std::string_view, const Ice::Context&) const;
282
283 /// Gets the metrics failure associated for the given metrics.
284 /// @param view The name of the metrics view.
285 /// @param map The name of the metrics map.
286 /// @param id The ID of the metrics.
287 /// @param context The request context.
288 /// @return The metrics failures associated with the metrics.
289 /// @throws IceMX::UnknownMetricsView Thrown when the metrics view cannot be found.
290 MetricsFailures getMetricsFailures(std::string_view view, std::string_view map, std::string_view id, const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
291
292 /// Gets the metrics failure associated for the given metrics.
293 /// @param view The name of the metrics view.
294 /// @param map The name of the metrics map.
295 /// @param id The ID of the metrics.
296 /// @param context The request context.
297 /// @return A future that becomes available when the invocation completes. This future holds:
298 /// - The metrics failures associated with the metrics.
299 [[nodiscard]] std::future<MetricsFailures> getMetricsFailuresAsync(std::string_view view, std::string_view map, std::string_view id, const Ice::Context& context = Ice::noExplicitContext) const;
300
301 /// Gets the metrics failure associated for the given metrics.
302 /// @param view The name of the metrics view.
303 /// @param map The name of the metrics map.
304 /// @param id The ID of the metrics.
305 /// @param response The response callback. It accepts:
306 /// - The metrics failures associated with the metrics.
307 /// @param exception The exception callback.
308 /// @param sent The sent callback.
309 /// @param context The request context.
310 /// @return A function that can be called to cancel the invocation locally.
311 // NOLINTNEXTLINE(modernize-use-nodiscard)
312 std::function<void()> getMetricsFailuresAsync(std::string_view view, std::string_view map, std::string_view id, std::function<void(::IceMX::MetricsFailures)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
313
314 /// @private
315 void _iceI_getMetricsFailures(const std::shared_ptr<IceInternal::OutgoingAsyncT<MetricsFailures>>&, std::string_view, std::string_view, std::string_view, const Ice::Context&) const;
316
317 /// Gets the type ID of the associated Slice interface.
318 /// @return The string `"::IceMX::MetricsAdmin"`.
319 static const char* ice_staticId() noexcept;
320
321 /// @private
322 static MetricsAdminPrx _fromReference(IceInternal::ReferencePtr ref) { return MetricsAdminPrx{std::move(ref)}; }
323
324 protected:
325 /// @private
326 MetricsAdminPrx() = default;
327
328 /// @private
329 explicit MetricsAdminPrx(IceInternal::ReferencePtr&& ref) : Ice::ObjectPrx{std::move(ref)}
330 {
331 }
332 };
333}
334
335namespace IceMX
336{
337 /// The base class for metrics. A metrics object represents a collection of measurements associated to a given a
338 /// system.
339 /// @remarks The Slice compiler generated this class from Slice class `::IceMX::Metrics`.
340 /// @headerfile Ice/Ice.h
341 class ICE_API Metrics : public Ice::Value
342 {
343 public:
344 /// Default constructor.
345 Metrics() noexcept = default;
346
347 /// One-shot constructor to initialize all data members.
348 /// @param id The metrics identifier.
349 /// @param total The total number of objects observed by this metrics.
350 /// @param current The number of objects currently observed by this metrics.
351 /// @param totalLifetime The sum of the lifetime of each observed objects.
352 /// @param failures The number of failures observed.
353 Metrics(std::string id, std::int64_t total, std::int32_t current, std::int64_t totalLifetime, std::int32_t failures) noexcept :
354 id(std::move(id)),
355 total(total),
359 {
360 }
361
362 /// Gets the type ID of the associated Slice class.
363 /// @return The string `"::IceMX::Metrics"`.
364 static const char* ice_staticId() noexcept;
365
366 [[nodiscard]] const char* ice_id() const noexcept override;
367
368 /// Creates a tuple with all the fields of this class.
369 /// @return A tuple with all the fields of this class.
370 [[nodiscard]] std::tuple<const std::string&, const std::int64_t&, const std::int32_t&, const std::int64_t&, const std::int32_t&> ice_tuple() const
371 {
372 return std::tie(id, total, current, totalLifetime, failures);
373 }
374
375 /// Creates a shallow polymorphic copy of this instance.
376 /// @return The cloned value.
377 [[nodiscard]] MetricsPtr ice_clone() const { return std::static_pointer_cast<Metrics>(_iceCloneImpl()); }
378
379 void ice_printFields(std::ostream& os) const override;
380
381 /// The metrics identifier.
382 std::string id;
383
384 /// The total number of objects observed by this metrics. This includes the number of currently observed objects
385 /// and the number of objects observed in the past.
386 std::int64_t total{INT64_C(0)};
387
388 /// The number of objects currently observed by this metrics.
389 std::int32_t current{0};
390
391 /// The sum of the lifetime of each observed objects. This does not include the lifetime of objects which are
392 /// currently observed, only the objects observed in the past.
393 std::int64_t totalLifetime{INT64_C(0)};
394
395 /// The number of failures observed.
396 std::int32_t failures{0};
397
398 protected:
399 /// Copy constructor.
400 Metrics(const Metrics&) = default;
401
402 /// @private
403 [[nodiscard]] Ice::ValuePtr _iceCloneImpl() const override;
404
405 /// @private
406 void _iceWriteImpl(Ice::OutputStream*) const override;
407
408 /// @private
409 void _iceReadImpl(Ice::InputStream*) override;
410 };
411
412 /// Keeps track of metrics failures.
413 /// @remarks The Slice compiler generated this struct from Slice struct `::IceMX::MetricsFailures`.
414 /// @headerfile Ice/Ice.h
416 {
417 /// The identifier of the metrics object associated to the failures.
418 std::string id;
419
420 /// The failures observed for this metrics.
422
423 /// Creates a tuple with all the fields of this struct.
424 /// @return A tuple with all the fields of this struct.
425 [[nodiscard]] std::tuple<const std::string&, const ::IceMX::StringIntDict&> ice_tuple() const
426 {
427 return std::tie(id, failures);
428 }
429
430 /// Outputs the name and value of each field of this instance to the stream.
431 /// @param os The output stream.
432 ICE_API void ice_printFields(std::ostream& os) const;
433 };
434
435 /// Outputs the description of a MetricsFailures to a stream, including all its fields.
436 /// @param os The output stream.
437 /// @param value The instance to output.
438 /// @return The output stream.
439 ICE_API std::ostream& operator<<(std::ostream& os, const MetricsFailures& value);
440
441 /// The exception that is thrown when a metrics view cannot be found.
442 /// @remarks The Slice compiler generated this exception class from Slice exception `::IceMX::UnknownMetricsView`.
443 /// @headerfile Ice/Ice.h
445 {
446 public:
447 /// Gets the type ID of the associated Slice exception.
448 /// @return The string `"::IceMX::UnknownMetricsView"`.
449 static const char* ice_staticId() noexcept;
450
451 [[nodiscard]] const char* ice_id() const noexcept override;
452
453 void ice_throw() const override;
454
455 protected:
456 /// @private
457 void _writeImpl(Ice::OutputStream*) const override;
458
459 /// @private
460 void _readImpl(Ice::InputStream*) override;
461 };
462
463 /// Provides information on the number of threads currently in use and their activity.
464 /// @remarks The Slice compiler generated this class from Slice class `::IceMX::ThreadMetrics`.
465 /// @headerfile Ice/Ice.h
466 class ICE_API ThreadMetrics : public Metrics
467 {
468 public:
469 /// Default constructor.
470 ThreadMetrics() noexcept = default;
471
472 /// One-shot constructor to initialize all data members.
473 /// @param id The metrics identifier.
474 /// @param total The total number of objects observed by this metrics.
475 /// @param current The number of objects currently observed by this metrics.
476 /// @param totalLifetime The sum of the lifetime of each observed objects.
477 /// @param failures The number of failures observed.
478 /// @param inUseForIO The number of threads which are currently performing socket reads or writes.
479 /// @param inUseForUser The number of threads which are currently calling user code (servant dispatch, AMI callbacks, etc).
480 /// @param inUseForOther The number of threads which are currently performing other activities such as DNS lookups, garbage collection, etc.
481 ThreadMetrics(std::string id, std::int64_t total, std::int32_t current, std::int64_t totalLifetime, std::int32_t failures, std::int32_t inUseForIO, std::int32_t inUseForUser, std::int32_t inUseForOther) noexcept :
482 Metrics(std::move(id), total, current, totalLifetime, failures),
486 {
487 }
488
489 /// Gets the type ID of the associated Slice class.
490 /// @return The string `"::IceMX::ThreadMetrics"`.
491 static const char* ice_staticId() noexcept;
492
493 [[nodiscard]] const char* ice_id() const noexcept override;
494
495 /// Creates a tuple with all the fields of this class.
496 /// @return A tuple with all the fields of this class.
497 [[nodiscard]] std::tuple<const std::string&, const std::int64_t&, const std::int32_t&, const std::int64_t&, const std::int32_t&, const std::int32_t&, const std::int32_t&, const std::int32_t&> ice_tuple() const
498 {
500 }
501
502 /// Creates a shallow polymorphic copy of this instance.
503 /// @return The cloned value.
504 [[nodiscard]] ThreadMetricsPtr ice_clone() const { return std::static_pointer_cast<ThreadMetrics>(_iceCloneImpl()); }
505
506 void ice_printFields(std::ostream& os) const override;
507
508 /// The number of threads which are currently performing socket reads or writes.
509 std::int32_t inUseForIO{0};
510
511 /// The number of threads which are currently calling user code (servant dispatch, AMI callbacks, etc).
512 std::int32_t inUseForUser{0};
513
514 /// The number of threads which are currently performing other activities such as DNS lookups, garbage
515 /// collection, etc. These are all the other threads created by the Ice runtime that are not counted in
516 /// ::IceMX::ThreadMetrics#inUseForUser or ::IceMX::ThreadMetrics#inUseForIO.
517 std::int32_t inUseForOther{0};
518
519 protected:
520 /// Copy constructor.
521 ThreadMetrics(const ThreadMetrics&) = default;
522
523 /// @private
524 [[nodiscard]] Ice::ValuePtr _iceCloneImpl() const override;
525
526 /// @private
527 void _iceWriteImpl(Ice::OutputStream*) const override;
528
529 /// @private
530 void _iceReadImpl(Ice::InputStream*) override;
531 };
532
533 /// Provides information on servant dispatches.
534 /// @remarks The Slice compiler generated this class from Slice class `::IceMX::DispatchMetrics`.
535 /// @headerfile Ice/Ice.h
536 class ICE_API DispatchMetrics : public Metrics
537 {
538 public:
539 /// Default constructor.
540 DispatchMetrics() noexcept = default;
541
542 /// One-shot constructor to initialize all data members.
543 /// @param id The metrics identifier.
544 /// @param total The total number of objects observed by this metrics.
545 /// @param current The number of objects currently observed by this metrics.
546 /// @param totalLifetime The sum of the lifetime of each observed objects.
547 /// @param failures The number of failures observed.
548 /// @param userException The number of dispatches that failed with a user exception.
549 /// @param size The size of the incoming requests.
550 /// @param replySize The size of the replies.
551 DispatchMetrics(std::string id, std::int64_t total, std::int32_t current, std::int64_t totalLifetime, std::int32_t failures, std::int32_t userException, std::int64_t size, std::int64_t replySize) noexcept :
552 Metrics(std::move(id), total, current, totalLifetime, failures),
554 size(size),
556 {
557 }
558
559 /// Gets the type ID of the associated Slice class.
560 /// @return The string `"::IceMX::DispatchMetrics"`.
561 static const char* ice_staticId() noexcept;
562
563 [[nodiscard]] const char* ice_id() const noexcept override;
564
565 /// Creates a tuple with all the fields of this class.
566 /// @return A tuple with all the fields of this class.
567 [[nodiscard]] std::tuple<const std::string&, const std::int64_t&, const std::int32_t&, const std::int64_t&, const std::int32_t&, const std::int32_t&, const std::int64_t&, const std::int64_t&> ice_tuple() const
568 {
570 }
571
572 /// Creates a shallow polymorphic copy of this instance.
573 /// @return The cloned value.
574 [[nodiscard]] DispatchMetricsPtr ice_clone() const { return std::static_pointer_cast<DispatchMetrics>(_iceCloneImpl()); }
575
576 void ice_printFields(std::ostream& os) const override;
577
578 /// The number of dispatches that failed with a user exception.
579 std::int32_t userException{0};
580
581 /// The size of the incoming requests. This corresponds to the size of the marshaled input parameters.
582 std::int64_t size{INT64_C(0)};
583
584 /// The size of the replies. This corresponds to the size of the marshaled output and return parameters.
585 std::int64_t replySize{INT64_C(0)};
586
587 protected:
588 /// Copy constructor.
590
591 /// @private
592 [[nodiscard]] Ice::ValuePtr _iceCloneImpl() const override;
593
594 /// @private
595 void _iceWriteImpl(Ice::OutputStream*) const override;
596
597 /// @private
598 void _iceReadImpl(Ice::InputStream*) override;
599 };
600
601 /// Provides information on child invocations. A child invocation is either remote (sent over an Ice connection) or
602 /// collocated. An invocation can have multiple child invocations if it is retried. Child invocation metrics are
603 /// embedded within InvocationMetrics.
604 /// @remarks The Slice compiler generated this class from Slice class `::IceMX::ChildInvocationMetrics`.
605 /// @headerfile Ice/Ice.h
606 class ICE_API ChildInvocationMetrics : public Metrics
607 {
608 public:
609 /// Default constructor.
610 ChildInvocationMetrics() noexcept = default;
611
612 /// One-shot constructor to initialize all data members.
613 /// @param id The metrics identifier.
614 /// @param total The total number of objects observed by this metrics.
615 /// @param current The number of objects currently observed by this metrics.
616 /// @param totalLifetime The sum of the lifetime of each observed objects.
617 /// @param failures The number of failures observed.
618 /// @param size The size of the invocation.
619 /// @param replySize The size of the invocation reply.
620 ChildInvocationMetrics(std::string id, std::int64_t total, std::int32_t current, std::int64_t totalLifetime, std::int32_t failures, std::int64_t size, std::int64_t replySize) noexcept :
621 Metrics(std::move(id), total, current, totalLifetime, failures),
622 size(size),
624 {
625 }
626
627 /// Gets the type ID of the associated Slice class.
628 /// @return The string `"::IceMX::ChildInvocationMetrics"`.
629 static const char* ice_staticId() noexcept;
630
631 [[nodiscard]] const char* ice_id() const noexcept override;
632
633 /// Creates a tuple with all the fields of this class.
634 /// @return A tuple with all the fields of this class.
635 [[nodiscard]] std::tuple<const std::string&, const std::int64_t&, const std::int32_t&, const std::int64_t&, const std::int32_t&, const std::int64_t&, const std::int64_t&> ice_tuple() const
636 {
637 return std::tie(id, total, current, totalLifetime, failures, size, replySize);
638 }
639
640 /// Creates a shallow polymorphic copy of this instance.
641 /// @return The cloned value.
642 [[nodiscard]] ChildInvocationMetricsPtr ice_clone() const { return std::static_pointer_cast<ChildInvocationMetrics>(_iceCloneImpl()); }
643
644 void ice_printFields(std::ostream& os) const override;
645
646 /// The size of the invocation. This corresponds to the size of the marshaled input parameters.
647 std::int64_t size{INT64_C(0)};
648
649 /// The size of the invocation reply. This corresponds to the size of the marshaled output and return
650 /// parameters.
651 std::int64_t replySize{INT64_C(0)};
652
653 protected:
654 /// Copy constructor.
656
657 /// @private
658 [[nodiscard]] Ice::ValuePtr _iceCloneImpl() const override;
659
660 /// @private
661 void _iceWriteImpl(Ice::OutputStream*) const override;
662
663 /// @private
664 void _iceReadImpl(Ice::InputStream*) override;
665 };
666
667 /// Provides information on invocations that are collocated. Collocated metrics are embedded within
668 /// InvocationMetrics.
669 /// @remarks The Slice compiler generated this class from Slice class `::IceMX::CollocatedMetrics`.
670 /// @headerfile Ice/Ice.h
672 {
674
675 /// Gets the type ID of the associated Slice class.
676 /// @return The string `"::IceMX::CollocatedMetrics"`.
677 static const char* ice_staticId() noexcept;
678
679 [[nodiscard]] const char* ice_id() const noexcept override;
680
681 /// Creates a shallow polymorphic copy of this instance.
682 /// @return The cloned value.
683 [[nodiscard]] CollocatedMetricsPtr ice_clone() const { return std::static_pointer_cast<CollocatedMetrics>(_iceCloneImpl()); }
684
685 protected:
686 /// Copy constructor.
688
689 /// @private
690 [[nodiscard]] Ice::ValuePtr _iceCloneImpl() const override;
691
692 /// @private
693 void _iceWriteImpl(Ice::OutputStream*) const override;
694
695 /// @private
696 void _iceReadImpl(Ice::InputStream*) override;
697 };
698
699 /// Provides information on invocations that are specifically sent over Ice connections. Remote metrics are embedded
700 /// within InvocationMetrics.
701 /// @remarks The Slice compiler generated this class from Slice class `::IceMX::RemoteMetrics`.
702 /// @headerfile Ice/Ice.h
704 {
706
707 /// Gets the type ID of the associated Slice class.
708 /// @return The string `"::IceMX::RemoteMetrics"`.
709 static const char* ice_staticId() noexcept;
710
711 [[nodiscard]] const char* ice_id() const noexcept override;
712
713 /// Creates a shallow polymorphic copy of this instance.
714 /// @return The cloned value.
715 [[nodiscard]] RemoteMetricsPtr ice_clone() const { return std::static_pointer_cast<RemoteMetrics>(_iceCloneImpl()); }
716
717 protected:
718 /// Copy constructor.
719 RemoteMetrics(const RemoteMetrics&) = default;
720
721 /// @private
722 [[nodiscard]] Ice::ValuePtr _iceCloneImpl() const override;
723
724 /// @private
725 void _iceWriteImpl(Ice::OutputStream*) const override;
726
727 /// @private
728 void _iceReadImpl(Ice::InputStream*) override;
729 };
730
731 /// Provide measurements for proxy invocations. Proxy invocations can either be sent over the wire or be collocated.
732 /// @remarks The Slice compiler generated this class from Slice class `::IceMX::InvocationMetrics`.
733 /// @headerfile Ice/Ice.h
734 class ICE_API InvocationMetrics : public Metrics
735 {
736 public:
737 /// Default constructor.
738 InvocationMetrics() noexcept = default;
739
740 /// One-shot constructor to initialize all data members.
741 /// @param id The metrics identifier.
742 /// @param total The total number of objects observed by this metrics.
743 /// @param current The number of objects currently observed by this metrics.
744 /// @param totalLifetime The sum of the lifetime of each observed objects.
745 /// @param failures The number of failures observed.
746 /// @param retry The number of retries for the invocations.
747 /// @param userException The number of invocations that failed with a user exception.
748 /// @param remotes The remote invocation metrics map.
749 /// @param collocated The collocated invocation metrics map.
750 InvocationMetrics(std::string id, std::int64_t total, std::int32_t current, std::int64_t totalLifetime, std::int32_t failures, std::int32_t retry, std::int32_t userException, ::IceMX::MetricsMap remotes, ::IceMX::MetricsMap collocated) noexcept :
751 Metrics(std::move(id), total, current, totalLifetime, failures),
752 retry(retry),
754 remotes(std::move(remotes)),
755 collocated(std::move(collocated))
756 {
757 }
758
759 /// Gets the type ID of the associated Slice class.
760 /// @return The string `"::IceMX::InvocationMetrics"`.
761 static const char* ice_staticId() noexcept;
762
763 [[nodiscard]] const char* ice_id() const noexcept override;
764
765 /// Creates a tuple with all the fields of this class.
766 /// @return A tuple with all the fields of this class.
767 [[nodiscard]] std::tuple<const std::string&, const std::int64_t&, const std::int32_t&, const std::int64_t&, const std::int32_t&, const std::int32_t&, const std::int32_t&, const ::IceMX::MetricsMap&, const ::IceMX::MetricsMap&> ice_tuple() const
768 {
770 }
771
772 /// Creates a shallow polymorphic copy of this instance.
773 /// @return The cloned value.
774 [[nodiscard]] InvocationMetricsPtr ice_clone() const { return std::static_pointer_cast<InvocationMetrics>(_iceCloneImpl()); }
775
776 void ice_printFields(std::ostream& os) const override;
777
778 /// The number of retries for the invocations.
779 std::int32_t retry{0};
780
781 /// The number of invocations that failed with a user exception.
782 std::int32_t userException{0};
783
784 /// The remote invocation metrics map.
785 /// @see ::IceMX::RemoteMetrics
787
788 /// The collocated invocation metrics map.
789 /// @see ::IceMX::CollocatedMetrics
791
792 protected:
793 /// Copy constructor.
795
796 /// @private
797 [[nodiscard]] Ice::ValuePtr _iceCloneImpl() const override;
798
799 /// @private
800 void _iceWriteImpl(Ice::OutputStream*) const override;
801
802 /// @private
803 void _iceReadImpl(Ice::InputStream*) override;
804 };
805
806 /// Provides information on the data sent and received over Ice connections.
807 /// @remarks The Slice compiler generated this class from Slice class `::IceMX::ConnectionMetrics`.
808 /// @headerfile Ice/Ice.h
809 class ICE_API ConnectionMetrics : public Metrics
810 {
811 public:
812 /// Default constructor.
813 ConnectionMetrics() noexcept = default;
814
815 /// One-shot constructor to initialize all data members.
816 /// @param id The metrics identifier.
817 /// @param total The total number of objects observed by this metrics.
818 /// @param current The number of objects currently observed by this metrics.
819 /// @param totalLifetime The sum of the lifetime of each observed objects.
820 /// @param failures The number of failures observed.
821 /// @param receivedBytes The number of bytes received by the connection.
822 /// @param sentBytes The number of bytes sent by the connection.
823 ConnectionMetrics(std::string id, std::int64_t total, std::int32_t current, std::int64_t totalLifetime, std::int32_t failures, std::int64_t receivedBytes, std::int64_t sentBytes) noexcept :
824 Metrics(std::move(id), total, current, totalLifetime, failures),
827 {
828 }
829
830 /// Gets the type ID of the associated Slice class.
831 /// @return The string `"::IceMX::ConnectionMetrics"`.
832 static const char* ice_staticId() noexcept;
833
834 [[nodiscard]] const char* ice_id() const noexcept override;
835
836 /// Creates a tuple with all the fields of this class.
837 /// @return A tuple with all the fields of this class.
838 [[nodiscard]] std::tuple<const std::string&, const std::int64_t&, const std::int32_t&, const std::int64_t&, const std::int32_t&, const std::int64_t&, const std::int64_t&> ice_tuple() const
839 {
840 return std::tie(id, total, current, totalLifetime, failures, receivedBytes, sentBytes);
841 }
842
843 /// Creates a shallow polymorphic copy of this instance.
844 /// @return The cloned value.
845 [[nodiscard]] ConnectionMetricsPtr ice_clone() const { return std::static_pointer_cast<ConnectionMetrics>(_iceCloneImpl()); }
846
847 void ice_printFields(std::ostream& os) const override;
848
849 /// The number of bytes received by the connection.
850 std::int64_t receivedBytes{INT64_C(0)};
851
852 /// The number of bytes sent by the connection.
853 std::int64_t sentBytes{INT64_C(0)};
854
855 protected:
856 /// Copy constructor.
858
859 /// @private
860 [[nodiscard]] Ice::ValuePtr _iceCloneImpl() const override;
861
862 /// @private
863 void _iceWriteImpl(Ice::OutputStream*) const override;
864
865 /// @private
866 void _iceReadImpl(Ice::InputStream*) override;
867 };
868
869 /// @cond INTERNAL
870 using Ice::Tuple::operator<;
871 using Ice::Tuple::operator<=;
872 using Ice::Tuple::operator>;
873 using Ice::Tuple::operator>=;
874 using Ice::Tuple::operator==;
875 using Ice::Tuple::operator!=;
876 /// @endcond
877}
878
879namespace IceMX
880{
881 /// The metrics administrative facet interface. This interface allows remote administrative clients to access the
882 /// metrics of an application that enabled the Ice administrative facility and configured one or more metrics views.
883 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::IceMX::MetricsAdmin`.
884 /// @headerfile Ice/Ice.h
885 class ICE_API MetricsAdmin : public virtual Ice::Object
886 {
887 public:
888 /// The associated proxy type.
889 using ProxyType = MetricsAdminPrx;
890
891 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
892 /// @param request The incoming request.
893 /// @param sendResponse The callback to send the response.
894 void dispatch(Ice::IncomingRequest& request, std::function<void(Ice::OutgoingResponse)> sendResponse) override;
895
896 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
897
898 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
899
900 /// Gets the names of enabled and disabled metrics.
901 /// @param[out] disabledViews The names of the disabled views.
902 /// @param current The Current object of the incoming request.
903 /// @return The names of the enabled views.
904 virtual ::Ice::StringSeq getMetricsViewNames(::Ice::StringSeq& disabledViews, const Ice::Current& current) = 0;
905
906 /// @private
907 void _iceD_getMetricsViewNames(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
908
909 /// Enables a metrics view.
910 /// @param name The metrics view name.
911 /// @param current The Current object of the incoming request.
912 /// @throws IceMX::UnknownMetricsView Thrown when the metrics view cannot be found.
913 virtual void enableMetricsView(std::string name, const Ice::Current& current) = 0;
914
915 /// @private
916 void _iceD_enableMetricsView(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
917
918 /// Disables a metrics view.
919 /// @param name The metrics view name.
920 /// @param current The Current object of the incoming request.
921 /// @throws IceMX::UnknownMetricsView Thrown when the metrics view cannot be found.
922 virtual void disableMetricsView(std::string name, const Ice::Current& current) = 0;
923
924 /// @private
925 void _iceD_disableMetricsView(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
926
927 /// Gets the metrics objects for the given metrics view.
928 /// @param view The name of the metrics view.
929 /// @param[out] timestamp The local time of the process when the metrics objects were retrieved.
930 /// @param current The Current object of the incoming request.
931 /// @return The metrics view data, a dictionary of metric maps for each metrics class configured with the view.
932 /// The @p timestamp allows the client to compute averages which are not dependent of the invocation latency for
933 /// this operation.
934 /// @throws IceMX::UnknownMetricsView Thrown when the metrics view cannot be found.
935 virtual MetricsView getMetricsView(std::string view, std::int64_t& timestamp, const Ice::Current& current) = 0;
936
937 /// @private
938 void _iceD_getMetricsView(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
939
940 /// Gets the metrics failures associated with the given @p view and @p map.
941 /// @param view The name of the metrics view.
942 /// @param map The name of the metrics map.
943 /// @param current The Current object of the incoming request.
944 /// @return The metrics failures associated with the map.
945 /// @throws IceMX::UnknownMetricsView Thrown when the metrics view cannot be found.
946 virtual MetricsFailuresSeq getMapMetricsFailures(std::string view, std::string map, const Ice::Current& current) = 0;
947
948 /// @private
949 void _iceD_getMapMetricsFailures(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
950
951 /// Gets the metrics failure associated for the given metrics.
952 /// @param view The name of the metrics view.
953 /// @param map The name of the metrics map.
954 /// @param id The ID of the metrics.
955 /// @param current The Current object of the incoming request.
956 /// @return The metrics failures associated with the metrics.
957 /// @throws IceMX::UnknownMetricsView Thrown when the metrics view cannot be found.
958 virtual MetricsFailures getMetricsFailures(std::string view, std::string map, std::string id, const Ice::Current& current) = 0;
959
960 /// @private
961 void _iceD_getMetricsFailures(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
962
963 /// Gets the type ID of the associated Slice interface.
964 /// @return The string `"::IceMX::MetricsAdmin"`.
965 static const char* ice_staticId() noexcept;
966 };
967
968 /// A shared pointer to a MetricsAdmin.
969 using MetricsAdminPtr = std::shared_ptr<MetricsAdmin>;
970}
971
972namespace IceMX
973{
974 /// The metrics administrative facet interface. This interface allows remote administrative clients to access the
975 /// metrics of an application that enabled the Ice administrative facility and configured one or more metrics views.
976 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::IceMX::MetricsAdmin`.
977 /// @headerfile Ice/Ice.h
978 class ICE_API AsyncMetricsAdmin : public virtual Ice::Object
979 {
980 public:
981 /// The associated proxy type.
983
984 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
985 /// @param request The incoming request.
986 /// @param sendResponse The callback to send the response.
987 void dispatch(Ice::IncomingRequest& request, std::function<void(Ice::OutgoingResponse)> sendResponse) override;
988
989 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
990
991 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
992
993 /// Gets the names of enabled and disabled metrics.
994 /// @param response The response callback. It accepts:
995 /// - `returnValue` The names of the enabled views.
996 /// - `disabledViews` The names of the disabled views.
997 /// @param exception The exception callback.
998 /// @param current The Current object of the incoming request.
999 virtual void getMetricsViewNamesAsync(std::function<void(const ::Ice::StringSeq& returnValue, const ::Ice::StringSeq& disabledViews)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
1000
1001 /// @private
1002 void _iceD_getMetricsViewNames(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
1003
1004 /// Enables a metrics view.
1005 /// @param name The metrics view name.
1006 /// @param response The response callback.
1007 /// @param exception The exception callback.
1008 /// @param current The Current object of the incoming request.
1009 /// @throws IceMX::UnknownMetricsView Thrown when the metrics view cannot be found.
1010 virtual void enableMetricsViewAsync(std::string name, std::function<void()> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
1011
1012 /// @private
1013 void _iceD_enableMetricsView(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
1014
1015 /// Disables a metrics view.
1016 /// @param name The metrics view name.
1017 /// @param response The response callback.
1018 /// @param exception The exception callback.
1019 /// @param current The Current object of the incoming request.
1020 /// @throws IceMX::UnknownMetricsView Thrown when the metrics view cannot be found.
1021 virtual void disableMetricsViewAsync(std::string name, std::function<void()> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
1022
1023 /// @private
1024 void _iceD_disableMetricsView(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
1025
1026 /// Gets the metrics objects for the given metrics view.
1027 /// @param view The name of the metrics view.
1028 /// @param response The response callback. It accepts:
1029 /// - `returnValue` The metrics view data, a dictionary of metric maps for each metrics class configured with the view.
1030 /// The @p timestamp allows the client to compute averages which are not dependent of the invocation latency for
1031 /// this operation.
1032 /// - `timestamp` The local time of the process when the metrics objects were retrieved.
1033 /// @param exception The exception callback.
1034 /// @param current The Current object of the incoming request.
1035 /// @throws IceMX::UnknownMetricsView Thrown when the metrics view cannot be found.
1036 virtual void getMetricsViewAsync(std::string view, std::function<void(const MetricsView& returnValue, std::int64_t timestamp)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
1037
1038 /// @private
1039 void _iceD_getMetricsView(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
1040
1041 /// Gets the metrics failures associated with the given @p view and @p map.
1042 /// @param view The name of the metrics view.
1043 /// @param map The name of the metrics map.
1044 /// @param response The response callback. It accepts:
1045 /// - The metrics failures associated with the map.
1046 /// @param exception The exception callback.
1047 /// @param current The Current object of the incoming request.
1048 /// @throws IceMX::UnknownMetricsView Thrown when the metrics view cannot be found.
1049 virtual void getMapMetricsFailuresAsync(std::string view, std::string map, std::function<void(const MetricsFailuresSeq& returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
1050
1051 /// @private
1052 void _iceD_getMapMetricsFailures(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
1053
1054 /// Gets the metrics failure associated for the given metrics.
1055 /// @param view The name of the metrics view.
1056 /// @param map The name of the metrics map.
1057 /// @param id The ID of the metrics.
1058 /// @param response The response callback. It accepts:
1059 /// - The metrics failures associated with the metrics.
1060 /// @param exception The exception callback.
1061 /// @param current The Current object of the incoming request.
1062 /// @throws IceMX::UnknownMetricsView Thrown when the metrics view cannot be found.
1063 virtual void getMetricsFailuresAsync(std::string view, std::string map, std::string id, std::function<void(const MetricsFailures& returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
1064
1065 /// @private
1066 void _iceD_getMetricsFailures(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
1067
1068 /// Gets the type ID of the associated Slice interface.
1069 /// @return The string `"::IceMX::MetricsAdmin"`.
1070 static const char* ice_staticId() noexcept;
1071 };
1072
1073 /// A shared pointer to an AsyncMetricsAdmin.
1074 using AsyncMetricsAdminPtr = std::shared_ptr<AsyncMetricsAdmin>;
1075}
1076
1077namespace Ice
1078{
1079 /// @cond INTERNAL
1080 template<>
1081 struct StreamableTraits<::IceMX::MetricsFailures>
1082 {
1083 static constexpr StreamHelperCategory helper = StreamHelperCategoryStruct;
1084 static constexpr int minWireSize = 2;
1085 static constexpr bool fixedLength = false;
1086 };
1087
1088 template<>
1089 struct StreamReader<::IceMX::MetricsFailures>
1090 {
1091 /// Unmarshals a ::IceMX::MetricsFailures from the input stream.
1092 static void read(InputStream* istr, ::IceMX::MetricsFailures& v)
1093 {
1094 istr->readAll(v.id, v.failures);
1095 }
1096 };
1097 /// @endcond
1098}
1099
1100// NOLINTEND(modernize-concat-nested-namespaces)
1101
1102#include <Ice/PopDisableWarnings.h>
1103#endif
virtual void disableMetricsViewAsync(std::string name, std::function< void()> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current)=0
Disables a metrics view.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
MetricsAdminPrx ProxyType
The associated proxy type.
Definition Metrics.h:982
std::vector< std::string > ice_ids(const Ice::Current &current) const override
Gets the Slice interfaces supported by this object as a list of Slice type IDs.
std::string ice_id(const Ice::Current &current) const override
Gets the type ID of the most-derived Slice interface supported by this object.
virtual void enableMetricsViewAsync(std::string name, std::function< void()> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current)=0
Enables a metrics view.
virtual void getMetricsViewNamesAsync(std::function< void(const ::Ice::StringSeq &returnValue, const ::Ice::StringSeq &disabledViews)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current)=0
Gets the names of enabled and disabled metrics.
virtual void getMetricsFailuresAsync(std::string view, std::string map, std::string id, std::function< void(const MetricsFailures &returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current)=0
Gets the metrics failure associated for the given metrics.
virtual void getMapMetricsFailuresAsync(std::string view, std::string map, std::function< void(const MetricsFailuresSeq &returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current)=0
Gets the metrics failures associated with the given view and map.
void dispatch(Ice::IncomingRequest &request, std::function< void(Ice::OutgoingResponse)> sendResponse) override
Dispatches an incoming request to one of the member functions of this generated class,...
virtual void getMetricsViewAsync(std::string view, std::function< void(const MetricsView &returnValue, std::int64_t timestamp)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current)=0
Gets the metrics objects for the given metrics view.
The metrics administrative facet interface.
Definition Metrics.h:979
ChildInvocationMetricsPtr ice_clone() const
Creates a shallow polymorphic copy of this instance.
Definition Metrics.h:642
const char * ice_id() const noexcept override
Gets the Slice type ID of the most-derived class supported by this object.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice class.
ChildInvocationMetrics(const ChildInvocationMetrics &)=default
Copy constructor.
std::int64_t size
The size of the invocation. This corresponds to the size of the marshaled input parameters.
Definition Metrics.h:647
void ice_printFields(std::ostream &os) const override
Outputs the name and value of each field of this instance, including inherited fields,...
ChildInvocationMetrics() noexcept=default
Default constructor.
std::int64_t replySize
The size of the invocation reply.
Definition Metrics.h:651
std::tuple< const std::string &, const std::int64_t &, const std::int32_t &, const std::int64_t &, const std::int32_t &, const std::int64_t &, const std::int64_t & > ice_tuple() const
Creates a tuple with all the fields of this class.
Definition Metrics.h:635
Provides information on child invocations.
Definition Metrics.h:607
CollocatedMetrics(const CollocatedMetrics &)=default
Copy constructor.
CollocatedMetricsPtr ice_clone() const
Creates a shallow polymorphic copy of this instance.
Definition Metrics.h:683
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice class.
const char * ice_id() const noexcept override
Gets the Slice type ID of the most-derived class supported by this object.
ChildInvocationMetrics() noexcept=default
Default constructor.
Provides information on invocations that are collocated.
Definition Metrics.h:672
std::tuple< const std::string &, const std::int64_t &, const std::int32_t &, const std::int64_t &, const std::int32_t &, const std::int64_t &, const std::int64_t & > ice_tuple() const
Creates a tuple with all the fields of this class.
Definition Metrics.h:838
ConnectionMetricsPtr ice_clone() const
Creates a shallow polymorphic copy of this instance.
Definition Metrics.h:845
const char * ice_id() const noexcept override
Gets the Slice type ID of the most-derived class supported by this object.
void ice_printFields(std::ostream &os) const override
Outputs the name and value of each field of this instance, including inherited fields,...
ConnectionMetrics() noexcept=default
Default constructor.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice class.
ConnectionMetrics(const ConnectionMetrics &)=default
Copy constructor.
std::int64_t receivedBytes
The number of bytes received by the connection.
Definition Metrics.h:850
std::int64_t sentBytes
The number of bytes sent by the connection.
Definition Metrics.h:853
Provides information on the data sent and received over Ice connections.
Definition Metrics.h:810
std::int32_t userException
The number of dispatches that failed with a user exception.
Definition Metrics.h:579
const char * ice_id() const noexcept override
Gets the Slice type ID of the most-derived class supported by this object.
DispatchMetricsPtr ice_clone() const
Creates a shallow polymorphic copy of this instance.
Definition Metrics.h:574
void ice_printFields(std::ostream &os) const override
Outputs the name and value of each field of this instance, including inherited fields,...
std::tuple< const std::string &, const std::int64_t &, const std::int32_t &, const std::int64_t &, const std::int32_t &, const std::int32_t &, const std::int64_t &, const std::int64_t & > ice_tuple() const
Creates a tuple with all the fields of this class.
Definition Metrics.h:567
std::int64_t size
The size of the incoming requests. This corresponds to the size of the marshaled input parameters.
Definition Metrics.h:582
std::int64_t replySize
The size of the replies. This corresponds to the size of the marshaled output and return parameters.
Definition Metrics.h:585
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice class.
DispatchMetrics(const DispatchMetrics &)=default
Copy constructor.
DispatchMetrics() noexcept=default
Default constructor.
Provides information on servant dispatches.
Definition Metrics.h:537
std::int32_t retry
The number of retries for the invocations.
Definition Metrics.h:779
::IceMX::MetricsMap collocated
The collocated invocation metrics map.
Definition Metrics.h:790
InvocationMetrics(const InvocationMetrics &)=default
Copy constructor.
InvocationMetrics() noexcept=default
Default constructor.
std::tuple< const std::string &, const std::int64_t &, const std::int32_t &, const std::int64_t &, const std::int32_t &, const std::int32_t &, const std::int32_t &, const ::IceMX::MetricsMap &, const ::IceMX::MetricsMap & > ice_tuple() const
Creates a tuple with all the fields of this class.
Definition Metrics.h:767
::IceMX::MetricsMap remotes
The remote invocation metrics map.
Definition Metrics.h:786
std::int32_t userException
The number of invocations that failed with a user exception.
Definition Metrics.h:782
const char * ice_id() const noexcept override
Gets the Slice type ID of the most-derived class supported by this object.
InvocationMetricsPtr ice_clone() const
Creates a shallow polymorphic copy of this instance.
Definition Metrics.h:774
void ice_printFields(std::ostream &os) const override
Outputs the name and value of each field of this instance, including inherited fields,...
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice class.
Provide measurements for proxy invocations.
Definition Metrics.h:735
std::function< void()> enableMetricsViewAsync(std::string_view name, std::function< void()> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Enables a metrics view.
std::function< void()> getMetricsViewNamesAsync(std::function< void(::Ice::StringSeq, ::Ice::StringSeq)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Gets the names of enabled and disabled metrics.
MetricsAdminPrx(MetricsAdminPrx &&other) noexcept
Move constructor.
Definition Metrics.h:111
std::future< void > enableMetricsViewAsync(std::string_view name, const Ice::Context &context=Ice::noExplicitContext) const
Enables a metrics view.
void enableMetricsView(std::string_view name, const Ice::Context &context=Ice::noExplicitContext) const
Enables a metrics view.
MetricsAdminPrx(const MetricsAdminPrx &other) noexcept
Copy constructor.
Definition Metrics.h:107
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
MetricsFailures getMetricsFailures(std::string_view view, std::string_view map, std::string_view id, const Ice::Context &context=Ice::noExplicitContext) const
Gets the metrics failure associated for the given metrics.
std::function< void()> getMapMetricsFailuresAsync(std::string_view view, std::string_view map, std::function< void(::IceMX::MetricsFailuresSeq)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Gets the metrics failures associated with the given view and map.
MetricsAdminPrx & operator=(const MetricsAdminPrx &rhs) noexcept
Copy assignment operator.
Definition Metrics.h:118
std::future< std::tuple<::Ice::StringSeq, ::Ice::StringSeq > > getMetricsViewNamesAsync(const Ice::Context &context=Ice::noExplicitContext) const
Gets the names of enabled and disabled metrics.
MetricsAdminPrx(const Ice::CommunicatorPtr &communicator, std::string_view proxyString)
Constructs a proxy from a Communicator and a proxy string.
Definition Metrics.h:103
std::function< void()> getMetricsFailuresAsync(std::string_view view, std::string_view map, std::string_view id, std::function< void(::IceMX::MetricsFailures)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Gets the metrics failure associated for the given metrics.
std::future< MetricsFailuresSeq > getMapMetricsFailuresAsync(std::string_view view, std::string_view map, const Ice::Context &context=Ice::noExplicitContext) const
Gets the metrics failures associated with the given view and map.
MetricsView getMetricsView(std::string_view view, std::int64_t &timestamp, const Ice::Context &context=Ice::noExplicitContext) const
Gets the metrics objects for the given metrics view.
MetricsFailuresSeq getMapMetricsFailures(std::string_view view, std::string_view map, const Ice::Context &context=Ice::noExplicitContext) const
Gets the metrics failures associated with the given view and map.
MetricsAdminPrx & operator=(MetricsAdminPrx &&rhs) noexcept
Move assignment operator.
Definition Metrics.h:129
std::future< MetricsFailures > getMetricsFailuresAsync(std::string_view view, std::string_view map, std::string_view id, const Ice::Context &context=Ice::noExplicitContext) const
Gets the metrics failure associated for the given metrics.
std::future< void > disableMetricsViewAsync(std::string_view name, const Ice::Context &context=Ice::noExplicitContext) const
Disables a metrics view.
std::function< void()> disableMetricsViewAsync(std::string_view name, std::function< void()> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Disables a metrics view.
std::function< void()> getMetricsViewAsync(std::string_view view, std::function< void(::IceMX::MetricsView, std::int64_t)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Gets the metrics objects for the given metrics view.
::Ice::StringSeq getMetricsViewNames(::Ice::StringSeq &disabledViews, const Ice::Context &context=Ice::noExplicitContext) const
Gets the names of enabled and disabled metrics.
void disableMetricsView(std::string_view name, const Ice::Context &context=Ice::noExplicitContext) const
Disables a metrics view.
std::future< std::tuple< MetricsView, std::int64_t > > getMetricsViewAsync(std::string_view view, const Ice::Context &context=Ice::noExplicitContext) const
Gets the metrics objects for the given metrics view.
The metrics administrative facet interface.
Definition Metrics.h:98
Metrics() noexcept=default
Default constructor.
std::int32_t current
The number of objects currently observed by this metrics.
Definition Metrics.h:389
std::tuple< const std::string &, const std::int64_t &, const std::int32_t &, const std::int64_t &, const std::int32_t & > ice_tuple() const
Creates a tuple with all the fields of this class.
Definition Metrics.h:370
void ice_printFields(std::ostream &os) const override
Outputs the name and value of each field of this instance, including inherited fields,...
Metrics(const Metrics &)=default
Copy constructor.
MetricsPtr ice_clone() const
Creates a shallow polymorphic copy of this instance.
Definition Metrics.h:377
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice class.
std::string id
The metrics identifier.
Definition Metrics.h:382
std::int64_t totalLifetime
The sum of the lifetime of each observed objects.
Definition Metrics.h:393
const char * ice_id() const noexcept override
Gets the Slice type ID of the most-derived class supported by this object.
std::int32_t failures
The number of failures observed.
Definition Metrics.h:396
std::int64_t total
The total number of objects observed by this metrics.
Definition Metrics.h:386
The base class for metrics.
Definition Metrics.h:342
const char * ice_id() const noexcept override
Gets the Slice type ID of the most-derived class supported by this object.
RemoteMetricsPtr ice_clone() const
Creates a shallow polymorphic copy of this instance.
Definition Metrics.h:715
RemoteMetrics(const RemoteMetrics &)=default
Copy constructor.
ChildInvocationMetrics() noexcept=default
Default constructor.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice class.
Provides information on invocations that are specifically sent over Ice connections.
Definition Metrics.h:704
ThreadMetrics() noexcept=default
Default constructor.
std::int32_t inUseForOther
The number of threads which are currently performing other activities such as DNS lookups,...
Definition Metrics.h:517
std::int32_t inUseForUser
The number of threads which are currently calling user code (servant dispatch, AMI callbacks,...
Definition Metrics.h:512
std::tuple< const std::string &, const std::int64_t &, const std::int32_t &, const std::int64_t &, const std::int32_t &, const std::int32_t &, const std::int32_t &, const std::int32_t & > ice_tuple() const
Creates a tuple with all the fields of this class.
Definition Metrics.h:497
void ice_printFields(std::ostream &os) const override
Outputs the name and value of each field of this instance, including inherited fields,...
const char * ice_id() const noexcept override
Gets the Slice type ID of the most-derived class supported by this object.
ThreadMetricsPtr ice_clone() const
Creates a shallow polymorphic copy of this instance.
Definition Metrics.h:504
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice class.
std::int32_t inUseForIO
The number of threads which are currently performing socket reads or writes.
Definition Metrics.h:509
ThreadMetrics(const ThreadMetrics &)=default
Copy constructor.
Provides information on the number of threads currently in use and their activity.
Definition Metrics.h:467
void ice_throw() const override
Throws this exception.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice exception.
const char * ice_id() const noexcept override
Returns the type ID of this exception.
The exception that is thrown when a metrics view cannot be found.
Definition Metrics.h:445
Represents a request received by a connection.
Represents a byte buffer used for unmarshaling data encoded using the Slice encoding.
Definition InputStream.h:50
ObjectPrx & operator=(const ObjectPrx &rhs) noexcept=default
Copy assignment operator.
The base class for all Ice proxies.
Definition Proxy.h:232
The base class for servants.
Definition Object.h:21
Represents the response to an incoming request.
Represents a byte buffer used for marshaling data using the Slice encoding.
Provides typed proxy functions.
Definition Proxy.h:45
Abstract base class for all exceptions defined in Slice.
The base class for instances of Slice-defined classes.
Definition Value.h:22
std::map< std::string, std::int32_t > StringIntDict
A dictionary of strings to integers.
Definition Metrics.h:32
std::vector< MetricsPtr > MetricsMap
A sequence of metrics.
Definition Metrics.h:48
std::shared_ptr< Metrics > MetricsPtr
A shared pointer to a Metrics.
Definition Metrics.h:37
std::shared_ptr< RemoteMetrics > RemoteMetricsPtr
A shared pointer to a RemoteMetrics.
Definition Metrics.h:78
std::shared_ptr< MetricsAdmin > MetricsAdminPtr
A shared pointer to a MetricsAdmin.
Definition Metrics.h:969
std::shared_ptr< AsyncMetricsAdmin > AsyncMetricsAdminPtr
A shared pointer to an AsyncMetricsAdmin.
Definition Metrics.h:1074
std::shared_ptr< DispatchMetrics > DispatchMetricsPtr
A shared pointer to a DispatchMetrics.
Definition Metrics.h:63
std::map< std::string, MetricsMap > MetricsView
A metrics view is a dictionary of metrics maps. The key of the dictionary is the name of the metrics ...
Definition Metrics.h:51
std::ostream & operator<<(std::ostream &os, const MetricsFailures &value)
Outputs the description of a MetricsFailures to a stream, including all its fields.
std::shared_ptr< ChildInvocationMetrics > ChildInvocationMetricsPtr
A shared pointer to a ChildInvocationMetrics.
Definition Metrics.h:68
std::shared_ptr< ConnectionMetrics > ConnectionMetricsPtr
A shared pointer to a ConnectionMetrics.
Definition Metrics.h:88
std::shared_ptr< InvocationMetrics > InvocationMetricsPtr
A shared pointer to an InvocationMetrics.
Definition Metrics.h:83
std::vector< MetricsFailures > MetricsFailuresSeq
A sequence of MetricsFailures.
Definition Metrics.h:42
std::shared_ptr< CollocatedMetrics > CollocatedMetricsPtr
A shared pointer to a CollocatedMetrics.
Definition Metrics.h:73
std::shared_ptr< ThreadMetrics > ThreadMetricsPtr
A shared pointer to a ThreadMetrics.
Definition Metrics.h:58
The Ice Management eXtension facility.
Definition Metrics.h:38
std::shared_ptr< Communicator > CommunicatorPtr
A shared pointer to a Communicator.
const Context noExplicitContext
Marker value used to indicate that no explicit request context was passed to a proxy invocation.
std::vector< std::string > StringSeq
A sequence of strings.
std::shared_ptr< Value > ValuePtr
A shared pointer to a Value.
Definition ValueF.h:13
std::map< std::string, std::string, std::less<> > Context
Represents additional information carried by an Ice request.
Definition Context.h:34
The Ice RPC framework.
Definition SampleEvent.h:66
std::string id
The identifier of the metrics object associated to the failures.
Definition Metrics.h:418
std::tuple< const std::string &, const ::IceMX::StringIntDict & > ice_tuple() const
Creates a tuple with all the fields of this struct.
Definition Metrics.h:425
::IceMX::StringIntDict failures
The failures observed for this metrics.
Definition Metrics.h:421
void ice_printFields(std::ostream &os) const
Outputs the name and value of each field of this instance to the stream.
Keeps track of metrics failures.
Definition Metrics.h:416
Provides information about an incoming request being dispatched.
Definition Current.h:18