Examples of calcTotalLinkCount()


Examples of com.facebook.LinkBench.distributions.ID2Chooser.calcTotalLinkCount()

    int minid = 500, maxid=1000000;
    ID2Chooser chooser = new ID2Chooser(props, minid, maxid, 1, 0);
    for (int id1 = minid; id1 < maxid; id1 += 3763) {
      HashSet<Long> existing = new HashSet<Long>();
      long nlinks = chooser.calcTotalLinkCount(id1);
      for (long i = 0; i < nlinks; i++) {
        long id2 = chooser.chooseForLoad(rng, id1,
                                LinkStore.DEFAULT_LINK_TYPE, i);
        existing.add(id2);
      }
View Full Code Here

Examples of com.facebook.LinkBench.distributions.ID2Chooser.calcTotalLinkCount()

    for (long id = startid; id < maxid; id += 7) {
      long totalCount = 0;
      for (long linkType: linkTypes) {
        totalCount += chooser.calcLinkCount(id, linkType);
      }
      assertEquals(chooser.calcTotalLinkCount(id), totalCount);
    }
  }
}
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.