Codota Logo
Average.getAndClear
Code IndexAdd Codota to your IDE (free)

How to use
getAndClear
method
in
sirius.kernel.health.Average

Best Java code snippets using sirius.kernel.health.Average.getAndClear (Showing top 5 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Connection c =
  • Codota IconDataSource dataSource;dataSource.getConnection()
  • Codota IconString url;DriverManager.getConnection(url)
  • Codota IconIdentityDatabaseUtil.getDBConnection()
  • Smart code suggestions by Codota
}
origin: com.scireum/sirius-db

  @Override
  public void gather(MetricsCollector collector) {
    if (mongo.isConfigured()) {
      collector.metric("mongo_calls","mongo-calls", "Mongo DB Calls", mongo.callDuration.getCount(), "/min");
      collector.metric("mongo_call_duration","mongo-call-duration", "Mongo DB Call Duration", mongo.callDuration.getAndClear(), "ms");
      collector.differentialMetric("mongo_slow_queries",
                     "mongo-slow-queries",
                     "MongoDB Slow Queries",
                     mongo.numSlowQueries.getCount(),
                     "/min");
    }
  }
}
origin: com.scireum/sirius-db

  @Override
  public void gather(MetricsCollector collector) {
    if (redis.isConfigured()) {
      collector.metric("redis_calls", "redis-calls", "Redis Calls", redis.callDuration.getCount(), "/min");
      collector.metric("redis_call_duration",
               "redis-call-duration",
               "Redis Call Duration",
               redis.callDuration.getAndClear(),
               "ms");
      collector.metric("redis_memory_usage",
               "redis-memory-usage",
               "Redis Memory Usage",
               Value.of(redis.getInfo().get(Redis.INFO_USED_MEMORY)).asLong(0) / 1024d / 1024d,
               "MB");
      collector.metric("redis_messages",
               "redis-messages",
               "Redis PubSub Messages",
               redis.messageDuration.getCount(),
               "/min");
      collector.metric("redis_message_duration",
               "redis-message-duration",
               "Redis PubSub Message Duration",
               redis.messageDuration.getAndClear(),
               "ms");
    }
  }
}
origin: com.scireum/sirius-db

  @Override
  public void gather(MetricsCollector collector) {
    if (elastic.isConfigured()) {
      collector.differentialMetric("es_slow_queries",
                     "es-slow-queries",
                     "Elasticsearch Slow Queries",
                     elastic.numSlowQueries.getCount(),
                     "/min");
      collector.metric("es_calls", "es-calls", "Elasticsearch Calls", elastic.callDuration.getCount(), "/min");
      collector.metric("es_call_duration",
               "es-call-duration",
               "Elasticsearch Call Duration",
               elastic.callDuration.getAndClear(),
               "ms");
    }
  }
}
origin: com.scireum/sirius-db

"db-query-duration",
"JDBC Query Duration",
queryDuration.getAndClear(),
"ms");
origin: com.scireum/sirius-search

         "index-queryDuration",
         "ES-QueryDuration",
         index.queryDuration.getAndClear(),
         "ms");
collector.differentialMetric("index-queries",
sirius.kernel.healthAveragegetAndClear

Javadoc

Returns the average just like #getAvg() but then resets the internal buffers to zero.

Popular methods of Average

  • addValue
    Adds the given value to the set of values on which the average is based. If the sum of all values is
  • getCount
    Returns the number of total values inserted in the average.
  • addValues
    Adds the given number of values to the counter and increments the sum by the given delta.
  • getAvg
    Returns the average of the added values. Returns the sliding average of the last 100 values
  • <init>
    Creates a new average which averages up to maxSamples and then computes the effective avarage and re

Popular in Java

  • Making http post requests using okhttp
  • getSystemService (Context)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • putExtra (Intent)
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • ResourceBundle (java.util)
    Resource bundles contain locale-specific objects. When your program needs a locale-specific resource
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • JFrame (javax.swing)
  • JOptionPane (javax.swing)
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now