Package edu.brown.profilers

Examples of edu.brown.profilers.SpecExecProfiler


        columns.add(new VoltTable.ColumnInfo("MATCHES_STDEV", VoltType.FLOAT));
        columns.add(new VoltTable.ColumnInfo("EXECUTED_PER_TXN_AVG", VoltType.BIGINT));
        columns.add(new VoltTable.ColumnInfo("EXECUTED_PER_TXN_STDEV", VoltType.FLOAT));
       
        // Make a dummy profiler just so that we can get the fields from it
        SpecExecProfiler profiler = new SpecExecProfiler();
        for (ProfileMeasurement pm : profiler.getProfileMeasurements()) {
            String name = pm.getName().toUpperCase();
            // We need two columns per ProfileMeasurement
            //  (1) The total think time in nanoseconds
            //  (2) The number of invocations
            columns.add(new VoltTable.ColumnInfo(name, VoltType.BIGINT));
View Full Code Here


        Pair<Integer, SpeculationType> rowKeyPair = (Pair<Integer, SpeculationType>) rowKey;
        Integer partition = rowKeyPair.getFirst();
        SpeculationType specType = rowKeyPair.getSecond();
        PartitionExecutor.Debug executorDebug = hstore_site.getPartitionExecutor(partition).getDebugContext();
        SpecExecScheduler.Debug specExecDebug = executorDebug.getSpecExecScheduler().getDebugContext();
        SpecExecProfiler profiler = specExecDebug.getProfiler(specType);
        assert(profiler != null);
       
        int offset = columnNameToIndex.get("PARTITION");
        double total = (double)profiler.total_time.getInvocations();
        rowValues[offset++] = partition;
        rowValues[offset++] = specType.toString();
        rowValues[offset++] = profiler.success;
        rowValues[offset++] = profiler.success / total;
        rowValues[offset++] = profiler.interrupts;
        rowValues[offset++] = profiler.interrupts / total;
        rowValues[offset++] = MathUtil.weightedMean(profiler.queue_size);
        rowValues[offset++] = HistogramUtil.stdev(profiler.queue_size);
        rowValues[offset++] = MathUtil.weightedMean(profiler.num_comparisons);
        rowValues[offset++] = HistogramUtil.stdev(profiler.num_comparisons);
        rowValues[offset++] = MathUtil.weightedMean(profiler.num_matches);
        rowValues[offset++] = HistogramUtil.stdev(profiler.num_matches);
        rowValues[offset++] = MathUtil.weightedMean(profiler.num_executed);
        rowValues[offset++] = HistogramUtil.stdev(profiler.num_executed);
       
        List<Long> history = new ArrayList<Long>();
        for (ProfileMeasurement pm : profiler.getProfileMeasurements()) {
            rowValues[offset++] = pm.getTotalThinkTime();
            rowValues[offset++] = pm.getInvocations();
            rowValues[offset++] = MathUtil.stdev(pm.getHistory(history));
            history.clear();
        } // FOR
View Full Code Here

        this.profiling_sample = HStoreConf.singleton().site.specexec_profiling_sample;
        this.profilerExecuteCounter.setKeepZeroEntries(true);
        this.profilerMap = new SpecExecProfiler[SpeculationType.values().length];
        if (this.profiling) {
            for (int i = 0; i < this.profilerMap.length; i++) {
                this.profilerMap[i] = new SpecExecProfiler();
            } // FOR
        }
       
        if (this.checker.isDisabled())
            this.setDisabled(true);
View Full Code Here

            if (trace.val)
                LOG.trace(String.format("%s - Last Invocation [lastDtxn=%s, lastSpecType=%s, lastIterator=%s]",
                          dtxn, this.lastDtxn, this.lastSpecType, this.lastIterator));
        }
       
        SpecExecProfiler profiler = null;
        if (this.profiling) {
            // This is the first time that we've seen this dtxn, so
            // we need to dump out its stats. This is not entirely accurate,
            // since we won't have the last txn's info, but it's good enough.
            if (this.profilerCurrentTxn != dtxn) {
View Full Code Here

    /**
     * testFirstMatchPolicy
     */
    public void testFirstMatchPolicy() throws Exception {
        // We should be able to get one match with only one evaluation
        SpecExecProfiler profiler = this.schedulerDebug.getProfiler(SpeculationType.SP2_REMOTE_BEFORE);
        assertNotNull(profiler);
        assertTrue(profiler.num_comparisons.isEmpty());
       
        this.populateQueue(this.addedTxns, 10);
        this.scheduler.setPolicyType(SpecExecSchedulerPolicyType.FIRST);
View Full Code Here

    /**
     * testLastMatchPolicy
     */
    public void testLastMatchPolicy() throws Exception {
        // We should be able to get one match with only one evaluation
        SpecExecProfiler profiler = this.schedulerDebug.getProfiler(SpeculationType.SP2_REMOTE_BEFORE);
        assertNotNull(profiler);
        assertTrue(profiler.num_comparisons.isEmpty());
        this.scheduler.setPolicyType(SpecExecSchedulerPolicyType.LAST);
        this.scheduler.setWindowSize(Integer.MAX_VALUE);
       
View Full Code Here

    /**
     * testShortestPolicy
     */
    public void testShortestPolicy() throws Exception {
        // We should only evaluate the same # of txns as the WINDOW_SIZE
        SpecExecProfiler profiler = this.schedulerDebug.getProfiler(SpeculationType.SP2_REMOTE_BEFORE);
        assertNotNull(profiler);
        assertTrue(profiler.num_comparisons.isEmpty());
       
        // Add a bunch and then set the last one to have the shortest time
        this.populateQueue(this.addedTxns, 20);
View Full Code Here

TOP

Related Classes of edu.brown.profilers.SpecExecProfiler

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.