public void connected() { final String dictProfilerMetric = PROFILER.getProcessMetric("network.channel.binary.*"); profilerMetric = PROFILER.getProcessMetric( "network.channel.binary." + socket.getRemoteSocketAddress().toString() +":"+ socket.getLocalPort() + "".replace('.', '_')); PROFILER.registerHookValue(profilerMetric + ".transmittedBytes", "Bytes transmitted to a network channel", METRIC_TYPE.SIZE, new OProfilerHookValue() { public Object getValue() { return metricTransmittedBytes; } }, dictProfilerMetric + ".transmittedBytes"); PROFILER.registerHookValue(profilerMetric + ".receivedBytes", "Bytes received from a network channel", METRIC_TYPE.SIZE, new OProfilerHookValue() { public Object getValue() { return metricReceivedBytes; } }, dictProfilerMetric + ".receivedBytes"); PROFILER.registerHookValue(profilerMetric + ".flushes", "Number of times the network channel has been flushed", METRIC_TYPE.COUNTER, new OProfilerHookValue() { public Object getValue() { return metricFlushes; } }, dictProfilerMetric + ".flushes"); }
public void connected() { final String dictProfilerMetric = PROFILER.getProcessMetric("network.channel.binary.*"); profilerMetric = PROFILER.getProcessMetric("network.channel.binary." + socket.getRemoteSocketAddress().toString() + socket.getLocalPort() + "".replace('.', '_')); PROFILER.registerHookValue(profilerMetric + ".transmittedBytes", "Bytes transmitted to a network channel", METRIC_TYPE.SIZE, new OProfilerHookValue() { public Object getValue() { return metricTransmittedBytes; } }, dictProfilerMetric + ".transmittedBytes"); PROFILER.registerHookValue(profilerMetric + ".receivedBytes", "Bytes received from a network channel", METRIC_TYPE.SIZE, new OProfilerHookValue() { public Object getValue() { return metricReceivedBytes; } }, dictProfilerMetric + ".receivedBytes"); PROFILER.registerHookValue(profilerMetric + ".flushes", "Number of times the network channel has been flushed", METRIC_TYPE.COUNTER, new OProfilerHookValue() { public Object getValue() { return metricFlushes; } }, dictProfilerMetric + ".flushes"); }
/** * All operations running at cache initialization stage */ public void startup() { underlying.startup(); Orient.instance().getProfiler() .registerHookValue(profilerPrefix + "current", "Number of entries in cache", METRIC_TYPE.SIZE, new OProfilerHookValue() { public Object getValue() { return getSize(); } }, profilerMetadataPrefix + "current"); }
private void registerProfilerHooks() { Orient.instance().getProfiler() .registerHookValue("db." + this.name + ".createRecord", "Number of created records", OProfiler.METRIC_TYPE.COUNTER, new AtomicLongOProfilerHookValue(recordCreated), "db.*.createRecord"); .registerHookValue("db." + this.name + ".readRecord", "Number of read records", OProfiler.METRIC_TYPE.COUNTER, new AtomicLongOProfilerHookValue(recordRead), "db.*.readRecord"); .registerHookValue("db." + this.name + ".updateRecord", "Number of updated records", OProfiler.METRIC_TYPE.COUNTER, new AtomicLongOProfilerHookValue(recordUpdated), "db.*.updateRecord"); .registerHookValue("db." + this.name + ".deleteRecord", "Number of deleted records", OProfiler.METRIC_TYPE.COUNTER, new AtomicLongOProfilerHookValue(recordDeleted), "db.*.deleteRecord"); .registerHookValue("db." + this.name + ".scanRecord", "Number of read scanned", OProfiler.METRIC_TYPE.COUNTER, new AtomicLongOProfilerHookValue(recordScanned), "db.*.scanRecord"); .registerHookValue("db." + this.name + ".recyclePosition", "Number of recycled records", OProfiler.METRIC_TYPE.COUNTER, new AtomicLongOProfilerHookValue(recordRecycled), "db.*.recyclePosition"); .registerHookValue("db." + this.name + ".conflictRecord", "Number of conflicts during updating and deleting records", OProfiler.METRIC_TYPE.COUNTER, new AtomicLongOProfilerHookValue(recordConflict), "db.*.conflictRecord"); .registerHookValue("db." + this.name + ".txBegun", "Number of transactions begun", OProfiler.METRIC_TYPE.COUNTER, new AtomicLongOProfilerHookValue(txBegun), "db.*.txBegun"); .registerHookValue("db." + this.name + ".txCommit", "Number of committed transactions", OProfiler.METRIC_TYPE.COUNTER, new AtomicLongOProfilerHookValue(txCommit), "db.*.txCommit"); .registerHookValue("db." + this.name + ".txRollback", "Number of rolled back transactions", OProfiler.METRIC_TYPE.COUNTER,