Examples of ScrambledZipfianGenerator


Examples of com.googlecode.concurrentlinkedhashmap.generator.ScrambledZipfianGenerator

  @Test(groups = "efficiency")
  @Parameters({"capacity", "passes", "generatorMultipler", "workingSetMultiplier"})
  public void benchmark(int capacity, int passes, int generatorMultipler,
      int workingSetMultiplier) {
    Generator generator = new ScrambledZipfianGenerator(generatorMultipler * capacity);
    List<List<String>> workingSets = Lists.newArrayList();
    for (int i = 1; i <= passes; i++) {
      int size = i * workingSetMultiplier * capacity;
      workingSets.add(createWorkingSet(generator, size));
    }
View Full Code Here

Examples of com.googlecode.concurrentlinkedhashmap.generator.ScrambledZipfianGenerator

        .makeCache(Cache.LinkedHashMap_Lru_Sync);
    Map<String, String> actual = new Builder<String, String>()
        .maximumWeightedCapacity(capacity())
        .build();

    Generator generator = new ScrambledZipfianGenerator(10 * capacity());
    List<String> workingSet = createWorkingSet(generator, 10 * capacity());

    EfficiencyRun runExpected = determineEfficiency(expected, workingSet);
    EfficiencyRun runActual = determineEfficiency(actual, workingSet);

View Full Code Here

Examples of com.oltpbenchmark.distributions.ScrambledZipfianGenerator

        String sql = SQLUtil.getInsertSQL(catalog_tbl);
        PreparedStatement tweetInsert = this.conn.prepareStatement(sql);
       
        int total = 0;
        int batchSize = 0;
        ScrambledZipfianGenerator zy = new ScrambledZipfianGenerator(this.num_users);
       
        TweetHistogram tweet_h = new TweetHistogram();
        FlatHistogram<Integer> tweet_len_rng = new FlatHistogram<Integer>(this.rng(), tweet_h);
       
        for (long i = 0; i < this.num_tweets; i++) {
            int uid = zy.nextInt();
            tweetInsert.setLong(1, i);
            tweetInsert.setInt(2, uid);
            tweetInsert.setString(3, TextGenerator.randomStr(rng(), tweet_len_rng.nextValue()));
            tweetInsert.setNull(4, java.sql.Types.DATE);
            tweetInsert.addBatch();
View Full Code Here

Examples of com.oltpbenchmark.distributions.ScrambledZipfianGenerator

       
        //
        int total = 0;
        int batch = 0;
        ZipfianGenerator numTrust = new ZipfianGenerator(num_trust, 1.95);
        ScrambledZipfianGenerator reviewed = new ScrambledZipfianGenerator(num_users);
        Random isTrusted = new Random(System.currentTimeMillis());
        for (int i = 0; i < num_users; i++) {
            List<Integer> trusted = new ArrayList<Integer>();
            int trust_count = numTrust.nextInt();
            for (int tc = 0; tc < trust_count;) {
                int u_id = reviewed.nextInt();
                if (!trusted.contains(u_id)) {
                    tc++;
                    trustInsert.setInt(1, i);
                    trustInsert.setInt(2, u_id);
                    trustInsert.setInt(3, isTrusted.nextInt(2));
View Full Code Here

Examples of com.yahoo.ycsb.generator.ScrambledZipfianGenerator

      //just ignore it and pick another key. this way, the size of the keyspace doesn't change from the perspective of the scrambled zipfian generator
     
      int opcount=Integer.parseInt(p.getProperty(Client.OPERATION_COUNT_PROPERTY));
      int expectednewkeys=(int)(((double)opcount)*insertproportion*2.0); //2 is fudge factor
     
      keychooser=new ScrambledZipfianGenerator(recordcount+expectednewkeys);
    }
    else if (requestdistrib.compareTo("latest")==0)
    {
      keychooser=new SkewedLatestGenerator(transactioninsertkeysequence);
    }
View Full Code Here

Examples of com.yahoo.ycsb.generator.ScrambledZipfianGenerator

      int expectednewkeys = (int) (((double) opcount) * Config.getConfig().insert_proportion * 2.0); // 2
                                            // is
                                            // fudge
                                            // factor

      keychooser = new ScrambledZipfianGenerator(recordcount
          + expectednewkeys);
    } else if (Config.getConfig().request_distribution.compareTo("latest") == 0) {
      keychooser = new SkewedLatestGenerator(transactioninsertkeysequence);
    else if (Config.getConfig().request_distribution.compareTo("churn") == 0){
      keychooser = new ChurnGenerator(Config.getConfig().working_set, Config.getConfig().churn_delta, recordcount);
View Full Code Here

Examples of com.yahoo.ycsb.generator.ScrambledZipfianGenerator

      // keyspace doesn't change from the perspective of the scrambled
      // zipfian generator

      int opcount = Config.getConfig().operation_count;
      int expectednewkeys = (int) (((double) opcount) * Config.getConfig().memset_proportion * 2.0); // 2 is fudge factor
      keychooser = new ScrambledZipfianGenerator(recordcount + expectednewkeys);
    } else if (Config.getConfig().request_distribution.compareTo("latest") == 0) {
      keychooser = new SkewedLatestGenerator(transactioninsertkeysequence);
    } else if (Config.getConfig().request_distribution.compareTo("churn") == 0){
      keychooser = new ChurnGenerator(Config.getConfig().working_set, Config.getConfig().churn_delta, recordcount);
    } else {
View Full Code Here

Examples of voldemort.performance.benchmark.generator.ScrambledZipfianGenerator

            keyGenerator = new UniformIntegerGenerator(0, keySpace - 1);

        } else if(recordSelection.compareTo(Benchmark.ZIPFIAN_RECORD_SELECTION) == 0) {

            int expectedNewKeys = (int) (opCount * writeProportion * 2.0);
            keyGenerator = new ScrambledZipfianGenerator(recordCount + expectedNewKeys);

        } else if(recordSelection.compareTo(Benchmark.LATEST_RECORD_SELECTION) == 0) {

            keyGenerator = new SkewedLatestGenerator(insertKeySequence);

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.