Tabnine Logo
CSVSampleProcessor.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
com.ning.billing.meter.timeline.consumer.CSVSampleProcessor
constructor

Best Java code snippets using com.ning.billing.meter.timeline.consumer.CSVSampleProcessor.<init> (Showing top 4 results out of 315)

origin: com.ning.billing/killbill-meter

public AccumulatingJsonSamplesOutputer(final TimeAggregationMode timeAggregationMode, final TimelineEventHandler timelineEventHandler,
                    final TimelineDao timelineDao, final InternalTenantContext context) {
  super(timelineEventHandler, timelineDao, context);
  this.accumulatorSampleConsumer = new AccumulatorSampleConsumer(timeAggregationMode, new CSVSampleProcessor());
}
origin: com.ning.billing/killbill-meter

public static String getSamplesAsCSV(final SampleCoder sampleCoder, final TimelineChunk chunk, @Nullable final DateTime startTime, @Nullable final DateTime endTime) throws IOException {
  final CSVSampleProcessor processor = new CSVSampleProcessor(startTime, endTime);
  return getSamplesAsCSV(sampleCoder, chunk, processor);
}
origin: com.ning.billing/killbill-meter

  private DecimatingSampleFilter createDecimatingSampleFilter(final Integer outputCount, final DecimationMode decimationMode, final DateTime startTime, final DateTime endTime) {
    final DecimatingSampleFilter rangeSampleProcessor;
    if (outputCount == null) {
      rangeSampleProcessor = null;
    } else {
      // TODO Fix the polling interval
      rangeSampleProcessor = new DecimatingSampleFilter(startTime, endTime, outputCount, new TimeSpan("1s"), decimationMode, new CSVSampleProcessor());
    }

    return rangeSampleProcessor;
  }
}
origin: com.ning.billing/killbill-meter

  @Test(groups = "fast")
  public void testDailyAggregation() throws Exception {
    clock.setTime(new DateTime(2012, 12, 1, 12, 40, DateTimeZone.UTC));
    final DateTime start = clock.getUTCNow();

    final AccumulatorSampleConsumer sampleConsumer = new AccumulatorSampleConsumer(TimeAggregationMode.DAYS, new CSVSampleProcessor());

    // 5 for day 1
    sampleConsumer.processOneSample(start, SampleOpcode.DOUBLE, (double) 1);
    sampleConsumer.processOneSample(start.plusHours(4), SampleOpcode.DOUBLE, (double) 4);
    // 1 for day 2
    sampleConsumer.processOneSample(start.plusDays(1), SampleOpcode.DOUBLE, (double) 1);
    // 10 and 20 for day 3 (with different opcode)
    sampleConsumer.processOneSample(start.plusDays(2), SampleOpcode.DOUBLE, (double) 10);
    sampleConsumer.processOneSample(start.plusDays(2), SampleOpcode.INT, 20);

    Assert.assertEquals(sampleConsumer.flush(), "1354320000,5.0,1354406400,1.0,1354492800,10.0,1354492800,20.0");
  }
}
com.ning.billing.meter.timeline.consumerCSVSampleProcessor<init>

Popular methods of CSVSampleProcessor

    Popular in Java

    • Making http post requests using okhttp
    • orElseThrow (Optional)
      Return the contained value, if present, otherwise throw an exception to be created by the provided s
    • runOnUiThread (Activity)
    • getSystemService (Context)
    • Table (com.google.common.collect)
      A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
    • FileOutputStream (java.io)
      An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
    • System (java.lang)
      Provides access to system-related information and resources including standard input and output. Ena
    • Format (java.text)
      The base class for all formats. This is an abstract base class which specifies the protocol for clas
    • TreeSet (java.util)
      TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
    • LoggerFactory (org.slf4j)
      The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
    • 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