private IPCLoggerChannelMetrics(IPCLoggerChannel ch) { this.ch = ch; Configuration conf = new HdfsConfiguration(); int[] intervals = conf.GetInts(DFSConfigKeys.DfsMetricsPercentilesIntervalsKey); if (intervals != null) { writeEndToEndLatencyQuantiles = new MutableQuantiles[intervals.Length]; writeRpcLatencyQuantiles = new MutableQuantiles[intervals.Length]; for (int i = 0; i < writeEndToEndLatencyQuantiles.Length; i++) { int interval = intervals[i]; writeEndToEndLatencyQuantiles[i] = registry.NewQuantiles("writesE2E" + interval + "s", "End-to-end time for write operations", "ops", "LatencyMicros", interval); writeRpcLatencyQuantiles[i] = registry.NewQuantiles("writesRpc" + interval + "s", "RPC RTT for write operations", "ops", "LatencyMicros", interval); } } else { writeEndToEndLatencyQuantiles = null; writeRpcLatencyQuantiles = null; } }
internal RpcMetrics(Server server, Configuration conf) { string port = server.GetListenerAddress().Port.ToString(); name = "RpcActivityForPort" + port; this.server = server; registry = new MetricsRegistry("rpc").Tag("port", "RPC port", port); int[] intervals = conf.GetInts(CommonConfigurationKeys.RpcMetricsPercentilesIntervalsKey ); rpcQuantileEnable = (intervals.Length > 0) && conf.GetBoolean(CommonConfigurationKeys .RpcMetricsQuantileEnable, CommonConfigurationKeys.RpcMetricsQuantileEnableDefault ); if (rpcQuantileEnable) { rpcQueueTimeMillisQuantiles = new MutableQuantiles[intervals.Length]; rpcProcessingTimeMillisQuantiles = new MutableQuantiles[intervals.Length]; for (int i = 0; i < intervals.Length; i++) { int interval = intervals[i]; rpcQueueTimeMillisQuantiles[i] = registry.NewQuantiles("rpcQueueTime" + interval + "s", "rpc queue time in milli second", "ops", "latency", interval); rpcProcessingTimeMillisQuantiles[i] = registry.NewQuantiles("rpcProcessingTime" + interval + "s", "rpc processing time in milli second", "ops", "latency", interval ); } } Log.Debug("Initialized " + registry); }
internal NameNodeMetrics(string processName, string sessionId, int[] intervals, JvmMetrics jvmMetrics) { this.jvmMetrics = jvmMetrics; registry.Tag(MsInfo.ProcessName, processName).Tag(MsInfo.SessionId, sessionId); int len = intervals.Length; syncsQuantiles = new MutableQuantiles[len]; blockReportQuantiles = new MutableQuantiles[len]; cacheReportQuantiles = new MutableQuantiles[len]; for (int i = 0; i < len; i++) { int interval = intervals[i]; syncsQuantiles[i] = registry.NewQuantiles("syncs" + interval + "s", "Journal syncs" , "ops", "latency", interval); blockReportQuantiles[i] = registry.NewQuantiles("blockReport" + interval + "s", "Block report" , "ops", "latency", interval); cacheReportQuantiles[i] = registry.NewQuantiles("cacheReport" + interval + "s", "Cache report" , "ops", "latency", interval); } }
internal JournalMetrics(Journal journal) { // 1m // 5m // 1h this.journal = journal; syncsQuantiles = new MutableQuantiles[QuantileIntervals.Length]; for (int i = 0; i < syncsQuantiles.Length; i++) { int interval = QuantileIntervals[i]; syncsQuantiles[i] = registry.NewQuantiles("syncs" + interval + "s", "Journal sync time" , "ops", "latencyMicros", interval); } }
public Nfs3Metrics(string name, string sessionId, int[] intervals, JvmMetrics jvmMetrics ) { // All mutable rates are in nanoseconds // No metric for nullProcedure; this.name = name; this.jvmMetrics = jvmMetrics; registry.Tag(MsInfo.SessionId, sessionId); int len = intervals.Length; readNanosQuantiles = new MutableQuantiles[len]; writeNanosQuantiles = new MutableQuantiles[len]; commitNanosQuantiles = new MutableQuantiles[len]; for (int i = 0; i < len; i++) { int interval = intervals[i]; readNanosQuantiles[i] = registry.NewQuantiles("readProcessNanos" + interval + "s" , "Read process in ns", "ops", "latency", interval); writeNanosQuantiles[i] = registry.NewQuantiles("writeProcessNanos" + interval + "s" , "Write process in ns", "ops", "latency", interval); commitNanosQuantiles[i] = registry.NewQuantiles("commitProcessNanos" + interval + "s", "Commit process in ns", "ops", "latency", interval); } }
public DataNodeMetrics(string name, string sessionId, int[] intervals, JvmMetrics jvmMetrics) { // RamDisk metrics on read/write // RamDisk metrics on eviction // RamDisk metrics on lazy persist this.name = name; this.jvmMetrics = jvmMetrics; registry.Tag(MsInfo.SessionId, sessionId); int len = intervals.Length; packetAckRoundTripTimeNanosQuantiles = new MutableQuantiles[len]; flushNanosQuantiles = new MutableQuantiles[len]; fsyncNanosQuantiles = new MutableQuantiles[len]; sendDataPacketBlockedOnNetworkNanosQuantiles = new MutableQuantiles[len]; sendDataPacketTransferNanosQuantiles = new MutableQuantiles[len]; ramDiskBlocksEvictionWindowMsQuantiles = new MutableQuantiles[len]; ramDiskBlocksLazyPersistWindowMsQuantiles = new MutableQuantiles[len]; for (int i = 0; i < len; i++) { int interval = intervals[i]; packetAckRoundTripTimeNanosQuantiles[i] = registry.NewQuantiles("packetAckRoundTripTimeNanos" + interval + "s", "Packet Ack RTT in ns", "ops", "latency", interval); flushNanosQuantiles[i] = registry.NewQuantiles("flushNanos" + interval + "s", "Disk flush latency in ns" , "ops", "latency", interval); fsyncNanosQuantiles[i] = registry.NewQuantiles("fsyncNanos" + interval + "s", "Disk fsync latency in ns" , "ops", "latency", interval); sendDataPacketBlockedOnNetworkNanosQuantiles[i] = registry.NewQuantiles("sendDataPacketBlockedOnNetworkNanos" + interval + "s", "Time blocked on network while sending a packet in ns", "ops" , "latency", interval); sendDataPacketTransferNanosQuantiles[i] = registry.NewQuantiles("sendDataPacketTransferNanos" + interval + "s", "Time reading from disk and writing to network while sending " + "a packet in ns", "ops", "latency", interval); ramDiskBlocksEvictionWindowMsQuantiles[i] = registry.NewQuantiles("ramDiskBlocksEvictionWindows" + interval + "s", "Time between the RamDisk block write and eviction in ms", "ops" , "latency", interval); ramDiskBlocksLazyPersistWindowMsQuantiles[i] = registry.NewQuantiles("ramDiskBlocksLazyPersistWindows" + interval + "s", "Time between the RamDisk block write and disk persist in ms" , "ops", "latency", interval); } }