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

    • Reading from database using SQL prepared statement
    • runOnUiThread (Activity)
    • onCreateOptionsMenu (Activity)
    • notifyDataSetChanged (ArrayAdapter)
    • SocketException (java.net)
      This SocketException may be thrown during socket creation or setting options, and is the superclass
    • SSLHandshakeException (javax.net.ssl)
      The exception that is thrown when a handshake could not be completed successfully.
    • HttpServlet (javax.servlet.http)
      Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
    • XPath (javax.xml.xpath)
      XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
    • Base64 (org.apache.commons.codec.binary)
      Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
    • Scheduler (org.quartz)
      This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
    • Sublime Text for Python
    Tabnine Logo
    • Products

      Search for Java codeSearch for JavaScript code
    • IDE Plugins

      IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Tabnine for your IDE now