Tabnine Logo
RedisMonitor.getRedisPerfInfo
Code IndexAdd Tabnine to your IDE (free)

How to use
getRedisPerfInfo
method
in
scouter.agent.counter.task.RedisMonitor

Best Java code snippets using scouter.agent.counter.task.RedisMonitor.getRedisPerfInfo (Showing top 1 results out of 315)

origin: scouter-project/scouter

public void process(CounterBasket pw) throws IOException {
  Configure conf = Configure.getInstance();
  boolean redisEnabled = conf.getBoolean("redis_enabled", false);
  if (redisEnabled) {
    String serverIp = conf.getValue("redis_server_ip", "127.0.0.1");
    int serverPort = conf.getInt("redis_server_port", 6379);
    String perfInfo = getRedisPerfInfo(serverIp, serverPort);
    String[] lines = perfInfo.split("\n");
    PerfCounterPack p = pw.getPack(conf.getObjName(), TimeTypeEnum.REALTIME);
    for (String line : lines) {
      String key = line.substring(0, line.indexOf(':'));
      String value = line.substring(line.indexOf(':') + 1);
      if (floatSet.contains(key)) {
        p.put(key, new FloatValue(Float.valueOf(value.trim())));
      }
      if (decimalSet.contains(key)) {
        p.put(key, new DecimalValue(Long.valueOf(value.trim())));
      }
    }
  }
}
scouter.agent.counter.taskRedisMonitorgetRedisPerfInfo

Popular methods of RedisMonitor

    Popular in Java

    • Making http post requests using okhttp
    • addToBackStack (FragmentTransaction)
    • getSharedPreferences (Context)
    • getSystemService (Context)
    • FlowLayout (java.awt)
      A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
    • Font (java.awt)
      The Font class represents fonts, which are used to render text in a visible way. A font provides the
    • DateFormat (java.text)
      Formats or parses dates and times.This class provides factories for obtaining instances configured f
    • Date (java.util)
      A specific moment in time, with millisecond precision. Values typically come from System#currentTime
    • AtomicInteger (java.util.concurrent.atomic)
      An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
    • BoxLayout (javax.swing)
    • Top plugins for Android Studio
    Tabnine Logo
    • Products

      Search for Java codeSearch for JavaScript code
    • IDE Plugins

      IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Tabnine for your IDE now