Package com.orientechnologies.common.profiler.OAbstractProfiler

Examples of com.orientechnologies.common.profiler.OAbstractProfiler.OProfilerHookValue


    Orient
        .instance()
        .getProfiler()
        .registerHookValue("server.connections.actives", "Number of active network connections", METRIC_TYPE.COUNTER,
            new OProfilerHookValue() {
              public Object getValue() {
                return connections.size();
              }
            });
  }
View Full Code Here


    Orient
        .instance()
        .getProfiler()
        .registerHookValue("system.databases", "List of databases configured in Server", METRIC_TYPE.TEXT,
            new OProfilerHookValue() {
              @Override
              public Object getValue() {
                final StringBuilder dbs = new StringBuilder(64);
                for (String dbName : getAvailableStorageNames().keySet()) {
                  if (dbs.length() > 0)
View Full Code Here

   */
  public void startup() {
    underlying.startup();

    Orient.instance().getProfiler()
        .registerHookValue(profilerPrefix + "enabled", "Cache enabled", METRIC_TYPE.ENABLED, new OProfilerHookValue() {
          public Object getValue() {
            return isEnabled();
          }
        }, profilerMetadataPrefix + "enabled");

    Orient.instance().getProfiler()
        .registerHookValue(profilerPrefix + "current", "Number of entries in cache", METRIC_TYPE.SIZE, new OProfilerHookValue() {
          public Object getValue() {
            return getSize();
          }
        }, profilerMetadataPrefix + "current");

    Orient
        .instance()
        .getProfiler()
        .registerHookValue(profilerPrefix + "max", "Maximum number of entries in cache", METRIC_TYPE.SIZE,
            new OProfilerHookValue() {
              public Object getValue() {
                return getMaxSize();
              }
            }, profilerMetadataPrefix + "max");
  }
View Full Code Here

      METRIC_HITS_METADATA = profiler.getDatabaseMetric(null, "diskCache.hits");
      METRIC_MISSED = profiler.getDatabaseMetric(storageName, "diskCache.missed");
      METRIC_MISSED_METADATA = profiler.getDatabaseMetric(null, "diskCache.missed");

      profiler.registerHookValue(profiler.getDatabaseMetric(storageName, "diskCache.totalMemory"),
          "Total memory used by Disk Cache", METRIC_TYPE.SIZE, new OProfilerHookValue() {
            @Override
            public Object getValue() {
              return (am.size() + a1in.size()) * pageSize;
            }
          }, profiler.getDatabaseMetric(null, "diskCache.totalMemory"));

      profiler.registerHookValue(profiler.getDatabaseMetric(storageName, "diskCache.maxMemory"),
          "Maximum memory used by Disk Cache", METRIC_TYPE.SIZE, new OProfilerHookValue() {
            @Override
            public Object getValue() {
              return maxSize * pageSize;
            }
          }, profiler.getDatabaseMetric(null, "diskCache.maxMemory"));
View Full Code Here

    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");
  }
View Full Code Here

TOP

Related Classes of com.orientechnologies.common.profiler.OAbstractProfiler.OProfilerHookValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.