Package com.oltpbenchmark.benchmarks.jpab.tests

Examples of com.oltpbenchmark.benchmarks.jpab.tests.Test


    @Override
    public void load() throws SQLException {
        int objectCount= (int)this.workConf.getScaleFactor();
        EntityManagerFactory emf = Persistence.createEntityManagerFactory(persistanceUnit);
        EntityManager em = emf.createEntityManager();
        Test test=new BasicTest();
        test.setBatchSize(10);
        test.setEntityCount(objectCount);
        test.buildInventory(objectCount);
        while (test.getActionCount() < objectCount) {
            System.out.println(test.getActionCount()+ " % "+objectCount);
            test.persist(em);
        }
        test.clearInventory();
    }
View Full Code Here


    @Override
    protected List<Worker> makeWorkersImpl(boolean verbose) throws IOException {
        ArrayList<Worker> workers = new ArrayList<Worker>();
        emf = Persistence.createEntityManagerFactory(jpabConf.getPersistanceUnit());
        Test test = null;
        try {
            test = (Test)Class.forName("com.oltpbenchmark.benchmarks.jpab.tests."+this.jpabConf.getTestName()).newInstance();
            int totalObjectCount= (int) this.workConf.getScaleFactor();
            test.setBatchSize(1);
            test.setEntityCount(totalObjectCount);
            test.setEntityCount(totalObjectCount);
            test.buildInventory(totalObjectCount * 13 / 10);
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        for (int i = 0; i < workConf.getTerminals(); ++i) {
View Full Code Here

TOP

Related Classes of com.oltpbenchmark.benchmarks.jpab.tests.Test

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.