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