Examples of MetricCalculatorSettings


Examples of org.apache.aurora.scheduler.sla.MetricCalculator.MetricCalculatorSettings

  @Before
  public void setUp() throws Exception {
    StatsProvider statsProvider = createMock(StatsProvider.class);
    StatsProvider untracked = createMock(StatsProvider.class);
    MetricCalculatorSettings settings = new MetricCalculatorSettings(10000);
    storageUtil = new StorageTestUtil(this);
    calculator = new MetricCalculator(storageUtil.storage, clock, settings, statsProvider);
    expect(statsProvider.untracked()).andReturn(untracked).anyTimes();
    expect(untracked.makeGauge(EasyMock.anyString(), EasyMock.<Supplier<Number>>anyObject()))
        .andReturn(EasyMock.<Stat<Number>>anyObject())
View Full Code Here

Examples of org.apache.aurora.scheduler.sla.MetricCalculator.MetricCalculatorSettings

  }

  @Override
  protected void configure() {
    bind(MetricCalculatorSettings.class)
        .toInstance(new MetricCalculatorSettings(refreshInterval.as(Time.MILLISECONDS)));

    bind(MetricCalculator.class).in(Singleton.class);
    bind(ScheduledExecutorService.class)
        .annotatedWith(SlaExecutor.class)
        .toInstance(AsyncUtil.singleThreadLoggingScheduledExecutor("SlaStat-%d", LOG));
View Full Code Here

Examples of org.apache.aurora.scheduler.sla.MetricCalculator.MetricCalculatorSettings

  }

  @Override
  protected void configure() {
    bind(MetricCalculatorSettings.class)
        .toInstance(new MetricCalculatorSettings(refreshInterval.as(Time.MILLISECONDS)));

    bind(MetricCalculator.class).in(Singleton.class);
    bind(ScheduledExecutorService.class)
        .annotatedWith(SlaExecutor.class)
        .toInstance(AsyncUtil.singleThreadLoggingScheduledExecutor("SlaStat-%d", LOG));
View Full Code Here

Examples of org.apache.aurora.scheduler.sla.MetricCalculator.MetricCalculatorSettings

  @Test
  public void runTest() {
    FakeClock clock = new FakeClock();
    StatsProvider statsProvider = createMock(StatsProvider.class);
    StatsProvider untracked = createMock(StatsProvider.class);
    MetricCalculatorSettings settings = new MetricCalculatorSettings(10000);
    StorageTestUtil storageUtil = new StorageTestUtil(this);
    MetricCalculator calculator = new MetricCalculator(
        storageUtil.storage,
        clock,
        settings,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.