This forum has been archived. Please start a new discussion on GitHub.

own metric

Hi all.
My question: i can create my own metric?
I try make this:

My steps:
1)I create class on Slice language :

#include <Ice/>

module Demo
class FpsMetric extends ::IceMX::Metrics
int Fps;



2) on server-side this code:
Ice.Object iceObject = communicator().findAdminFacet("Metrics");
IceInternal.MetricsAdminI metricsAdminI = (IceInternal.MetricsAdminI)iceObject;
FpsMetricUpdater fpsMetricUpdater = new FpsMetricUpdater();
metricsAdminI.registerMap<Demo.FpsMetric>("FpsMetric", fpsMetricUpdater.Updater);

3)on client-side: I request all metrics from IceMX.MetricsAdminPrx (Connection, Threads, etc.) I found map with name "FpsMetric", but its empty (name = "FpsMetric", IceMX.Metrics[0])
4) What means in method (metricsAdminI.registerMap<Demo.FpsMetric>(nameMap, Action) ) argument Action?
5)How "FpsMetric" map create not empty?and why something metric (such as Invocation, Connection, EndpointLookup too empty? )

Please Help, thanks.


  • benoit
    benoit Rennes, France
    Hi Jinn,

    Sorry, we currently don't officially support "user metrics" which is why we also do not document how to extend them. This is something we might consider doing in a future release however. If you are interested in having this feature sooner than later, please contact us at

  • Thank you for quick response!
    Only one question, when i request IceMX.MetricsAdminPrx and get info about all metric, something of its empty.
    For example (IceMX::ThreadMetrics, IceMX::ConnectionMetrics, IceMX:: DispatchMetrics - all right, but other such as IceMX::InvocationMetrics, ConnectionEstablishment, EndpointLookup are empty (mapname:"Invocation" , IceMX.Metrics[0] ) ) Why? How to change this?
  • benoit
    benoit Rennes, France

    The invocation, connection establishment, endpoint lookup metrics map are expected to be empty on a server if this server doesn't invoke on any Ice proxy. Those maps measure metrics for the Ice client runtime, for Ice applications which make invocations on proxies. Is your server invoking on proxies or is it just dispatching requests from Ice clients?

  • I am realized. My server is just dispatching requests from Ice clients.
    Thank you very much.