Examples of ZipfianGenerator


Examples of edu.brown.benchmark.ycsb.distributions.ZipfianGenerator

        }
        else {
            this.init_record_count = (long)Math.round(YCSBConstants.NUM_RECORDS * this.getScaleFactor());
        }
        this.rand_gen = new Random();
        this.randScan = new ZipfianGenerator(YCSBConstants.MAX_SCAN);
               
//        // initialize distribution generators
//        // We must know where to start inserting
//        this.insertRecord = new CustomSkewGenerator(this.rand_gen, this.init_record_count,
//                                            YCSBConstants.HOT_DATA_WORKLOAD_SKEW, YCSBConstants.HOT_DATA_SIZE,
//                                            YCSBConstants.WARM_DATA_WORKLOAD_SKEW, YCSBConstants.WARM_DATA_SIZE);
//
//        this.readRecord = new CustomSkewGenerator(this.rand_gen, this.init_record_count,
//                                            YCSBConstants.HOT_DATA_WORKLOAD_SKEW, YCSBConstants.HOT_DATA_SIZE,
//                                            YCSBConstants.WARM_DATA_WORKLOAD_SKEW, YCSBConstants.WARM_DATA_SIZE);
       
        this.insertRecord = new ZipfianGenerator(this.init_record_count, this.skewFactor);
        this.readRecord = new ZipfianGenerator(this.init_record_count, this.skewFactor);
       
        // Initialize the sampling table
        Histogram<Transaction> txns = new ObjectHistogram<Transaction>();
        for (Transaction t : Transaction.values()) {
            Integer weight = this.getTransactionWeight(t.callName);
View Full Code Here

Examples of edu.brown.benchmark.ycsb.distributions.ZipfianGenerator

        double sigma = 0.51d;
       
        int round = num_rounds;
        while (round-- > 0) {
//            RandomDistribution.Zipf zipf = new RandomDistribution.Zipf(this.rand, min, max, sigma);
            ZipfianGenerator zipf = new ZipfianGenerator(20, sigma);
            Histogram<Integer> hist = new ObjectHistogram<Integer>();
            System.out.println("Round #" + round + " [sigma=" + sigma + "]");
            for (int i = 0; i < num_records; i++) {
                int value = zipf.nextInt();
                hist.put(value);
            } // FOR
            Long last = null;
            for (Integer value : hist.values()) {
                long current = hist.get(value);
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.