Package org.voltdb.join

Examples of org.voltdb.join.BalancePartitionsStatistics$Constants


            m_latencyHistogramStats = new LatencyHistogramStats(m_myHostId);
            getStatsAgent().registerStatsSource(StatsSelector.LATENCY_HISTOGRAM,
                    0, m_latencyHistogramStats);


            BalancePartitionsStatistics rebalanceStats = new BalancePartitionsStatistics();
            getStatsAgent().registerStatsSource(StatsSelector.REBALANCE, 0, rebalanceStats);

            KSafetyStats kSafetyStats = new KSafetyStats();
            getStatsAgent().registerStatsSource(StatsSelector.KSAFETY, 0, kSafetyStats);
            m_cpuStats = new CpuStats();
View Full Code Here


        final int BYTES_TO_MOVE = 10000000;
        final int ROWS_TO_MOVE = 1000000;
        final double FUZZ_FACTOR = .1;

        RebalanceStatsChecker checker = new RebalanceStatsChecker(RANGES_TO_MOVE, FUZZ_FACTOR);
        BalancePartitionsStatistics bps = new BalancePartitionsStatistics(RANGES_TO_MOVE);
        Random r = new Random(2222);
        // Random numbers are between zero and the constant, so everything will average out
        // to half the time and quantities. Nothing will be exhausted by the test.
        final int loopCount = (DURATION_SECONDS * 1000) / (INVOCATION_SLEEP_MILLIS + IDLE_SLEEP_MILLIS);
        for (int i = 0; i < loopCount; i++) {
            bps.logBalanceStarts();
            int invocationTimeMS = r.nextInt(INVOCATION_SLEEP_MILLIS);
            Thread.sleep(invocationTimeMS);
            checker.totalInvTimeMS += invocationTimeMS;
            int ranges = r.nextInt(RANGES_TO_MOVE / loopCount);
            int bytes = r.nextInt(BYTES_TO_MOVE / loopCount);
            int rows = r.nextInt(ROWS_TO_MOVE / loopCount);
            bps.logBalanceEnds(ranges, bytes, TimeUnit.MILLISECONDS.toNanos(invocationTimeMS), TimeUnit.MILLISECONDS.toNanos(invocationTimeMS), rows);
            checker.update(ranges, bytes, rows);
            checker.check(bps.getLastStatsPoint());
            int idleTimeMS = r.nextInt(IDLE_SLEEP_MILLIS);
            Thread.sleep(idleTimeMS);
        }
        // Check the results with fuzzing to avoid rounding errors.
        checker.check(bps.getOverallStats());
    }
View Full Code Here

TOP

Related Classes of org.voltdb.join.BalancePartitionsStatistics$Constants

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.