congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
org.apache.samza.metrics
Code IndexAdd Tabnine to your IDE (free)

How to use org.apache.samza.metrics

Best Java code snippets using org.apache.samza.metrics (Showing top 20 results out of 315)

origin: stackoverflow.com

 // create a new server listening on port 8000
JmxServer jmxServer = new JmxServer(8000);
// start our server
jmxServer.start();
// register our lookupCache object defined below
jmxServer.register(lookupCache);
jmxServer.register(someOtherObject);
// stop our server
jmxServer.stop();
origin: apache/samza

 public void visit(MetricsVisitor visitor) {
  updateGaugeValues(percentile);
  visitor.gauge(this);
 }
}
origin: apache/samza

/**
 * Default constructor. It uses {@link SlidingTimeWindowReservoir} as the
 * default reservoir.
 *
 * @param name name of this timer
 */
public Timer(String name) {
 this(name, new SlidingTimeWindowReservoir());
}
origin: apache/samza

public <T> Gauge<T> newGauge(String name, final ValueFunction<T> valueFunc) {
 return registry.newGauge(groupName, new Gauge<T>((prefix + name).toLowerCase(), valueFunc.getValue()) {
  @Override
  public T getValue() {
   return valueFunc.getValue();
  }
 });
}
origin: apache/samza

/**
 * Updates the MetricsRegistery of this operator
 * @param startProcessing = begin processing of the message
 * @param endProcessing = end of processing
 */
private void updateMetrics(Instant startProcessing, Instant endProcessing) {
 queryInputEvents.inc();
 processingTime.update(Duration.between(startProcessing, endProcessing).toMillis());
}
origin: apache/samza

public static void incCounter(Counter counter) {
 if (counter != null) {
  counter.inc();
 }
}
origin: apache/samza

public <T> ListGauge<T> newListGauge(String name) {
 return registry.newListGauge(groupName, new ListGauge(name));
}
origin: apache/samza

public static void updateTimer(Timer timer, long duration) {
 if (timer != null) {
  timer.update(duration);
 }
}
origin: stackoverflow.com

 // create a new server listening on port 8000
JmxServer jmxServer = new JmxServer(8000);
jmxServer.start();
// register our lookupCache object defined above
jmxServer.register(lookupCache);
origin: apache/samza

 @Override
 public void run() {
  for (int i = 1; i <= 100; i++) {
   listGauge.add(i);
  }
 }
});
origin: apache/samza

 @Override
 public T getValue() {
  return valueFunc.getValue();
 }
});
origin: apache/samza

 @Override
 public Map<String, Double> getTimerValues(String group, String timer) {
  return getMetricValues(group, timer, "AverageTime");
 }
}
origin: apache/samza

/**
 * {@inheritDoc}
 */
@Override
public void visit(MetricsVisitor visitor) {
 visitor.listGauge(this);
}
origin: org.apache.samza/samza-core_2.12

public <T> Gauge<T> newGauge(String name, final ValueFunction<T> valueFunc) {
 return registry.newGauge(groupName, new Gauge<T>((prefix + name).toLowerCase(), valueFunc.getValue()) {
  @Override
  public T getValue() {
   return valueFunc.getValue();
  }
 });
}
origin: apache/samza

/**
 * Construct a {@link Timer} with given window size and collision buffer
 *
 * @param name name of this timer
 * @param windowMs the window size. unit is millisecond
 * @param collisionBuffer amount of collisions allowed in one millisecond.
 * @param clock the clock for the reservoir
 */
public Timer(String name, long windowMs, int collisionBuffer, Clock clock) {
 this(name, new SlidingTimeWindowReservoir(windowMs, collisionBuffer, clock));
}
origin: apache/samza

 @Override
 public void run() {
  for (int i = 1; i <= 100; i++) {
   listGauge.add(i);
  }
 }
});
origin: org.apache.samza/samza-core_2.10

public <T> Gauge<T> newGauge(String name, final ValueFunction<T> valueFunc) {
 return registry.newGauge(groupName, new Gauge<T>((prefix + name).toLowerCase(), valueFunc.getValue()) {
  @Override
  public T getValue() {
   return valueFunc.getValue();
  }
 });
}
origin: apache/samza

/**
 * Construct a {@link Timer} with given window size
 *
 * @param name name of this timer
 * @param windowMs the window size. unit is millisecond
 * @param clock the clock for the reservoir
 */
public Timer(String name, long windowMs, Clock clock) {
 this(name, new SlidingTimeWindowReservoir(windowMs, clock));
}
origin: org.apache.samza/samza-core_2.11

public <T> Gauge<T> newGauge(String name, final ValueFunction<T> valueFunc) {
 return registry.newGauge(groupName, new Gauge<T>((prefix + name).toLowerCase(), valueFunc.getValue()) {
  @Override
  public T getValue() {
   return valueFunc.getValue();
  }
 });
}
origin: org.apache.samza/samza-core

public <T> Gauge<T> newGauge(String name, final ValueFunction<T> valueFunc) {
 return registry.newGauge(groupName, new Gauge<T>((prefix + name).toLowerCase(), valueFunc.getValue()) {
  @Override
  public T getValue() {
   return valueFunc.getValue();
  }
 });
}
org.apache.samza.metrics

Most used classes

  • Counter
    A counter is a org.apache.samza.metrics.Metric that represents a cumulative value. For example, the
  • MetricsRegistryMap
  • Gauge
    A Gauge is a org.apache.samza.metrics.Metric that wraps some instance of T in a thread-safe referenc
  • MetricsRegistry
    A MetricsRegistry allows its users to create new org.apache.samza.metrics.Metrics and have those met
  • Timer
    A timer metric that stores time duration and provides Snapshot of the durations.
  • Snapshot,
  • JmxMetricsAccessor,
  • MetricsReporter,
  • JmxServer,
  • JmxUtil,
  • MetricsSnapshot,
  • ContainerProcessManagerMetrics,
  • MetricGroup$ValueFunction,
  • MetricGroup,
  • MetricsReporterFactory,
  • ReadableMetricsRegistry,
  • SlidingTimeWindowReservoir,
  • SamzaHistogram,
  • MetricsValidator
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