Examples of OProfilerHookValue


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

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

    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

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

   */
  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

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

      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

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

    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

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

      lock.releaseExclusiveLock();
    }
  }

  private void installProfilerHooks() {
    OProfiler.getInstance().registerHookValue("storage." + name + ".data.holes", new OProfilerHookValue() {
      public Object getValue() {
        return getHoles();
      }
    });
    OProfiler.getInstance().registerHookValue("storage." + name + ".data.holeSize", new OProfilerHookValue() {
      public Object getValue() {
        return getHoleSize();
      }
    });
  }
View Full Code Here

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

          }
        }
      }
    });

    OProfiler.getInstance().registerHookValue(profilerPrefix + ".cache.enabled", new OProfilerHookValue() {
      public Object getValue() {
        return enabled;
      }
    });

    OProfiler.getInstance().registerHookValue(profilerPrefix + ".cache.current", new OProfilerHookValue() {
      public Object getValue() {
        acquireSharedLock();
        try {
          return entries.size();
        } finally {
          releaseSharedLock();
        }
      }
    });

    OProfiler.getInstance().registerHookValue(profilerPrefix + ".cache.max", new OProfilerHookValue() {
      public Object getValue() {
        return maxSize;
      }
    });
  }
View Full Code Here

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

  public boolean isAutomatic() {
    return automatic;
  }

  protected void installHooks(final ODatabaseRecord iDatabase) {
    OProfiler.getInstance().registerHookValue("index." + name + ".items", new OProfilerHookValue() {
      public Object getValue() {
        acquireSharedLock();
        try {
          return map != null ? map.size() : "-";
        } finally {
          releaseSharedLock();
        }
      }
    });

    OProfiler.getInstance().registerHookValue("index." + name + ".entryPointSize", new OProfilerHookValue() {
      public Object getValue() {
        return map != null ? map.getEntryPointSize() : "-";
      }
    });

    OProfiler.getInstance().registerHookValue("index." + name + ".maxUpdateBeforeSave", new OProfilerHookValue() {
      public Object getValue() {
        return map != null ? map.getMaxUpdatesBeforeSave() : "-";
      }
    });

    OProfiler.getInstance().registerHookValue("index." + name + ".optimizationThreshold", new OProfilerHookValue() {
      public Object getValue() {
        return map != null ? map.getOptimizeThreshold() : "-";
      }
    });
View Full Code Here

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

          OProfiler.getInstance().stopChrono("OMemoryWatchDog.freeResources", timer);
        }
      }
    }, null, null);

    OProfiler.getInstance().registerHookValue("memory.alerts", new OProfilerHookValue() {
      public Object getValue() {
        return alertTimes;
      }
    });
  }
View Full Code Here

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

  public OStorageConfigurationSegment getConfigurationSegment() {
    return configurationSegment;
  }

  private void installProfilerHooks() {
    OProfiler.getInstance().registerHookValue("storage." + name + ".data.holes", new OProfilerHookValue() {
      public Object getValue() {
        return getHoles();
      }
    });
    OProfiler.getInstance().registerHookValue("storage." + name + ".data.holeSize", new OProfilerHookValue() {
      public Object getValue() {
        return getHoleSize();
      }
    });
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.