Package com.facebook.LinkBench.distributions

Examples of com.facebook.LinkBench.distributions.LogNormalDistribution


    debuglevel = ConfigUtil.getDebugLevel(props);

    double medianLinkDataSize = ConfigUtil.getDouble(props,
                                              Config.LINK_DATASIZE);
    linkDataSize = new LogNormalDistribution();
    linkDataSize.init(0, LinkStore.MAX_LINK_DATA, medianLinkDataSize,
                                         Config.LINK_DATASIZE_SIGMA);

    try {
      linkDataGen = ClassLoadUtil.newInstance(
View Full Code Here


  private void initLinkDataGeneration(Properties props) {
    try {
      double medLinkDataSize = ConfigUtil.getDouble(props,
                                            Config.LINK_DATASIZE);
      linkDataSize = new LogNormalDistribution();
      linkDataSize.init(0, LinkStore.MAX_LINK_DATA, medLinkDataSize,
                           Config.LINK_DATASIZE_SIGMA);
      linkAddDataGen = ClassLoadUtil.newInstance(
          ConfigUtil.getPropertyRequired(props, Config.LINK_ADD_DATAGEN),
          DataGenerator.class);
View Full Code Here

  private void initNodeDataGeneration(Properties props) {
    try {
      double medNodeDataSize = ConfigUtil.getDouble(props,
                                              Config.NODE_DATASIZE);
      nodeDataSize = new LogNormalDistribution();
      nodeDataSize.init(0, NodeStore.MAX_NODE_DATA, medNodeDataSize,
                        Config.NODE_DATASIZE_SIGMA);

      String dataGenClass = ConfigUtil.getPropertyRequired(props,
                                         Config.NODE_ADD_DATAGEN);
View Full Code Here

    this.rng = rng;
    this.latencyStats = latencyStats;
    this.loaderId = loaderId;

    double medianDataLength = ConfigUtil.getDouble(props, Config.NODE_DATASIZE);
    nodeDataLength = new LogNormalDistribution();
    nodeDataLength.init(0, NodeStore.MAX_NODE_DATA, medianDataLength,
                                          Config.NODE_DATASIZE_SIGMA);

    try {
      nodeDataGen = ClassLoadUtil.newInstance(
View Full Code Here

public class LogNormalTest extends DistributionTestBase {

  @Override
  protected ProbabilityDistribution getDist() {
    return new LogNormalDistribution();
  }
View Full Code Here

  /**
   * Sanity check values
   */
  public void testLogNormal() {
    LogNormalDistribution d = new LogNormalDistribution();
    int median = 10;
    d.init(0, 100, median, 1);
    // CDF of median should be 0.5 by def.
    assertEquals(0.5, d.cdf(median), 0.01);


    // Precomputed points
    d.init(0, 1000, 100, 1);
    assertEquals(0.033434, d.cdf(16), 0.0001);
    assertEquals(0.327695, d.cdf(64), 0.0001);
    assertEquals(0.597491, d.cdf(128), 0.0001);
    assertEquals(0.94878, d.cdf(512), 0.0001);
  }
View Full Code Here

TOP

Related Classes of com.facebook.LinkBench.distributions.LogNormalDistribution

Copyright © 2018 www.massapicom. 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.