addEndpointAttributes <T>(MetricsHelper <T> .AttributeResolver r, Type cl) where T : IceMX.Metrics { r.add("endpoint", cl.GetMethod("getEndpoint")); Type cli = typeof(Ice.EndpointInfo); r.add("endpointType", cl.GetMethod("getEndpointInfo"), cli.GetMethod("type")); r.add("endpointIsDatagram", cl.GetMethod("getEndpointInfo"), cli.GetMethod("datagram")); r.add("endpointIsSecure", cl.GetMethod("getEndpointInfo"), cli.GetMethod("secure")); r.add("endpointTimeout", cl.GetMethod("getEndpointInfo"), cli.GetField("timeout")); r.add("endpointCompress", cl.GetMethod("getEndpointInfo"), cli.GetField("compress")); cli = typeof(Ice.IPEndpointInfo); r.add("endpointHost", cl.GetMethod("getEndpointInfo"), cli.GetField("host")); r.add("endpointPort", cl.GetMethod("getEndpointInfo"), cli.GetField("port")); }
addConnectionAttributes <T>(MetricsHelper <T> .AttributeResolver r, Type cl) where T : IceMX.Metrics { Type cli = typeof(Ice.ConnectionInfo); r.add("incoming", cl.GetMethod("getConnectionInfo"), cli.GetField("incoming")); r.add("adapterName", cl.GetMethod("getConnectionInfo"), cli.GetField("adapterName")); r.add("connectionId", cl.GetMethod("getConnectionInfo"), cli.GetField("connectionId")); cli = typeof(Ice.IPConnectionInfo); r.add("localHost", cl.GetMethod("getConnectionInfo"), cli.GetField("localAddress")); r.add("localPort", cl.GetMethod("getConnectionInfo"), cli.GetField("localPort")); r.add("remoteHost", cl.GetMethod("getConnectionInfo"), cli.GetField("remoteAddress")); r.add("remotePort", cl.GetMethod("getConnectionInfo"), cli.GetField("remotePort")); cli = typeof(Ice.UDPConnectionInfo); r.add("mcastHost", cl.GetMethod("getConnectionInfo"), cli.GetField("mcastAddress")); r.add("mcastPort", cl.GetMethod("getConnectionInfo"), cli.GetField("mcastPort")); AttrsUtil.addEndpointAttributes <T>(r, cl); }