io.airlift.stats.Distribution类的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(5.4k)|赞(0)|评价(0)|浏览(167)

本文整理了Java中io.airlift.stats.Distribution类的一些代码示例,展示了Distribution类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Distribution类的具体详情如下:
包路径:io.airlift.stats.Distribution
类名称:Distribution

Distribution介绍

暂无

代码示例

代码示例来源:origin: prestodb/presto

private static DistributionSnapshot getTestDistribution(int count)
  {
    Distribution distribution = new Distribution();
    for (int i = 0; i < count; i++) {
      distribution.add(i);
    }
    return distribution.snapshot();
  }
}

代码示例来源:origin: prestodb/presto

MaterializedResult results = toMaterializedResult(getSession(config), columnTypes, pages);
assertEquals(results, expectedResults);
assertEquals(stats.getInputPageSizeInBytes().getAllTime().getMax(), page.getRetainedSizeInBytes());
return length;

代码示例来源:origin: prestodb/presto

assertEquals((long) stats.getIndexPageSize().getAllTime().getTotal(), 0);
signals.get(0).await(1, SECONDS);
signals.get(1).await(1, SECONDS);
assertEquals((long) stats.getIndexPageSize().getAllTime().getTotal(), 0);
Page page = pageSource.getNextPage();
pageSizeReceived += page.getSizeInBytes();
assertEquals((long) stats.getIndexPageSize().getAllTime().getTotal(), pageSizeReceived);
assertNotNull(page);
assertEquals(page.getPositionCount(), 1);
assertNotNull(page);
pageSizeReceived += page.getSizeInBytes();
assertEquals((long) stats.getIndexPageSize().getAllTime().getTotal(), pageSizeReceived);
assertEquals(page.getPositionCount(), 1);
assertEquals(page.getBlock(0).getInt(0, 0), 10);
assertNotNull(page);
pageSizeReceived += page.getSizeInBytes();
assertEquals((long) stats.getIndexPageSize().getAllTime().getTotal(), pageSizeReceived);
assertEquals(page.getPositionCount(), 1);
assertEquals(page.getBlock(0).getInt(0, 0), 30);

代码示例来源:origin: airlift/airlift

@Managed
public synchronized double getAvg()
{
  return getTotal() / getCount();
}

代码示例来源:origin: airlift/airlift

@Managed
public long getMax()
{
  return getDistribution().getMax();
}

代码示例来源:origin: airlift/airlift

@Managed
public double getTotal()
{
  return getDistribution().getTotal();
}

代码示例来源:origin: airlift/airlift

@Managed
public double getCount()
{
  return getDistribution().getCount();
}

代码示例来源:origin: airlift/airlift

@Managed
public double getMaxError()
{
  return getDistribution().getMaxError();
}

代码示例来源:origin: prestodb/presto

public void recordGetSplitTime(long startNanos)
{
  long elapsedNanos = System.nanoTime() - startNanos;
  getSplitDistribution.add(elapsedNanos);
  scheduledStats.getGetSplitTime().add(elapsedNanos, NANOSECONDS);
}

代码示例来源:origin: stackoverflow.com

SnapshotManager snapshotManager = mock(SnapshotManager.class);
when(snapshotManager.storeBroadcast("MessageURL1", "B1")).thenReturn(new Distribution("AltMessageURL1", 1));

代码示例来源:origin: airlift/airlift

public synchronized DistributionSnapshot snapshot()
{
  List<Long> quantiles = digest.getQuantiles(ImmutableList.of(0.01, 0.05, 0.10, 0.25, 0.5, 0.75, 0.9, 0.95, 0.99));
  return new DistributionSnapshot(
      getMaxError(),
      getCount(),
      getTotal(),
      quantiles.get(0),
      quantiles.get(1),
      quantiles.get(2),
      quantiles.get(3),
      quantiles.get(4),
      quantiles.get(5),
      quantiles.get(6),
      quantiles.get(7),
      quantiles.get(8),
      getMin(),
      getMax(),
      getAvg());
}

代码示例来源:origin: uk.co.nichesolutions.presto/presto-main

Distribution durationDistribution = new Distribution();
Distribution taskParallelismDistribution = new Distribution();
  durationDistribution.add(taskDuration.toMillis());
  taskParallelismDistribution.add((long) (taskParallelism * 100));
Map<Double, Long> durationPercentiles = durationDistribution.getPercentiles();
System.out.printf("   wall time ms :: p01 %4s :: p05 %4s :: p10 %4s :: p97 %4s :: p50 %4s :: p75 %4s :: p90 %4s :: p95 %4s :: p99 %4s\n",
    durationPercentiles.get(0.01),
    durationPercentiles.get(0.99));
Map<Double, Long> parallelismPercentiles = taskParallelismDistribution.getPercentiles();
System.out.printf("    parallelism :: p99 %4.2f :: p95 %4.2f :: p90 %4.2f :: p75 %4.2f :: p50 %4.2f :: p25 %4.2f :: p10 %4.2f :: p05 %4.2f :: p01 %4.2f\n",
    parallelismPercentiles.get(0.99) / 100.0,

代码示例来源:origin: prestodb/presto

getSplitDistribution.snapshot(),

代码示例来源:origin: stackoverflow.com

Distribution dist = new Distribution(6, 10); // 6 trues out of 10
dist.next(); // get next bool

代码示例来源:origin: io.airlift/stats

@Managed
public synchronized double getAvg()
{
  return getTotal() / getCount();
}

代码示例来源:origin: prestodb/presto

queuedTime.add(driverStats.getQueuedTime().roundTo(NANOSECONDS));
elapsedTime.add(driverStats.getElapsedTime().roundTo(NANOSECONDS));

代码示例来源:origin: io.airlift/stats

public DistributionStat()
{
  oneMinute = new Distribution(ExponentialDecay.oneMinute());
  fiveMinutes = new Distribution(ExponentialDecay.fiveMinutes());
  fifteenMinutes = new Distribution(ExponentialDecay.fifteenMinutes());
  allTime = new Distribution();
}

代码示例来源:origin: io.airlift/stats

public synchronized DistributionSnapshot snapshot()
{
  List<Long> quantiles = digest.getQuantiles(ImmutableList.of(0.01, 0.05, 0.10, 0.25, 0.5, 0.75, 0.9, 0.95, 0.99));
  return new DistributionSnapshot(
      getMaxError(),
      getCount(),
      getTotal(),
      quantiles.get(0),
      quantiles.get(1),
      quantiles.get(2),
      quantiles.get(3),
      quantiles.get(4),
      quantiles.get(5),
      quantiles.get(6),
      quantiles.get(7),
      quantiles.get(8),
      getMin(),
      getMax(),
      getAvg());
}

代码示例来源:origin: io.airlift/stats

public DistributionStatSnapshot snapshot()
{
  return new DistributionStatSnapshot(
      getOneMinute().snapshot(),
      getFiveMinutes().snapshot(),
      getFifteenMinutes().snapshot(),
      getAllTime().snapshot());
}

代码示例来源:origin: prestodb/presto

private static DistributionSnapshot getTestDistribution(int count)
  {
    Distribution distribution = new Distribution();
    for (int i = 0; i < count; i++) {
      distribution.add(i);
    }
    return distribution.snapshot();
  }
}

相关文章