congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
RequestLog.durations
Code IndexAdd Tabnine to your IDE (free)

How to use
durations
method
in
com.yahoo.bard.webservice.logging.RequestLog

Best Java code snippets using com.yahoo.bard.webservice.logging.RequestLog.durations (Showing top 2 results out of 315)

origin: yahoo/fili

/**
 * Get the aggregate durations for this request.
 *
 * @return A map of phase to duration (ns)
 */
public static Map<String, Long> getDurations() {
  RequestLog log = RLOG.get();
  return log.durations();
}
origin: yahoo/fili

/**
 * Adds the durations in milliseconds of all the recorded timed phases to a map.
 *
 * @return the map containing all the recorded times per phase in milliseconds
 */
private Map<String, Float> aggregateDurations() {
  Map<String, Long> durations = durations();
  OptionalLong max = durations.entrySet()
      .stream()
      .filter(e -> e.getKey().contains(DRUID_QUERY_TIMER))
      .mapToLong(Map.Entry::getValue)
      .peek(v -> REGISTRY.timer(DRUID_QUERY_ALL_TIMER).update(v, TimeUnit.NANOSECONDS))
      .max();
  if (max.isPresent()) {
    REGISTRY.timer(DRUID_QUERY_MAX_TIMER).update(max.getAsLong(), TimeUnit.NANOSECONDS);
    durations.put(DRUID_QUERY_MAX_TIMER, max.getAsLong());
  }
  return durations.entrySet()
      .stream()
      .collect(Collectors.toMap(Map.Entry::getKey, e -> (float) e.getValue() / MS_PER_NS));
}
com.yahoo.bard.webservice.loggingRequestLogdurations

Javadoc

Adds the durations in milliseconds of all the recorded timed phases to a map.

Popular methods of RequestLog

  • dump
  • restore
  • copy
    Exports a snapshot of the request log of the current thread without resetting the request log for th
  • log
  • startTiming
  • stopTiming
  • <init>
    Copy constructor is also private.
  • accumulate
    Accumulates timings and threads to current thread's request log context. It fills in the contents fo
  • addIdPrefix
    Prepend an id prefix to generated druid query id.
  • aggregateDurations
    Adds the durations in milliseconds of all the recorded timed phases to a map.
  • clear
    Resets the contents of a request log at the calling thread.
  • export
    Exports current thread's request log object as a formatted string without resetting it.
  • clear,
  • export,
  • getId,
  • getLoginfoOrder,
  • init,
  • isRunning,
  • record,
  • registerTime,
  • retrieve

Popular in Java

  • Creating JSON documents from java classes using gson
  • findViewById (Activity)
  • putExtra (Intent)
  • getSharedPreferences (Context)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Top Vim plugins
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