@Override public MetricRegistry getMetricRegistry() { return env.getSharedResources().getMetricRegistry(); }
@Override public MetricRegistry getMetricRegistry() { return env.getSharedResources().getMetricRegistry(); }
public CommitManager(final Environment env) { memoryLimit = new Limit(FluoConfigurationImpl.getTxCommitMemory(env.getConfiguration())); commitingTransactions = new AtomicInteger(0); env.getSharedResources().getMetricRegistry().register( env.getMetricNames().getCommitsProcessing(), (Gauge<Integer>) () -> commitingTransactions.get()); }
public CommitManager(final Environment env) { memoryLimit = new Limit(FluoConfigurationImpl.getTxCommitMemory(env.getConfiguration())); commitingTransactions = new AtomicInteger(0); env.getSharedResources().getMetricRegistry() .register(env.getMetricNames().getCommitsProcessing(), new Gauge<Integer>() { @Override public Integer getValue() { return commitingTransactions.get(); } }); }
public OracleClient(Environment env) { this.env = env; responseTimer = MetricsUtil.getTimer(env.getConfiguration(), env.getSharedResources().getMetricRegistry(), env.getMetricNames().getOracleResponseTime()); stampsHistogram = MetricsUtil.getHistogram(env.getConfiguration(), env.getSharedResources().getMetricRegistry(), env.getMetricNames().getOracleClientStamps()); timestampRetriever = new TimestampRetriever(); thread = new Thread(timestampRetriever); thread.setDaemon(true); thread.start(); }
public OracleClient(Environment env) { this.env = env; responseTimer = MetricsUtil.getTimer(env.getConfiguration(), env.getSharedResources().getMetricRegistry(), env.getMetricNames().getOracleResponseTime()); stampsHistogram = MetricsUtil.getHistogram(env.getConfiguration(), env.getSharedResources().getMetricRegistry(), env.getMetricNames().getOracleClientStamps()); timestampRetriever = new TimestampRetriever(); thread = new Thread(timestampRetriever); thread.setDaemon(true); thread.start(); }
public MetricsReporter getMetricsReporter() { return new MetricsReporterImpl(getConfiguration(), getSharedResources().getMetricRegistry(), getMetricsReporterID()); }
public MetricsReporter getMetricsReporter() { return new MetricsReporterImpl(getConfiguration(), getSharedResources().getMetricRegistry(), getMetricsReporterID()); }
public NotificationProcessor(Environment env) { int numThreads = env.getConfiguration().getWorkerThreads(); this.env = env; this.queue = new PriorityBlockingQueue<>(); this.executor = FluoExecutors.newFixedThreadPool(numThreads, queue, "ntfyProc"); this.tracker = new NotificationTracker(); this.observers = env.getConfiguredObservers().getObservers(env); env.getSharedResources().getMetricRegistry().register( env.getMetricNames().getNotificationQueued(), (Gauge<Integer>) () -> queue.size()); }
public OracleServer(Environment env) throws Exception { this.env = env; stampsHistogram = MetricsUtil.getHistogram(env.getConfiguration(), env.getSharedResources().getMetricRegistry(), env.getMetricNames().getOracleServerStamps()); this.cnxnListener = new CuratorCnxnListener(); this.maxTsPath = ZookeeperPath.ORACLE_MAX_TIMESTAMP; this.oraclePath = ZookeeperPath.ORACLE_SERVER; }
public NotificationProcessor(Environment env) { int numThreads = env.getConfiguration().getWorkerThreads(); this.env = env; this.queue = new PriorityBlockingQueue<>(); this.executor = FluoExecutors.newFixedThreadPool(numThreads, queue, "ntfyProc"); this.tracker = new NotificationTracker(); this.observers = env.getConfiguredObservers().getObservers(env); env.getSharedResources().getMetricRegistry() .register(env.getMetricNames().getNotificationQueued(), new Gauge<Integer>() { @Override public Integer getValue() { return queue.size(); } }); }
public void report(String status, String alias) { MetricNames names = env.getMetricNames(); MetricRegistry registry = env.getSharedResources().getMetricRegistry(); if (getLockWaitTime() > 0) { MetricsUtil.getTimer(env.getConfiguration(), registry, names.getTxLockWaitTime(alias)) .update(getLockWaitTime(), TimeUnit.MILLISECONDS); } MetricsUtil.getTimer(env.getConfiguration(), registry, names.getTxExecTime(alias)) .update(getReadTime(), TimeUnit.MILLISECONDS); if (getCollisions() > 0) { registry.meter(names.getTxWithCollision(alias)).mark(); registry.meter(names.getTxCollisions(alias)).mark(getCollisions()); } registry.meter(names.getTxEntriesSet(alias)).mark(getEntriesSet()); registry.meter(names.getTxEntriesRead(alias)).mark(getEntriesReturned()); if (getTimedOutLocks() > 0) { registry.meter(names.getTxLocksTimedout(alias)).mark(getTimedOutLocks()); } if (getDeadLocks() > 0) { registry.meter(names.getTxLocksDead(alias)).mark(getDeadLocks()); } registry.meter(names.getTxStatus(status.toLowerCase(), alias)).mark(); }
public void report(String status, String alias) { MetricNames names = env.getMetricNames(); MetricRegistry registry = env.getSharedResources().getMetricRegistry(); if (getLockWaitTime() > 0) { MetricsUtil.getTimer(env.getConfiguration(), registry, names.getTxLockWaitTime(alias)) .update(getLockWaitTime(), TimeUnit.MILLISECONDS); } MetricsUtil.getTimer(env.getConfiguration(), registry, names.getTxExecTime(alias)) .update(getReadTime(), TimeUnit.MILLISECONDS); if (getCollisions() > 0) { registry.meter(names.getTxWithCollision(alias)).mark(); registry.meter(names.getTxCollisions(alias)).mark(getCollisions()); } registry.meter(names.getTxEntriesSet(alias)).mark(getEntriesSet()); registry.meter(names.getTxEntriesRead(alias)).mark(getEntriesReturned()); if (getTimedOutLocks() > 0) { registry.meter(names.getTxLocksTimedout(alias)).mark(getTimedOutLocks()); } if (getDeadLocks() > 0) { registry.meter(names.getTxLocksDead(alias)).mark(getDeadLocks()); } registry.meter(names.getTxStatus(status.toLowerCase(), alias)).mark(); }
public OracleServer(Environment env) throws Exception { this.env = env; stampsHistogram = MetricsUtil.getHistogram(env.getConfiguration(), env.getSharedResources().getMetricRegistry(), env.getMetricNames().getOracleServerStamps()); this.cnxnListener = new CuratorCnxnListener(); this.maxTsPath = ZookeeperPath.ORACLE_MAX_TIMESTAMP; this.oraclePath = ZookeeperPath.ORACLE_SERVER; }