Tabnine Logo
CSVSampleProcessor
Code IndexAdd Tabnine to your IDE (free)

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

Best Java code snippets using com.ning.billing.meter.timeline.consumer.CSVSampleProcessor (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

Most used methods

  • <init>

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSystemService (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • addToBackStack (FragmentTransaction)
  • String (java.lang)
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • JList (javax.swing)
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Top 12 Jupyter Notebook extensions
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