io.airlift.stats.Distribution.<init>()方法的使用及代码示例

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

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

Distribution.<init>介绍

暂无

代码示例

代码示例来源: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

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

Distribution queuedTime = new Distribution(this.queuedTime);
Distribution elapsedTime = new Distribution(this.elapsedTime);

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

private static StageCpuDistribution computeCpuDistribution(StageInfo stageInfo)
  {
    Distribution cpuDistribution = new Distribution();

    for (TaskInfo taskInfo : stageInfo.getTasks()) {
      cpuDistribution.add(taskInfo.getStats().getTotalCpuTime().toMillis());
    }

    DistributionSnapshot snapshot = cpuDistribution.snapshot();

    return new StageCpuDistribution(
        stageInfo.getStageId().getId(),
        stageInfo.getTasks().size(),
        snapshot.getP25(),
        snapshot.getP50(),
        snapshot.getP75(),
        snapshot.getP90(),
        snapshot.getP95(),
        snapshot.getP99(),
        snapshot.getMin(),
        snapshot.getMax(),
        (long) snapshot.getTotal(),
        snapshot.getTotal() / snapshot.getCount());
  }
}

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

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

代码示例来源: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: airlift/airlift

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

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

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

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

public DestinationDistribution(HttpClient httpClient, Processor processor)
  {
    super(() -> {
      Distribution distribution = new Distribution();
      httpClient.getDestinations().stream()
          .filter(PoolingHttpDestination.class::isInstance)
          .map(PoolingHttpDestination.class::cast)
          .forEach(destination -> processor.process(distribution, destination));
      return distribution;
    });
  }
}

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

public RequestDistribution(HttpClient httpClient, Processor processor)
  {
    super(() -> {
      long now = System.nanoTime();
      Distribution distribution = new Distribution();
      httpClient.getDestinations().stream()
          .filter(PoolingHttpDestination.class::isInstance)
          .map(PoolingHttpDestination.class::cast)
          .map(JettyHttpClient::getRequestListenersForDestination)
          .flatMap(List::stream)
          .forEach(listener -> processor.process(distribution, listener, now));
      return distribution;
    });
  }
}

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

public ConnectionPoolDistribution(HttpClient httpClient, Processor processor)
  {
    super(() -> {
      Distribution distribution = new Distribution();
      httpClient.getDestinations().stream()
          .filter(PoolingHttpDestination.class::isInstance)
          .map(PoolingHttpDestination.class::cast)
          .map(PoolingHttpDestination::getConnectionPool)
          .filter(Objects::nonNull)
          .map(DuplexConnectionPool.class::cast)
          .forEach(pool -> processor.process(distribution, pool));
      return distribution;
    });
  }
}

代码示例来源:origin: io.prestosql/presto-main

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

代码示例来源:origin: prestosql/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: uk.co.nichesolutions.presto/presto-main

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

代码示例来源:origin: io.prestosql/presto-main

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

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

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

代码示例来源:origin: prestosql/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: uk.co.nichesolutions.presto/presto-main

Distribution durationDistribution = new Distribution();
Distribution taskParallelismDistribution = new Distribution();

代码示例来源:origin: io.prestosql/presto-main

private static StageCpuDistribution computeCpuDistribution(StageInfo stageInfo)
  {
    Distribution cpuDistribution = new Distribution();

    for (TaskInfo taskInfo : stageInfo.getTasks()) {
      cpuDistribution.add(taskInfo.getStats().getTotalCpuTime().toMillis());
    }

    DistributionSnapshot snapshot = cpuDistribution.snapshot();

    return new StageCpuDistribution(
        stageInfo.getStageId().getId(),
        stageInfo.getTasks().size(),
        snapshot.getP25(),
        snapshot.getP50(),
        snapshot.getP75(),
        snapshot.getP90(),
        snapshot.getP95(),
        snapshot.getP99(),
        snapshot.getMin(),
        snapshot.getMax(),
        (long) snapshot.getTotal(),
        snapshot.getTotal() / snapshot.getCount());
  }
}

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

private static StageCpuDistribution computeCpuDistribution(StageInfo stageInfo)
  {
    Distribution cpuDistribution = new Distribution();

    for (TaskInfo taskInfo : stageInfo.getTasks()) {
      cpuDistribution.add(taskInfo.getStats().getTotalCpuTime().toMillis());
    }

    DistributionSnapshot snapshot = cpuDistribution.snapshot();

    return new StageCpuDistribution(
        stageInfo.getStageId().getId(),
        stageInfo.getTasks().size(),
        snapshot.getP25(),
        snapshot.getP50(),
        snapshot.getP75(),
        snapshot.getP90(),
        snapshot.getP95(),
        snapshot.getP99(),
        snapshot.getMin(),
        snapshot.getMax(),
        (long) snapshot.getTotal(),
        snapshot.getTotal() / snapshot.getCount());
  }
}

相关文章