Package edu.brown.workload.filters

Examples of edu.brown.workload.filters.ProcedureLimitFilter


           
            // LOAD SAMPLE WORKLOAD
            Filter filter =  new ProcedureNameFilter(false)
                    .include(this.origProc.getName())
                    .attach(new NoAbortFilter())
                    .attach(new ProcedureLimitFilter(WORKLOAD_XACT_LIMIT));
            File workloadFile = this.getWorkloadFile(ProjectType.SMALLBANK);
            workloads[0] = new Workload(catalogContext.catalog).load(workloadFile, catalogContext.database, filter);
            File tempFile = FileUtil.getTempFile("workload", true);
            workloads[0].save(tempFile, catalogContext.database);
            assertTrue(tempFile.exists());
View Full Code Here


                    .include(TARGET_PROCEDURE.getSimpleName())
                    .attach(new ProcParameterValueFilter().include(1, new Integer(5))) // D_ID
                    // .attach(new ProcParameterArraySizeFilter(CatalogUtil.getArrayProcParameters(catalog_proc).get(0), 10, ExpressionType.COMPARE_EQUAL))
                    .attach(new BasePartitionTxnFilter(p_estimator, BASE_PARTITION))
                    .attach(new MultiPartitionTxnFilter(p_estimator, false))
                    .attach(new ProcedureLimitFilter(WORKLOAD_XACT_LIMIT));
            workload.load(file, catalogContext.database, filter);
           
            // Make a copy that doesn't have the first TransactionTrace
            Workload clone = new Workload(catalogContext.catalog, new Filter() {
                private boolean first = true;
View Full Code Here

       
        if (workload == null) {
            workload_file = this.getWorkloadFile(ProjectType.TPCC);
            workload = new Workload(catalog);
           
            ((Workload)workload).load(workload_file, catalog_db, new ProcedureLimitFilter(WORKLOAD_XACT_LIMIT));
            assert(workload.getTransactionCount() > 0) : "No transaction loaded from workload";
            assertEquals(WORKLOAD_XACT_LIMIT, workload.getTransactionCount());
        }
        assertNotNull(workload_file);
    }
View Full Code Here

       
        if (workload == null) {
            File file = this.getWorkloadFile(ProjectType.TPCC);
            workload = new Workload(catalog);
            Filter filter = new ProcedureNameFilter(false).include(TARGET_PROCEDURE.getSimpleName())
                                         .attach(new ProcedureLimitFilter(WORKLOAD_XACT_LIMIT));
            workload.load(file, catalog_db, filter);
        }
       
        this.catalog_proc = this.getProcedure(TARGET_PROCEDURE);
        this.fset = new FeatureSet();
View Full Code Here

                    .include(TARGET_PROCEDURE.getSimpleName())
//                    .attach(new ProcParameterValueFilter().include(1, new Long(5))) // D_ID
//                    .attach(new ProcParameterArraySizeFilter(CatalogUtil.getArrayProcParameters(catalog_proc).get(0), 10, ExpressionType.COMPARE_EQUAL))
//                    .attach(new BasePartitionTxnFilter(p_estimator, BASE_PARTITION))
//                    .attach(new MultiPartitionTxnFilter(p_estimator))
                    .attach(new ProcedureLimitFilter(WORKLOAD_XACT_LIMIT));
            workload.load(file, catalog_db, filter);
            assert(workload.getTransactionCount() > 0);
           
            // Now extract the FeatureSet that we will use in our tests
            Map<Procedure, FeatureSet> fsets = new FeatureExtractor(catalogContext, p_estimator).calculate(workload);
View Full Code Here

            File f = this.getWorkloadFile(ProjectType.TM1);
           
            // All Multi-Partition Txn Workload
            ProcedureNameFilter multi_filter = new ProcedureNameFilter(false);
            multi_filter.include(MULTIPARTITION_PROCEDURES);
            multi_filter.attach(new ProcedureLimitFilter(WORKLOAD_XACT_LIMIT));
            multip_workload = new Workload(catalog);
            ((Workload)multip_workload).load(f, catalog_db, multi_filter);
            assert(multip_workload.getTransactionCount() > 0);

            // All Single-Partition Txn Workload
            ProcedureNameFilter single_filter = new ProcedureNameFilter(false);
            single_filter.include(SINGLEPARTITION_PROCEDURES);
            single_filter.attach(new ProcedureLimitFilter(WORKLOAD_XACT_LIMIT));
            singlep_workload = new Workload(catalog);
            ((Workload)singlep_workload).load(f, catalog_db, single_filter);
            assert(singlep_workload.getTransactionCount() > 0);
           
            // Workload Statistics
View Full Code Here

            // (4) Another limit to stop after allowing ### txns
            // Where is your god now???
            Filter filter = new ProcedureNameFilter(false)
                    .include(TARGET_PROCEDURE.getSimpleName())
                    .attach(new BasePartitionTxnFilter(p_estimator, BASE_PARTITION))
                    .attach(new ProcedureLimitFilter(WORKLOAD_XACT_LIMIT));
            workload.load(file, catalogContext.database, filter);
            assert(workload.getTransactionCount() > 0);
           
            markov = new MarkovGraph(catalog_proc).initialize();
            for (TransactionTrace txn_trace : workload.getTransactions()) {
View Full Code Here

            // (4) Another limit to stop after allowing ### txns
            // Where is your god now???
            Filter filter = new ProcedureNameFilter(false).include(TARGET_PROCEDURE.getSimpleName());
            filter.attach(new BasePartitionTxnFilter(p_estimator, BASE_PARTITION))
            // .attach(new MultiPartitionTxnFilter(p_estimator))
                    .attach(new ProcedureLimitFilter(WORKLOAD_XACT_LIMIT));
            workload.load(file, catalogContext.database, filter);
            // assertEquals(WORKLOAD_XACT_LIMIT, workload.getTransactionCount());

            // for (TransactionTrace xact : workload.getTransactions()) {
            // System.err.println(xact + ": " + p_estimator.getAllPartitions(xact));
View Full Code Here

           
            File file = this.getWorkloadFile(ProjectType.TPCC);
            workload = new Workload(catalog);
            Filter filter = new ProcedureNameFilter(false)
                    .include(TARGET_PROCEDURE.getSimpleName())
                    .attach(new ProcedureLimitFilter(WORKLOAD_XACT_LIMIT));
            workload.load(file, catalog_db, filter);
            assert(workload.getTransactionCount() > 0);
           
            // Now extract the FeatureSet that we will use in our tests
            Map<Procedure, FeatureSet> fsets = new FeatureExtractor(catalogContext, p_estimator).calculate(workload);
View Full Code Here

TOP

Related Classes of edu.brown.workload.filters.ProcedureLimitFilter

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.