/usr/share/Ice-3.5.1/slice/Ice/Metrics.ice is in ice35-slice 3.5.1-5.2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 | // **********************************************************************
//
// Copyright (c) 2003-2013 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
#include <Ice/BuiltinSequences.ice>
/**
*
* The Ice Management eXtension facility. It provides the {@link
* IceMX#MetricsAdmin} interface for management clients to retrieve
* metrics from Ice applications.
*
**/
module IceMX
{
/**
*
* A dictionnary of strings to integers.
*
**/
dictionary<string, int> StringIntDict;
/**
*
* The base class for metrics. A metrics object represents a
* collection of measurements associated to a given a system.
*
**/
class Metrics
{
/**
*
* The metrics identifier.
*
**/
string id;
/**
*
* The total number of objects that were observed by this metrics.
*
**/
long total = 0;
/**
*
* The current number of objects observed by this metrics.
*
**/
int current = 0;
/**
*
* The sum of the lifetime of each observed objects. This does not
* include the lifetime of objects which are currently observed.
*
**/
long totalLifetime = 0;
/**
*
* The number of failures observed.
*
**/
int failures = 0;
};
/**
*
* A structure to keep track of failures associated with a given
* metrics.
*
**/
struct MetricsFailures
{
/**
*
* The identifier of the metrics object associated to the
* failures.
*
**/
string id;
/**
*
* The failures observed for this metrics.
*
**/
StringIntDict failures;
};
/**
*
* A sequence of {@link MetricsFailures}.
*
**/
sequence<MetricsFailures> MetricsFailuresSeq;
/**
*
* A metrics map is a sequence of metrics. We use a sequence here
* instead of a map because the ID of the metrics is already included
* in the Metrics class and using sequences of metrics objects is more
* efficient than using dictionaries since lookup is not necessary.
*
**/
sequence<Metrics> MetricsMap;
/**
*
* A metrics view is a dictionary of metrics map. The key of the
* dictionary is the name of the metrics map.
*
**/
dictionary<string, MetricsMap> MetricsView;
/**
*
* Raised if a metrics view cannot be found.
*
**/
exception UnknownMetricsView
{
};
/**
*
* The metrics administrative facet interface. This interface allows
* remote administrative clients to access metrics of an application
* that enabled the Ice administrative facility and configured some
* metrics views.
*
**/
["format:sliced"]
interface MetricsAdmin
{
/**
*
* Get the names of enabled and disabled metrics.
*
* @param disabledViews The names of the disabled views.
*
* @return The name of the enabled views.
*
**/
Ice::StringSeq getMetricsViewNames(out Ice::StringSeq disabledViews);
/**
*
* Enables a metrics view.
*
* @param name The metrics view name.
*
* @throws UnknownMetricsView Raised if the metrics view cannot be
* found.
*
**/
void enableMetricsView(string name)
throws UnknownMetricsView;
/**
*
* Disable a metrics view.
*
* @param name The metrics view name.
*
* @throws UnknownMetricsView Raised if the metrics view cannot be
* found.
*
**/
void disableMetricsView(string name)
throws UnknownMetricsView;
/**
*
* Get the metrics objects for the given metrics view. This
* returns a dictionnary of metric maps for each metrics class
* configured with the view. The timestamp allows the client to
* compute averages which are not dependent of the invocation
* latency for this operation.
*
* @param view The name of the metrics view.
*
* @param timestamp The local time of the process when the metrics
* object were retrieved.
*
* @return The metrics view data.
*
* @throws UnknownMetricsView Raised if the metrics view cannot be
* found.
*
**/
MetricsView getMetricsView(string view, out long timestamp)
throws UnknownMetricsView;
/**
*
* Get the metrics failures associated with the given view and map.
*
* @param view The name of the metrics view.
*
* @param map The name of the metrics map.
*
* @return The metrics failures associated with the map.
*
* @throws UnknownMetricsView Raised if the metrics view cannot be
* found.
*
**/
MetricsFailuresSeq getMapMetricsFailures(string view, string map)
throws UnknownMetricsView;
/**
*
* Get the metrics failure associated for the given metrics.
*
* @param view The name of the metrics view.
*
* @param map The name of the metrics map.
*
* @param id The ID of the metrics.
*
* @return The metrics failures associated with the metrics.
*
* @throws UnknownMetricsView Raised if the metrics view cannot be
* found.
*
**/
MetricsFailures getMetricsFailures(string view, string map, string id)
throws UnknownMetricsView;
};
/**
*
* Provides information on the number of threads currently in use and
* their activity.
*
**/
class ThreadMetrics extends Metrics
{
/**
*
* The number of threads which are currently performing socket
* read or writes.
*
**/
int inUseForIO = 0;
/**
*
* The number of threads which are currently calling user code
* (servant dispatch, AMI callbacks, etc).
*
**/
int inUseForUser = 0;
/**
*
* The number of threads which are currently performing other
* activities. These are all other that are not counted with
* {@link inUseForUser} or {@link inUseForIO}, such as DNS
* lookups, garbage collection).
*
**/
int inUseForOther = 0;
};
/**
*
* Provides information on servant dispatch.
*
**/
class DispatchMetrics extends Metrics
{
/**
*
* The number of dispatch that failed with a user exception.
*
**/
int userException = 0;
/**
*
* The size of the dispatch. This corresponds to the size of the
* marshalled input parameters.
*
**/
long size = 0;
/**
*
* The size of the dispatch reply. This corresponds to the size of
* the marshalled output and return parameters.
*
**/
long replySize = 0;
};
/**
*
* Provides information on invocations that are specifically sent over
* Ice connections. Remote metrics are embedded within {@link
* InvocationMetrics}.
*
**/
class RemoteMetrics extends Metrics
{
/**
*
* The size of the invocation. This corresponds to the size of the
* marshalled input parameters.
*
**/
long size = 0;
/**
*
* The size of the invocation reply. This corresponds to the size
* of the marshalled output and return parameters.
*
**/
long replySize = 0;
};
/**
*
* Provide measurements for proxy invocations. Proxy invocations can
* either be sent over the wire or be collocated. The metrics for
* invocations sent over the wire are specifically measured with
* {@link RemoteMetrics}.
*
**/
class InvocationMetrics extends Metrics
{
/**
*
* The number of retries for the invocation(s).
*
**/
int retry = 0;
/**
*
* The number of invocations that failed with a user exception.
*
**/
int userException = 0;
/**
*
* The remote invocation metrics map.
*
* @see RemoteMetrics
*
**/
MetricsMap remotes;
};
/**
*
* Provides information on the data sent and received over Ice
* connections.
*
**/
class ConnectionMetrics extends Metrics
{
/**
*
* The number of bytes received by the connection.
*
**/
long receivedBytes = 0;
/**
*
* The number of bytes sent by the connection.
*
**/
long sentBytes = 0;
};
};
|