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