Tabnine Logo
DoublePopulationStatisticsAggregator.formatDouble
Code IndexAdd Tabnine to your IDE (free)

How to use
formatDouble
method
in
com.liveramp.hank.partition_server.DoublePopulationStatisticsAggregator

Best Java code snippets using com.liveramp.hank.partition_server.DoublePopulationStatisticsAggregator.formatDouble (Showing top 2 results out of 315)

origin: LiveRamp/hank

public String format() {
 double[] deciles = computeDeciles();
 StringBuilder result = new StringBuilder();
 // Compute median
 double median = numValues == 0 ? 0 : deciles[4];
 // Compute 90% percentile
 double ninetiethPercentile = numValues == 0 ? 0 : deciles[8];
 result.append(formatDouble(getMean()));
 result.append(" / ");
 result.append(formatDouble(median));
 result.append(" / ");
 result.append(formatDouble(ninetiethPercentile));
 result.append(" ms");
 return result.toString();
}
origin: LiveRamp/hank

private static void addBar(StringBuilder content, String label, Double value, Double maximum, String unit) {
 if (value == null) {
  value = 0.0;
 }
 if (maximum == null) {
  maximum = 0.0;
 }
 long size = 0;
 if (maximum != 0) {
  size = Math.round(BAR_SIZE * (Math.log(1 + value) / Math.log(1 + maximum)));
 }
 if (size < 1) {
  size = 1;
 }
 content.append("<tr><td>");
 content.append(label);
 content.append("</td><td>");
 content.append("<div class='tooltipBar' style='width: " + size + "px;'></div>");
 content.append("</td><td>");
 content.append(DoublePopulationStatisticsAggregator.formatDouble(value));
 content.append(unit);
 content.append("</td></tr>");
}
com.liveramp.hank.partition_serverDoublePopulationStatisticsAggregatorformatDouble

Popular methods of DoublePopulationStatisticsAggregator

  • computeDeciles
  • <init>
  • aggregate
  • clear
  • combine
  • format
  • getDecileIndex
  • getInterpolatedValueAtIndex
  • getMaximum
  • getMean
  • getMinimum
  • getSortedPopulationDecile
  • getMinimum,
  • getSortedPopulationDecile,
  • getStatistics,
  • toString

Popular in Java

  • Reading from database using SQL prepared statement
  • getResourceAsStream (ClassLoader)
  • notifyDataSetChanged (ArrayAdapter)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • JPanel (javax.swing)
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top plugins for WebStorm
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