Source Code Cross Referenced for TestCreDel.java in  » Database-ORM » Speedo_1.4.5 » org » objectweb » speedo » stress » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database ORM » Speedo_1.4.5 » org.objectweb.speedo.stress 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


0001:        /**
0002:         * Copyright (C) 2001-2004 France Telecom R&D
0003:         *
0004:         * This library is free software; you can redistribute it and/or
0005:         * modify it under the terms of the GNU Lesser General Public
0006:         * License as published by the Free Software Foundation; either
0007:         * version 2 of the License, or (at your option) any later version.
0008:         *
0009:         * This library is distributed in the hope that it will be useful,
0010:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
0011:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0012:         * Lesser General Public License for more details.
0013:         *
0014:         * You should have received a copy of the GNU Lesser General Public
0015:         * License along with this library; if not, write to the Free Software
0016:         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
0017:         */package org.objectweb.speedo.stress;
0018:
0019:        import org.objectweb.speedo.api.ExceptionHelper;
0020:        import org.objectweb.speedo.pobjects.userid.IntUserId;
0021:        import org.objectweb.util.monolog.api.BasicLevel;
0022:
0023:        import javax.jdo.PersistenceManager;
0024:        import javax.jdo.JDOException;
0025:        import javax.jdo.JDOFatalException;
0026:
0027:        import junit.framework.TestSuite;
0028:        import junit.textui.TestRunner;
0029:
0030:        /**
0031:         * Stresses the creation function of Speedo.
0032:         * @author P. Dechamboux
0033:         */
0034:        public class TestCreDel extends StressHelper {
0035:
0036:            protected String CREATION = getLoggerName() + ".creation";
0037:            protected String THRESHOLD = getLoggerName() + ".threshold";
0038:
0039:            public TestCreDel(String s) {
0040:                super (s);
0041:            }
0042:
0043:            protected String getLoggerName() {
0044:                return STRESS_LOG_NAME + ".stress.TestCreDel";
0045:            }
0046:
0047:            protected String[] getClassNamesToInit() {
0048:                return new String[] { IntUserId.class.getName() };
0049:            }
0050:
0051:            public static void main(String[] args) {
0052:                TestRunner.run(new TestSuite(TestCreDel.class));
0053:            }
0054:
0055:            class CreDelContext {
0056:                public int nbCreDel;
0057:                public int startId;
0058:                public int threshold;
0059:
0060:                public CreDelContext(int nbCreDel, int startId, int threshold) {
0061:                    this .nbCreDel = nbCreDel;
0062:                    this .startId = startId;
0063:                    this .threshold = threshold;
0064:                }
0065:
0066:                public String toString() {
0067:                    return "nbCreDel = " + nbCreDel + " / startid = " + startId
0068:                            + " / threshold = " + threshold;
0069:                }
0070:            }
0071:
0072:            class CreDelThreadManager extends TaskManager {
0073:                public boolean[] txCreateStarted;
0074:                public Threshold threshold;
0075:
0076:                public CreDelThreadManager(int[] nbThread, int[] nbTx,
0077:                        int timeout, Object ctx) {
0078:                    super (nbThread, nbTx, timeout, ctx);
0079:                    threshold = new Threshold(((CreDelContext) ctx).threshold);
0080:                    txCreateStarted = new boolean[nbTx[0]];
0081:                }
0082:
0083:                public Task newTask(int taskId, int nbTx, int nbThread,
0084:                        TaskManager taskManager, Object ctx) {
0085:                    return new CreDelTask(taskId, nbTx, nbThread, taskManager);
0086:                }
0087:            }
0088:
0089:            class CreDelTask extends Task {
0090:                public CreDelTask(int taskId, int nbTx, int nbThread,
0091:                        TaskManager taskManager) {
0092:                    super (taskId, nbTx, nbThread, taskManager);
0093:                }
0094:
0095:                public int getTxId(int threadId) {
0096:                    if (taskId == 0) {
0097:                        return getCreateTxId(threadId);
0098:                    } else if (taskId == 1) {
0099:                        return getDeleteTxId(threadId);
0100:                    } else {
0101:                        return -1;
0102:                    }
0103:                }
0104:
0105:                public int getCreateTxId(int threadId) {
0106:                    synchronized (txToExecute) {
0107:                        boolean[] txCreateStarted = ((CreDelThreadManager) taskManager).txCreateStarted;
0108:                        for (int txId = 0; txId < txToExecute.length; txId++) {
0109:                            if (txToExecute[txId]) {
0110:                                if (txCreateStarted[txId]) {
0111:                                    continue;
0112:                                }
0113:                                txCreateStarted[txId] = true;
0114:                                return txId;
0115:                            }
0116:                        }
0117:                    }
0118:                    return -1;
0119:                }
0120:
0121:                public int getDeleteTxId(int threadId) {
0122:                    boolean[] txCreateToExecute = ((CreDelThreadManager) taskManager).tasks[0].txToExecute;
0123:                    synchronized (txCreateToExecute) {
0124:                        int txId;
0125:                        int nbDel = 0;
0126:                        for (txId = 0; txId < txToExecute.length; txId++) {
0127:                            if (!txToExecute[txId]) {
0128:                                nbDel++;
0129:                                continue;
0130:                            }
0131:                            if (!txCreateToExecute[txId]) {
0132:                                break;
0133:                            }
0134:                        }
0135:                        if (txId == txToExecute.length) {
0136:                            if (nbDel == txToExecute.length) {
0137:                                return -1;
0138:                            }
0139:                            try {
0140:                                logger.log(BasicLevel.DEBUG, "Deletion thread "
0141:                                        + threadId + " go to sleep");
0142:                                txCreateToExecute.wait();
0143:                                logger.log(BasicLevel.DEBUG, "Deletion thread "
0144:                                        + threadId + " wakes up!!!");
0145:                            } catch (InterruptedException e) {
0146:                            }
0147:                            return -2;
0148:                        } else {
0149:                            if (!((CreDelThreadManager) taskManager).threshold
0150:                                    .canDelete()) {
0151:                                try {
0152:                                    logger
0153:                                            .log(
0154:                                                    BasicLevel.DEBUG,
0155:                                                    "Deletion thread "
0156:                                                            + threadId
0157:                                                            + " go to sleep (threshold/level="
0158:                                                            + ((CreDelThreadManager) taskManager).threshold
0159:                                                                    .getLevel()
0160:                                                            + ")...");
0161:                                    txCreateToExecute.wait();
0162:                                    logger
0163:                                            .log(
0164:                                                    BasicLevel.DEBUG,
0165:                                                    "Deletion thread "
0166:                                                            + threadId
0167:                                                            + " wakes up (threshold)!!!");
0168:                                } catch (InterruptedException e) {
0169:                                }
0170:                                return -2;
0171:                            }
0172:                        }
0173:                        txToExecute[txId] = false;
0174:                        ((CreDelThreadManager) taskManager).threshold
0175:                                .deleteDone();
0176:                        return txId;
0177:                    }
0178:                }
0179:            }
0180:
0181:            protected void perform(Task task, int threadId, int txId,
0182:                    Object ctx, PerformResult res) {
0183:                if (task.taskId == 0) {
0184:                    performCreate(task, threadId, txId, ctx, res);
0185:                } else if (task.taskId == 1) {
0186:                    performRemove(task, threadId, txId, ctx, res);
0187:                } else {
0188:                    throw new RuntimeException("Task Id not managed: "
0189:                            + task.taskId);
0190:                }
0191:            }
0192:
0193:            protected void performCreate(Task task, int threadId, int txId,
0194:                    Object _ctx, PerformResult res) {
0195:                CreDelContext ctx = (CreDelContext) _ctx;
0196:                PersistenceManager pm = getPM(task, threadId, txId);
0197:                try {
0198:                    res.beginTest();
0199:                    beginTx(pm, task, threadId, txId);
0200:                    for (int no = 0; no < ctx.nbCreDel; no++) {
0201:                        int oid = (txId * ctx.nbCreDel) + no + ctx.startId;
0202:                        if (debug) {
0203:                            logger.log(BasicLevel.DEBUG, "Creating object "
0204:                                    + oid);
0205:                        }
0206:                        IntUserId iui = new IntUserId(oid, "Obj No " + oid);
0207:                        pm.makePersistent(iui);
0208:                    }
0209:                    commitTx(pm, task, threadId, txId);
0210:                    res.endTest();
0211:                } catch (JDOFatalException e) {
0212:                    rollbackExceptions.add(e);
0213:                    res.ok = false;
0214:                    logger.log(BasicLevel.INFO, "Creation thread " + threadId
0215:                            + " has been rolledback: try again !", e);
0216:                    if (pm.currentTransaction().isActive()) {
0217:                        pm.currentTransaction().rollback();
0218:                        errors.add(e);
0219:                    }
0220:                } catch (Exception e) {
0221:                    Exception ie = ExceptionHelper.getNested(e);
0222:                    errors.add(ie);
0223:                    res.ok = false;
0224:                    logger.log(BasicLevel.ERROR, "Creation thread " + threadId
0225:                            + " has a problem", ie);
0226:                    pm.currentTransaction().rollback();
0227:                } catch (Throwable e) {
0228:                    logger.log(BasicLevel.ERROR, "Creation thread " + threadId
0229:                            + " has a problem", e);
0230:                    res.ok = false;
0231:                    pm.currentTransaction().rollback();
0232:                } finally {
0233:                    try {
0234:                        task.txToExecute[txId] = false;
0235:                        pm.close();
0236:                    } catch (JDOException e) {
0237:                        logger.log(BasicLevel.ERROR, "Creation thread "
0238:                                + threadId + " has been "
0239:                                + (res.ok ? "committed" : "rolledback")
0240:                                + " and the close occurs an error", e);
0241:                        throw e;
0242:                    }
0243:                }
0244:
0245:                synchronized (task.txToExecute) {
0246:                    task.txToExecute[txId] = false;
0247:                    Threshold threshold = ((CreDelThreadManager) task.taskManager).threshold;
0248:                    threshold.createDone();
0249:                    if (txId == (task.txToExecute.length - 1)) {
0250:                        for (int i = 0; i < threshold.getThreshold(); i++) {
0251:                            threshold.createDone();
0252:                        }
0253:                    }
0254:                    task.txToExecute.notifyAll();
0255:                }
0256:            }
0257:
0258:            protected void performRemove(Task task, int threadId, int txId,
0259:                    Object _ctx, PerformResult res) {
0260:                CreDelContext ctx = (CreDelContext) _ctx;
0261:                PersistenceManager pm = getPM(task, threadId, txId);
0262:                try {
0263:                    res.beginTest();
0264:                    beginTx(pm, task, threadId, txId);
0265:                    for (int no = 0; no < ctx.nbCreDel; no++) {
0266:                        int id = (txId * ctx.nbCreDel) + no + ctx.startId;
0267:                        Object oid = pm.newObjectIdInstance(IntUserId.class,
0268:                                String.valueOf(id));
0269:                        pm.deletePersistent(pm.getObjectById(oid, false));
0270:                    }
0271:                    pm.currentTransaction().commit();
0272:                    res.endTest();
0273:                    logger.log(BasicLevel.DEBUG, "Deletion Tx " + txId
0274:                            + " finished");
0275:                } catch (JDOFatalException e) {
0276:                    rollbackOnException(pm, e, res, task, threadId, txId);
0277:                } catch (Throwable e) {
0278:                    stopOnError(pm, e, res, task, threadId, txId);
0279:                } finally {
0280:                    closePM(pm, threadId, txId, task, res);
0281:                }
0282:            }
0283:
0284:            private void perform(int nbth, int nbtx, int nbc, int to,
0285:                    int startid) {
0286:                perform(nbth, nbtx, to, new CreDelContext(nbc, startid, 0));
0287:            }
0288:
0289:            /**
0290:             * Tests the creation of a lot of persistent objects, with interactive
0291:             * setting of test parameteres (see file userconf/project.properties).
0292:             */
0293:            public void testInteractive() {
0294:                if (interactive) {
0295:                    perform(
0296:                            Integer.getInteger(THREAD, 10).intValue(),
0297:                            Integer.getInteger(TX, 100).intValue(),
0298:                            Integer.getInteger(TIMEOUT, 1000000).intValue(),
0299:                            new CreDelContext(Integer
0300:                                    .getInteger(CREATION, 1000).intValue(), 0,
0301:                                    Integer.getInteger(THRESHOLD, 0).intValue()));
0302:                }
0303:            }
0304:
0305:            /**
0306:             * Tests 10 transactions where each of them creates 1 object using 1 thread.
0307:             */
0308:            public void testCreDelTh1Tx10Cr1() {
0309:                if (!interactive) {
0310:                    perform(1, 10, 1, 1000000, getStartId(ID_Th1Tx10Cr1));
0311:                }
0312:            }
0313:
0314:            /**
0315:             * Tests 100 transactions where each of them creates 1 object using 1 thread.
0316:             */
0317:            public void testCreDelTh1Tx100Cr1() {
0318:                if (!interactive) {
0319:                    perform(1, 100, 1, 1000000, getStartId(ID_Th1Tx100Cr1));
0320:                }
0321:            }
0322:
0323:            /**
0324:             * Tests 1.000 transactions where each of them creates 1 object using 1 thread.
0325:             */
0326:            public void testCreDelTh1Tx1000Cr1() {
0327:                if (!interactive) {
0328:                    perform(1, 1000, 1, 1000000, getStartId(ID_Th1Tx1000Cr1));
0329:                }
0330:            }
0331:
0332:            /**
0333:             * Tests 10.000 transactions where each of them creates 1 object using 1 thread.
0334:             */
0335:            public void testCreDelTh1Tx10000Cr1() {
0336:                if (!interactive) {
0337:                    perform(1, 10000, 1, 1000000, getStartId(ID_Th1Tx10000Cr1));
0338:                }
0339:            }
0340:
0341:            /**
0342:             * Tests 100.000 transactions where each of them creates 1 object using 1 thread.
0343:             */
0344:            public void testCreDelTh1Tx100000Cr1() {
0345:                if (!interactive) {
0346:                    perform(1, 100000, 1, 10000000,
0347:                            getStartId(ID_Th1Tx100000Cr1));
0348:                }
0349:            }
0350:
0351:            /**
0352:             * Tests 10 transactions where each of them creates 10 objects using 1 thread.
0353:             */
0354:            public void testCreDelTh1Tx10Cr10() {
0355:                if (!interactive) {
0356:                    perform(1, 10, 10, 1000000, getStartId(ID_Th1Tx10Cr10));
0357:                }
0358:            }
0359:
0360:            /**
0361:             * Tests 100 transactions where each of them creates 10 objects using 1 thread.
0362:             */
0363:            public void testCreDelTh1Tx100Cr10() {
0364:                if (!interactive) {
0365:                    perform(1, 100, 10, 1000000, getStartId(ID_Th1Tx100Cr10));
0366:                }
0367:            }
0368:
0369:            /**
0370:             * Tests 1.000 transactions where each of them creates 10 objects using 1 thread.
0371:             */
0372:            public void testCreDelTh1Tx1000Cr10() {
0373:                if (!interactive) {
0374:                    perform(1, 1000, 10, 1000000, getStartId(ID_Th1Tx1000Cr10));
0375:                }
0376:            }
0377:
0378:            /**
0379:             * Tests 10.000 transactions where each of them creates 10 objects using 1 thread.
0380:             */
0381:            public void testCreDelTh1Tx10000Cr10() {
0382:                if (!interactive) {
0383:                    perform(1, 10000, 10, 10000000,
0384:                            getStartId(ID_Th1Tx10000Cr10));
0385:                }
0386:            }
0387:
0388:            /**
0389:             * Tests 100.000 transactions where each of them creates 10 objects using 1 thread.
0390:             */
0391:            public void testCreDelTh1Tx100000Cr10() {
0392:                if (!interactive) {
0393:                    perform(1, 100000, 10, 100000000,
0394:                            getStartId(ID_Th1Tx100000Cr10));
0395:                }
0396:            }
0397:
0398:            /**
0399:             * Tests 10 transactions where each of them creates 100 objects using 1 thread.
0400:             */
0401:            public void testCreDelTh1Tx10Cr100() {
0402:                if (!interactive) {
0403:                    perform(1, 10, 100, 1000000, getStartId(ID_Th1Tx10Cr100));
0404:                }
0405:            }
0406:
0407:            /**
0408:             * Tests 100 transactions where each of them creates 100 objects using 1 thread.
0409:             */
0410:            public void testCreDelTh1Tx100Cr100() {
0411:                if (!interactive) {
0412:                    perform(1, 100, 100, 1000000, getStartId(ID_Th1Tx100Cr100));
0413:                }
0414:            }
0415:
0416:            /**
0417:             * Tests 1.000 transactions where each of them creates 100 objects using 1 thread.
0418:             */
0419:            public void testCreDelTh1Tx1000Cr100() {
0420:                if (!interactive) {
0421:                    perform(1, 1000, 100, 10000000,
0422:                            getStartId(ID_Th1Tx1000Cr100));
0423:                }
0424:            }
0425:
0426:            /**
0427:             * Tests 10.000 transactions where each of them creates 100 objects using 1 thread.
0428:             */
0429:            public void testCreDelTh1Tx10000Cr100() {
0430:                if (!interactive) {
0431:                    perform(1, 10000, 100, 100000000,
0432:                            getStartId(ID_Th1Tx10000Cr100));
0433:                }
0434:            }
0435:
0436:            /**
0437:             * Tests 10 transactions where each of them creates 500 objects using 1 thread.
0438:             */
0439:            public void testCreDelTh1Tx10Cr500() {
0440:                if (!interactive) {
0441:                    perform(1, 10, 500, 1000000, getStartId(ID_Th1Tx10Cr500));
0442:                }
0443:            }
0444:
0445:            /**
0446:             * Tests 100 transactions where each of them creates 500 objects using 1 thread.
0447:             */
0448:            public void testCreDelTh1Tx100Cr500() {
0449:                if (!interactive) {
0450:                    perform(1, 100, 500, 10000000, getStartId(ID_Th1Tx100Cr500));
0451:                }
0452:            }
0453:
0454:            /**
0455:             * Tests 1.000 transactions where each of them creates 500 objects using 1 thread.
0456:             */
0457:            public void testCreDelTh1Tx1000Cr500() {
0458:                if (!interactive) {
0459:                    perform(1, 1000, 500, 100000000,
0460:                            getStartId(ID_Th1Tx1000Cr500));
0461:                }
0462:            }
0463:
0464:            /**
0465:             * Tests 10 transactions where each of them creates 1.000 objects using 1 thread.
0466:             */
0467:            public void testCreDelTh1Tx10Cr1000() {
0468:                if (!interactive) {
0469:                    perform(1, 10, 1000, 1000000, getStartId(ID_Th1Tx10Cr1000));
0470:                }
0471:            }
0472:
0473:            /**
0474:             * Tests 100 transactions where each of them creates 1.000 objects using 1 thread.
0475:             */
0476:            public void testCreDelTh1Tx100Cr1000() {
0477:                if (!interactive) {
0478:                    perform(1, 100, 1000, 10000000,
0479:                            getStartId(ID_Th1Tx100Cr1000));
0480:                }
0481:            }
0482:
0483:            /**
0484:             * Tests 1.000 transactions where each of them creates 1.000 objects using 1 thread.
0485:             */
0486:            public void testCreDelTh1Tx1000Cr1000() {
0487:                if (!interactive) {
0488:                    perform(1, 1000, 1000, 100000000,
0489:                            getStartId(ID_Th1Tx1000Cr1000));
0490:                }
0491:            }
0492:
0493:            /**
0494:             * Tests 10 transactions where each of them creates 2.000 objects using 1 thread.
0495:             */
0496:            public void testCreDelTh1Tx10Cr2000() {
0497:                if (!interactive) {
0498:                    perform(1, 10, 2000, 10000000, getStartId(ID_Th1Tx10Cr2000));
0499:                }
0500:            }
0501:
0502:            /**
0503:             * Tests 100 transactions where each of them creates 2.000 objects using 1 thread.
0504:             */
0505:            public void testCreDelTh1Tx100Cr2000() {
0506:                if (!interactive) {
0507:                    perform(1, 100, 2000, 100000000,
0508:                            getStartId(ID_Th1Tx100Cr2000));
0509:                }
0510:            }
0511:
0512:            /**
0513:             * Tests 1.000 transactions where each of them creates 2.000 objects using 1 thread.
0514:             */
0515:            public void testCreDelTh1Tx1000Cr2000() {
0516:                if (!interactive) {
0517:                    perform(1, 1000, 2000, 1000000000,
0518:                            getStartId(ID_Th1Tx1000Cr2000));
0519:                }
0520:            }
0521:
0522:            /**
0523:             * Tests 10 transactions where each of them creates 10.000 objects using 1 thread.
0524:             */
0525:            public void testCreDelTh1Tx10Cr10000() {
0526:                if (!interactive) {
0527:                    perform(1, 10, 10000, 100000000,
0528:                            getStartId(ID_Th1Tx10Cr10000));
0529:                }
0530:            }
0531:
0532:            /**
0533:             * Tests 100 transactions where each of them creates 10.000 objects using 1 thread.
0534:             */
0535:            public void testCreDelTh1Tx100Cr10000() {
0536:                if (!interactive) {
0537:                    perform(1, 100, 10000, 1000000000,
0538:                            getStartId(ID_Th1Tx100Cr10000));
0539:                }
0540:            }
0541:
0542:            /**
0543:             * Tests 10 transactions where each of them creates 1 object using 2 threads.
0544:             */
0545:            public void testCreDelTh2Tx10Cr1() {
0546:                if (!interactive) {
0547:                    perform(2, 10, 1, 1000000, getStartId(ID_Th2Tx10Cr1));
0548:                }
0549:            }
0550:
0551:            /**
0552:             * Tests 100 transactions where each of them creates 1 object using 2 threads.
0553:             */
0554:            public void testCreDelTh2Tx100Cr1() {
0555:
0556:                if (!interactive) {
0557:                    perform(2, 100, 1, 1000000, getStartId(ID_Th2Tx100Cr1));
0558:                }
0559:            }
0560:
0561:            /**
0562:             * Tests 1.000 transactions where each of them creates 1 object using 2 threads.
0563:             */
0564:            public void testCreDelTh2Tx1000Cr1() {
0565:
0566:                if (!interactive) {
0567:                    perform(2, 1000, 1, 1000000, getStartId(ID_Th2Tx1000Cr1));
0568:                }
0569:            }
0570:
0571:            /**
0572:             * Tests 10.000 transactions where each of them creates 1 object using 2 threads.
0573:             */
0574:            public void testCreDelTh2Tx10000Cr1() {
0575:
0576:                if (!interactive) {
0577:                    perform(2, 10000, 1, 1000000, getStartId(ID_Th2Tx10000Cr1));
0578:                }
0579:            }
0580:
0581:            /**
0582:             * Tests 100.000 transactions where each of them creates 1 object using 2 threads.
0583:             */
0584:            public void testCreDelTh2Tx100000Cr1() {
0585:
0586:                if (!interactive) {
0587:                    perform(2, 100000, 1, 1000000,
0588:                            getStartId(ID_Th2Tx100000Cr1));
0589:                }
0590:            }
0591:
0592:            /**
0593:             * Tests 10 transactions where each of them creates 10 objects using 2 threads.
0594:             */
0595:            public void testCreDelTh2Tx10Cr10() {
0596:
0597:                if (!interactive) {
0598:                    perform(2, 10, 10, 1000000, getStartId(ID_Th2Tx10Cr10));
0599:                }
0600:            }
0601:
0602:            /**
0603:             * Tests 100 transactions where each of them creates 10 objects using 2 threads.
0604:             */
0605:            public void testCreDelTh2Tx100Cr10() {
0606:
0607:                if (!interactive) {
0608:                    perform(2, 100, 10, 1000000, getStartId(ID_Th2Tx100Cr10));
0609:                }
0610:            }
0611:
0612:            /**
0613:             * Tests 1.000 transactions where each of them creates 10 objects using 2 threads.
0614:             */
0615:            public void testCreDelTh2Tx1000Cr10() {
0616:
0617:                if (!interactive) {
0618:                    perform(2, 1000, 10, 1000000, getStartId(ID_Th2Tx1000Cr10));
0619:                }
0620:            }
0621:
0622:            /**
0623:             * Tests 10.000 transactions where each of them creates 10 objects using 2 threads.
0624:             */
0625:            public void testCreDelTh2Tx10000Cr10() {
0626:
0627:                if (!interactive) {
0628:                    perform(2, 10000, 10, 1000000,
0629:                            getStartId(ID_Th2Tx10000Cr10));
0630:                }
0631:            }
0632:
0633:            /**
0634:             * Tests 100.000 transactions where each of them creates 10 objects using 2 threads.
0635:             */
0636:            public void testCreDelTh2Tx100000Cr10() {
0637:
0638:                if (!interactive) {
0639:                    perform(2, 100000, 10, 1000000,
0640:                            getStartId(ID_Th2Tx100000Cr10));
0641:                }
0642:            }
0643:
0644:            /**
0645:             * Tests 10 transactions where each of them creates 100 objects using 2 threads.
0646:             */
0647:            public void testCreDelTh2Tx10Cr100() {
0648:
0649:                if (!interactive) {
0650:                    perform(2, 10, 100, 1000000, getStartId(ID_Th2Tx10Cr100));
0651:                }
0652:            }
0653:
0654:            /**
0655:             * Tests 100 transactions where each of them creates 100 objects using 2 threads.
0656:             */
0657:            public void testCreDelTh2Tx100Cr100() {
0658:
0659:                if (!interactive) {
0660:                    perform(2, 100, 100, 1000000, getStartId(ID_Th2Tx100Cr100));
0661:                }
0662:            }
0663:
0664:            /**
0665:             * Tests 1.000 transactions where each of them creates 100 objects using 2 threads.
0666:             */
0667:            public void testCreDelTh2Tx1000Cr100() {
0668:
0669:                if (!interactive) {
0670:                    perform(2, 1000, 100, 1000000,
0671:                            getStartId(ID_Th2Tx1000Cr100));
0672:                }
0673:            }
0674:
0675:            /**
0676:             * Tests 10.000 transactions where each of them creates 100 objects using 2 threads.
0677:             */
0678:            public void testCreDelTh2Tx10000Cr100() {
0679:
0680:                if (!interactive) {
0681:                    perform(2, 10000, 100, 1000000,
0682:                            getStartId(ID_Th2Tx10000Cr100));
0683:                }
0684:            }
0685:
0686:            /**
0687:             * Tests 10 transactions where each of them creates 500 objects using 2 threads.
0688:             */
0689:            public void testCreDelTh2Tx10Cr500() {
0690:
0691:                if (!interactive) {
0692:                    perform(2, 10, 500, 1000000, getStartId(ID_Th2Tx10Cr500));
0693:                }
0694:            }
0695:
0696:            /**
0697:             * Tests 100 transactions where each of them creates 500 objects using 2 threads.
0698:             */
0699:            public void testCreDelTh2Tx100Cr500() {
0700:
0701:                if (!interactive) {
0702:                    perform(2, 100, 500, 1000000, getStartId(ID_Th2Tx100Cr500));
0703:                }
0704:            }
0705:
0706:            /**
0707:             * Tests 1.000 transactions where each of them creates 500 objects using 2 threads.
0708:             */
0709:            public void testCreDelTh2Tx1000Cr500() {
0710:
0711:                if (!interactive) {
0712:                    perform(2, 1000, 500, 1000000,
0713:                            getStartId(ID_Th2Tx1000Cr500));
0714:                }
0715:            }
0716:
0717:            /**
0718:             * Tests 10 transactions where each of them creates 1.000 objects using 2 threads.
0719:             */
0720:            public void testCreDelTh2Tx10Cr1000() {
0721:
0722:                if (!interactive) {
0723:                    perform(2, 10, 1000, 1000000, getStartId(ID_Th2Tx10Cr1000));
0724:                }
0725:            }
0726:
0727:            /**
0728:             * Tests 100 transactions where each of them creates 1.000 objects using 2 threads.
0729:             */
0730:            public void testCreDelTh2Tx100Cr1000() {
0731:
0732:                if (!interactive) {
0733:                    perform(2, 100, 1000, 1000000,
0734:                            getStartId(ID_Th2Tx100Cr1000));
0735:                }
0736:            }
0737:
0738:            /**
0739:             * Tests 1.000 transactions where each of them creates 1.000 objects using 2 threads.
0740:             */
0741:            public void testCreDelTh2Tx1000Cr1000() {
0742:
0743:                if (!interactive) {
0744:                    perform(2, 1000, 1000, 1000000,
0745:                            getStartId(ID_Th2Tx1000Cr1000));
0746:                }
0747:            }
0748:
0749:            /**
0750:             * Tests 10 transactions where each of them creates 2.000 objects using 2 threads.
0751:             */
0752:            public void testCreDelTh2Tx10Cr2000() {
0753:
0754:                if (!interactive) {
0755:                    perform(2, 10, 2000, 10000000, getStartId(ID_Th2Tx10Cr2000));
0756:                }
0757:            }
0758:
0759:            /**
0760:             * Tests 100 transactions where each of them creates 2.000 objects using 2 threads.
0761:             */
0762:            public void testCreDelTh2Tx100Cr2000() {
0763:
0764:                if (!interactive) {
0765:                    perform(2, 100, 2000, 10000000,
0766:                            getStartId(ID_Th2Tx100Cr2000));
0767:                }
0768:            }
0769:
0770:            /**
0771:             * Tests 1.000 transactions where each of them creates 2.000 objects using 2 threads.
0772:             */
0773:            public void testCreDelTh2Tx1000Cr2000() {
0774:
0775:                if (!interactive) {
0776:                    perform(2, 1000, 2000, 10000000,
0777:                            getStartId(ID_Th2Tx1000Cr2000));
0778:                }
0779:            }
0780:
0781:            /**
0782:             * Tests 10 transactions where each of them creates 10.000 objects using 2 threads.
0783:             */
0784:            public void testCreDelTh2Tx10Cr10000() {
0785:
0786:                if (!interactive) {
0787:                    perform(2, 10, 10000, 10000000,
0788:                            getStartId(ID_Th2Tx10Cr10000));
0789:                }
0790:            }
0791:
0792:            /**
0793:             * Tests 100 transactions where each of them creates 10.000 objects using 2 threads.
0794:             */
0795:            public void testCreDelTh2Tx100Cr10000() {
0796:
0797:                if (!interactive) {
0798:                    perform(2, 100, 10000, 10000000,
0799:                            getStartId(ID_Th2Tx100Cr10000));
0800:                }
0801:            }
0802:
0803:            /**
0804:             * Tests 10 transactions where each of them creates 1 object using 3 threads.
0805:             */
0806:            public void testCreDelTh3Tx10Cr1() {
0807:
0808:                if (!interactive) {
0809:                    perform(3, 10, 1, 1000000, getStartId(ID_Th3Tx10Cr1));
0810:                }
0811:            }
0812:
0813:            /**
0814:             * Tests 100 transactions where each of them creates 1 object using 3 threads.
0815:             */
0816:            public void testCreDelTh3Tx100Cr1() {
0817:
0818:                if (!interactive) {
0819:                    perform(3, 100, 1, 1000000, getStartId(ID_Th3Tx100Cr1));
0820:                }
0821:            }
0822:
0823:            /**
0824:             * Tests 1.000 transactions where each of them creates 1 object using 3 threads.
0825:             */
0826:            public void testCreDelTh3Tx1000Cr1() {
0827:
0828:                if (!interactive) {
0829:                    perform(3, 1000, 1, 1000000, getStartId(ID_Th3Tx1000Cr1));
0830:                }
0831:            }
0832:
0833:            /**
0834:             * Tests 10.000 transactions where each of them creates 1 object using 3 threads.
0835:             */
0836:            public void testCreDelTh3Tx10000Cr1() {
0837:
0838:                if (!interactive) {
0839:                    perform(3, 10000, 1, 1000000, getStartId(ID_Th3Tx10000Cr1));
0840:                }
0841:            }
0842:
0843:            /**
0844:             * Tests 100.000 transactions where each of them creates 1 object using 3 threads.
0845:             */
0846:            public void testCreDelTh3Tx100000Cr1() {
0847:
0848:                if (!interactive) {
0849:                    perform(3, 100000, 1, 1000000,
0850:                            getStartId(ID_Th3Tx100000Cr1));
0851:                }
0852:            }
0853:
0854:            /**
0855:             * Tests 10 transactions where each of them creates 10 objects using 3 threads.
0856:             */
0857:            public void testCreDelTh3Tx10Cr10() {
0858:
0859:                if (!interactive) {
0860:                    perform(3, 10, 10, 1000000, getStartId(ID_Th3Tx10Cr10));
0861:                }
0862:            }
0863:
0864:            /**
0865:             * Tests 100 transactions where each of them creates 10 objects using 3 threads.
0866:             */
0867:            public void testCreDelTh3Tx100Cr10() {
0868:
0869:                if (!interactive) {
0870:                    perform(3, 100, 10, 1000000, getStartId(ID_Th3Tx100Cr10));
0871:                }
0872:            }
0873:
0874:            /**
0875:             * Tests 1.000 transactions where each of them creates 10 objects using 3 threads.
0876:             */
0877:            public void testCreDelTh3Tx1000Cr10() {
0878:
0879:                if (!interactive) {
0880:                    perform(3, 1000, 10, 1000000, getStartId(ID_Th3Tx1000Cr10));
0881:                }
0882:            }
0883:
0884:            /**
0885:             * Tests 10.000 transactions where each of them creates 10 objects using 3 threads.
0886:             */
0887:            public void testCreDelTh3Tx10000Cr10() {
0888:
0889:                if (!interactive) {
0890:                    perform(3, 10000, 10, 1000000,
0891:                            getStartId(ID_Th3Tx10000Cr10));
0892:                }
0893:            }
0894:
0895:            /**
0896:             * Tests 100.000 transactions where each of them creates 10 objects using 3 threads.
0897:             */
0898:            public void testCreDelTh3Tx100000Cr10() {
0899:
0900:                if (!interactive) {
0901:                    perform(3, 100000, 10, 1000000,
0902:                            getStartId(ID_Th3Tx100000Cr10));
0903:                }
0904:            }
0905:
0906:            /**
0907:             * Tests 10 transactions where each of them creates 100 objects using 3 threads.
0908:             */
0909:            public void testCreDelTh3Tx10Cr100() {
0910:
0911:                if (!interactive) {
0912:                    perform(3, 10, 100, 1000000, getStartId(ID_Th3Tx10Cr100));
0913:                }
0914:            }
0915:
0916:            /**
0917:             * Tests 100 transactions where each of them creates 100 objects using 3 threads.
0918:             */
0919:            public void testCreDelTh3Tx100Cr100() {
0920:
0921:                if (!interactive) {
0922:                    perform(3, 100, 100, 1000000, getStartId(ID_Th3Tx100Cr100));
0923:                }
0924:            }
0925:
0926:            /**
0927:             * Tests 1.000 transactions where each of them creates 100 objects using 3 threads.
0928:             */
0929:            public void testCreDelTh3Tx1000Cr100() {
0930:
0931:                if (!interactive) {
0932:                    perform(3, 1000, 100, 1000000,
0933:                            getStartId(ID_Th3Tx1000Cr100));
0934:                }
0935:            }
0936:
0937:            /**
0938:             * Tests 10.000 transactions where each of them creates 100 objects using 3 threads.
0939:             */
0940:            public void testCreDelTh3Tx10000Cr100() {
0941:
0942:                if (!interactive) {
0943:                    perform(3, 10000, 100, 1000000,
0944:                            getStartId(ID_Th3Tx10000Cr100));
0945:                }
0946:            }
0947:
0948:            /**
0949:             * Tests 10 transactions where each of them creates 500 objects using 3 threads.
0950:             */
0951:            public void testCreDelTh3Tx10Cr500() {
0952:
0953:                if (!interactive) {
0954:                    perform(3, 10, 500, 1000000, getStartId(ID_Th3Tx10Cr500));
0955:                }
0956:            }
0957:
0958:            /**
0959:             * Tests 100 transactions where each of them creates 500 objects using 3 threads.
0960:             */
0961:            public void testCreDelTh3Tx100Cr500() {
0962:
0963:                if (!interactive) {
0964:                    perform(3, 100, 500, 1000000, getStartId(ID_Th3Tx100Cr500));
0965:                }
0966:            }
0967:
0968:            /**
0969:             * Tests 1.000 transactions where each of them creates 500 objects using 3 threads.
0970:             */
0971:            public void testCreDelTh3Tx1000Cr500() {
0972:
0973:                if (!interactive) {
0974:                    perform(3, 1000, 500, 1000000,
0975:                            getStartId(ID_Th3Tx1000Cr500));
0976:                }
0977:            }
0978:
0979:            /**
0980:             * Tests 10 transactions where each of them creates 1.000 objects using 3 threads.
0981:             */
0982:            public void testCreDelTh3Tx10Cr1000() {
0983:
0984:                if (!interactive) {
0985:                    perform(3, 10, 1000, 1000000, getStartId(ID_Th3Tx10Cr1000));
0986:                }
0987:            }
0988:
0989:            /**
0990:             * Tests 100 transactions where each of them creates 1.000 objects using 3 threads.
0991:             */
0992:            public void testCreDelTh3Tx100Cr1000() {
0993:
0994:                if (!interactive) {
0995:                    perform(3, 100, 1000, 1000000,
0996:                            getStartId(ID_Th3Tx100Cr1000));
0997:                }
0998:            }
0999:
1000:            /**
1001:             * Tests 1.000 transactions where each of them creates 1.000 objects using 3 threads.
1002:             */
1003:            public void testCreDelTh3Tx1000Cr1000() {
1004:
1005:                if (!interactive) {
1006:                    perform(3, 1000, 1000, 1000000,
1007:                            getStartId(ID_Th3Tx1000Cr1000));
1008:                }
1009:            }
1010:
1011:            /**
1012:             * Tests 10 transactions where each of them creates 2.000 objects using 3 threads.
1013:             */
1014:            public void testCreDelTh3Tx10Cr2000() {
1015:
1016:                if (!interactive) {
1017:                    perform(3, 10, 2000, 10000000, getStartId(ID_Th3Tx10Cr2000));
1018:                }
1019:            }
1020:
1021:            /**
1022:             * Tests 100 transactions where each of them creates 2.000 objects using 3 threads.
1023:             */
1024:            public void testCreDelTh3Tx100Cr2000() {
1025:
1026:                if (!interactive) {
1027:                    perform(3, 100, 2000, 10000000,
1028:                            getStartId(ID_Th3Tx100Cr2000));
1029:                }
1030:            }
1031:
1032:            /**
1033:             * Tests 1.000 transactions where each of them creates 2.000 objects using 3 threads.
1034:             */
1035:            public void testCreDelTh3Tx1000Cr2000() {
1036:
1037:                if (!interactive) {
1038:                    perform(3, 1000, 2000, 10000000,
1039:                            getStartId(ID_Th3Tx1000Cr2000));
1040:                }
1041:            }
1042:
1043:            /**
1044:             * Tests 10 transactions where each of them creates 10.000 objects using 3 threads.
1045:             */
1046:            public void testCreDelTh3Tx10Cr10000() {
1047:
1048:                if (!interactive) {
1049:                    perform(3, 10, 10000, 10000000,
1050:                            getStartId(ID_Th3Tx10Cr10000));
1051:                }
1052:            }
1053:
1054:            /**
1055:             * Tests 100 transactions where each of them creates 10.000 objects using 3 threads.
1056:             */
1057:            public void testCreDelTh3Tx100Cr10000() {
1058:
1059:                if (!interactive) {
1060:                    perform(3, 100, 10000, 10000000,
1061:                            getStartId(ID_Th3Tx100Cr10000));
1062:                }
1063:            }
1064:
1065:            /**
1066:             * Tests 10 transactions where each of them creates 1 object using 4 threads.
1067:             */
1068:            public void testCreDelTh4Tx10Cr1() {
1069:
1070:                if (!interactive) {
1071:                    perform(4, 10, 1, 1000000, getStartId(ID_Th4Tx10Cr1));
1072:                }
1073:            }
1074:
1075:            /**
1076:             * Tests 100 transactions where each of them creates 1 object using 4 threads.
1077:             */
1078:            public void testCreDelTh4Tx100Cr1() {
1079:
1080:                if (!interactive) {
1081:                    perform(4, 100, 1, 1000000, getStartId(ID_Th4Tx100Cr1));
1082:                }
1083:            }
1084:
1085:            /**
1086:             * Tests 1.000 transactions where each of them creates 1 object using 4 threads.
1087:             */
1088:            public void testCreDelTh4Tx1000Cr1() {
1089:
1090:                if (!interactive) {
1091:                    perform(4, 1000, 1, 1000000, getStartId(ID_Th4Tx1000Cr1));
1092:                }
1093:            }
1094:
1095:            /**
1096:             * Tests 10.000 transactions where each of them creates 1 object using 4 threads.
1097:             */
1098:            public void testCreDelTh4Tx10000Cr1() {
1099:
1100:                if (!interactive) {
1101:                    perform(4, 10000, 1, 1000000, getStartId(ID_Th4Tx10000Cr1));
1102:                }
1103:            }
1104:
1105:            /**
1106:             * Tests 100.000 transactions where each of them creates 1 object using 4 threads.
1107:             */
1108:            public void testCreDelTh4Tx100000Cr1() {
1109:
1110:                if (!interactive) {
1111:                    perform(4, 100000, 1, 1000000,
1112:                            getStartId(ID_Th4Tx100000Cr1));
1113:                }
1114:            }
1115:
1116:            /**
1117:             * Tests 10 transactions where each of them creates 10 objects using 4 threads.
1118:             */
1119:            public void testCreDelTh4Tx10Cr10() {
1120:
1121:                if (!interactive) {
1122:                    perform(4, 10, 10, 1000000, getStartId(ID_Th4Tx10Cr10));
1123:                }
1124:            }
1125:
1126:            /**
1127:             * Tests 100 transactions where each of them creates 10 objects using 4 threads.
1128:             */
1129:            public void testCreDelTh4Tx100Cr10() {
1130:
1131:                if (!interactive) {
1132:                    perform(4, 100, 10, 1000000, getStartId(ID_Th4Tx100Cr10));
1133:                }
1134:            }
1135:
1136:            /**
1137:             * Tests 1.000 transactions where each of them creates 10 objects using 4 threads.
1138:             */
1139:            public void testCreDelTh4Tx1000Cr10() {
1140:
1141:                if (!interactive) {
1142:                    perform(4, 1000, 10, 1000000, getStartId(ID_Th4Tx1000Cr10));
1143:                }
1144:            }
1145:
1146:            /**
1147:             * Tests 10.000 transactions where each of them creates 10 objects using 4 threads.
1148:             */
1149:            public void testCreDelTh4Tx10000Cr10() {
1150:
1151:                if (!interactive) {
1152:                    perform(4, 10000, 10, 1000000,
1153:                            getStartId(ID_Th4Tx10000Cr10));
1154:                }
1155:            }
1156:
1157:            /**
1158:             * Tests 100.000 transactions where each of them creates 10 objects using 4 threads.
1159:             */
1160:            public void testCreDelTh4Tx100000Cr10() {
1161:
1162:                if (!interactive) {
1163:                    perform(4, 100000, 10, 1000000,
1164:                            getStartId(ID_Th4Tx100000Cr10));
1165:                }
1166:            }
1167:
1168:            /**
1169:             * Tests 10 transactions where each of them creates 100 objects using 4 threads.
1170:             */
1171:            public void testCreDelTh4Tx10Cr100() {
1172:
1173:                if (!interactive) {
1174:                    perform(4, 10, 100, 1000000, getStartId(ID_Th4Tx10Cr100));
1175:                }
1176:            }
1177:
1178:            /**
1179:             * Tests 100 transactions where each of them creates 100 objects using 4 threads.
1180:             */
1181:            public void testCreDelTh4Tx100Cr100() {
1182:
1183:                if (!interactive) {
1184:                    perform(4, 100, 100, 1000000, getStartId(ID_Th4Tx100Cr100));
1185:                }
1186:            }
1187:
1188:            /**
1189:             * Tests 1.000 transactions where each of them creates 100 objects using 4 threads.
1190:             */
1191:            public void testCreDelTh4Tx1000Cr100() {
1192:
1193:                if (!interactive) {
1194:                    perform(4, 1000, 100, 1000000,
1195:                            getStartId(ID_Th4Tx1000Cr100));
1196:                }
1197:            }
1198:
1199:            /**
1200:             * Tests 10.000 transactions where each of them creates 100 objects using 4 threads.
1201:             */
1202:            public void testCreDelTh4Tx10000Cr100() {
1203:
1204:                if (!interactive) {
1205:                    perform(4, 10000, 100, 1000000,
1206:                            getStartId(ID_Th4Tx10000Cr100));
1207:                }
1208:            }
1209:
1210:            /**
1211:             * Tests 10 transactions where each of them creates 500 objects using 4 threads.
1212:             */
1213:            public void testCreDelTh4Tx10Cr500() {
1214:
1215:                if (!interactive) {
1216:                    perform(4, 10, 500, 1000000, getStartId(ID_Th4Tx10Cr500));
1217:                }
1218:            }
1219:
1220:            /**
1221:             * Tests 100 transactions where each of them creates 500 objects using 4 threads.
1222:             */
1223:            public void testCreDelTh4Tx100Cr500() {
1224:
1225:                if (!interactive) {
1226:                    perform(4, 100, 500, 1000000, getStartId(ID_Th4Tx100Cr500));
1227:                }
1228:            }
1229:
1230:            /**
1231:             * Tests 1.000 transactions where each of them creates 500 objects using 4 threads.
1232:             */
1233:            public void testCreDelTh4Tx1000Cr500() {
1234:
1235:                if (!interactive) {
1236:                    perform(4, 1000, 500, 1000000,
1237:                            getStartId(ID_Th4Tx1000Cr500));
1238:                }
1239:            }
1240:
1241:            /**
1242:             * Tests 10 transactions where each of them creates 1.000 objects using 4 threads.
1243:             */
1244:            public void testCreDelTh4Tx10Cr1000() {
1245:
1246:                if (!interactive) {
1247:                    perform(4, 10, 1000, 1000000, getStartId(ID_Th4Tx10Cr1000));
1248:                }
1249:            }
1250:
1251:            /**
1252:             * Tests 100 transactions where each of them creates 1.000 objects using 4 threads.
1253:             */
1254:            public void testCreDelTh4Tx100Cr1000() {
1255:
1256:                if (!interactive) {
1257:                    perform(4, 100, 1000, 1000000,
1258:                            getStartId(ID_Th4Tx100Cr1000));
1259:                }
1260:            }
1261:
1262:            /**
1263:             * Tests 1.000 transactions where each of them creates 1.000 objects using 4 threads.
1264:             */
1265:            public void testCreDelTh4Tx1000Cr1000() {
1266:
1267:                if (!interactive) {
1268:                    perform(4, 1000, 1000, 1000000,
1269:                            getStartId(ID_Th4Tx1000Cr1000));
1270:                }
1271:            }
1272:
1273:            /**
1274:             * Tests 10 transactions where each of them creates 2.000 objects using 4 threads.
1275:             */
1276:            public void testCreDelTh4Tx10Cr2000() {
1277:
1278:                if (!interactive) {
1279:                    perform(4, 10, 2000, 10000000, getStartId(ID_Th4Tx10Cr2000));
1280:                }
1281:            }
1282:
1283:            /**
1284:             * Tests 100 transactions where each of them creates 2.000 objects using 4 threads.
1285:             */
1286:            public void testCreDelTh4Tx100Cr2000() {
1287:
1288:                if (!interactive) {
1289:                    perform(4, 100, 2000, 10000000,
1290:                            getStartId(ID_Th4Tx100Cr2000));
1291:                }
1292:            }
1293:
1294:            /**
1295:             * Tests 1.000 transactions where each of them creates 2.000 objects using 4 threads.
1296:             */
1297:            public void testCreDelTh4Tx1000Cr2000() {
1298:
1299:                if (!interactive) {
1300:                    perform(4, 1000, 2000, 10000000,
1301:                            getStartId(ID_Th4Tx1000Cr2000));
1302:                }
1303:            }
1304:
1305:            /**
1306:             * Tests 10 transactions where each of them creates 10.000 objects using 4 threads.
1307:             */
1308:            public void testCreDelTh4Tx10Cr10000() {
1309:
1310:                if (!interactive) {
1311:                    perform(4, 10, 10000, 10000000,
1312:                            getStartId(ID_Th4Tx10Cr10000));
1313:                }
1314:            }
1315:
1316:            /**
1317:             * Tests 100 transactions where each of them creates 10.000 objects using 4 threads.
1318:             */
1319:            public void testCreDelTh4Tx100Cr10000() {
1320:
1321:                if (!interactive) {
1322:                    perform(4, 100, 10000, 10000000,
1323:                            getStartId(ID_Th4Tx100Cr10000));
1324:                }
1325:            }
1326:
1327:            /**
1328:             * Tests 10 transactions where each of them creates 1 object using 10 threads.
1329:             */
1330:            public void testCreDelTh10Tx10Cr1() {
1331:
1332:                if (!interactive) {
1333:                    perform(10, 10, 1, 1000000, getStartId(ID_Th10Tx10Cr1));
1334:                }
1335:            }
1336:
1337:            /**
1338:             * Tests 100 transactions where each of them creates 1 object using 10 threads.
1339:             */
1340:            public void testCreDelTh10Tx100Cr1() {
1341:
1342:                if (!interactive) {
1343:                    perform(10, 100, 1, 1000000, getStartId(ID_Th10Tx100Cr1));
1344:                }
1345:            }
1346:
1347:            /**
1348:             * Tests 1.000 transactions where each of them creates 1 object using 10 threads.
1349:             */
1350:            public void testCreDelTh10Tx1000Cr1() {
1351:
1352:                if (!interactive) {
1353:                    perform(10, 1000, 1, 1000000, getStartId(ID_Th10Tx1000Cr1));
1354:                }
1355:            }
1356:
1357:            /**
1358:             * Tests 10.000 transactions where each of them creates 1 object using 10 threads.
1359:             */
1360:            public void testCreDelTh10Tx10000Cr1() {
1361:
1362:                if (!interactive) {
1363:                    perform(10, 10000, 1, 1000000,
1364:                            getStartId(ID_Th10Tx10000Cr1));
1365:                }
1366:            }
1367:
1368:            /**
1369:             * Tests 100.000 transactions where each of them creates 1 object using 10 threads.
1370:             */
1371:            public void testCreDelTh10Tx100000Cr1() {
1372:
1373:                if (!interactive) {
1374:                    perform(10, 100000, 1, 1000000,
1375:                            getStartId(ID_Th10Tx100000Cr1));
1376:                }
1377:            }
1378:
1379:            /**
1380:             * Tests 10 transactions where each of them creates 10 objects using 10 threads.
1381:             */
1382:            public void testCreDelTh10Tx10Cr10() {
1383:
1384:                if (!interactive) {
1385:                    perform(10, 10, 10, 1000000, getStartId(ID_Th10Tx10Cr10));
1386:                }
1387:            }
1388:
1389:            /**
1390:             * Tests 100 transactions where each of them creates 10 objects using 10 threads.
1391:             */
1392:            public void testCreDelTh10Tx100Cr10() {
1393:
1394:                if (!interactive) {
1395:                    perform(10, 100, 10, 1000000, getStartId(ID_Th10Tx100Cr10));
1396:                }
1397:            }
1398:
1399:            /**
1400:             * Tests 1.000 transactions where each of them creates 10 objects using 10 threads.
1401:             */
1402:            public void testCreDelTh10Tx1000Cr10() {
1403:
1404:                if (!interactive) {
1405:                    perform(10, 1000, 10, 1000000,
1406:                            getStartId(ID_Th10Tx1000Cr10));
1407:                }
1408:            }
1409:
1410:            /**
1411:             * Tests 10.000 transactions where each of them creates 10 objects using 10 threads.
1412:             */
1413:            public void testCreDelTh10Tx10000Cr10() {
1414:
1415:                if (!interactive) {
1416:                    perform(10, 10000, 10, 1000000,
1417:                            getStartId(ID_Th10Tx10000Cr10));
1418:                }
1419:            }
1420:
1421:            /**
1422:             * Tests 100.000 transactions where each of them creates 10 objects using 10 threads.
1423:             */
1424:            public void testCreDelTh10Tx100000Cr10() {
1425:
1426:                if (!interactive) {
1427:                    perform(10, 100000, 10, 1000000,
1428:                            getStartId(ID_Th10Tx100000Cr10));
1429:                }
1430:            }
1431:
1432:            /**
1433:             * Tests 10 transactions where each of them creates 100 objects using 10 threads.
1434:             */
1435:            public void testCreDelTh10Tx10Cr100() {
1436:
1437:                if (!interactive) {
1438:                    perform(10, 10, 100, 1000000, getStartId(ID_Th10Tx10Cr100));
1439:                }
1440:            }
1441:
1442:            /**
1443:             * Tests 100 transactions where each of them creates 100 objects using 10 threads.
1444:             */
1445:            public void testCreDelTh10Tx100Cr100() {
1446:
1447:                if (!interactive) {
1448:                    perform(10, 100, 100, 1000000,
1449:                            getStartId(ID_Th10Tx100Cr100));
1450:                }
1451:            }
1452:
1453:            /**
1454:             * Tests 1.000 transactions where each of them creates 100 objects using 10 threads.
1455:             */
1456:            public void testCreDelTh10Tx1000Cr100() {
1457:
1458:                if (!interactive) {
1459:                    perform(10, 1000, 100, 1000000,
1460:                            getStartId(ID_Th10Tx1000Cr100));
1461:                }
1462:            }
1463:
1464:            /**
1465:             * Tests 10.000 transactions where each of them creates 100 objects using 10 threads.
1466:             */
1467:            public void testCreDelTh10Tx10000Cr100() {
1468:
1469:                if (!interactive) {
1470:                    perform(10, 10000, 100, 1000000,
1471:                            getStartId(ID_Th10Tx10000Cr100));
1472:                }
1473:            }
1474:
1475:            /**
1476:             * Tests 10 transactions where each of them creates 500 objects using 10 threads.
1477:             */
1478:            public void testCreDelTh10Tx10Cr500() {
1479:                if (!interactive) {
1480:                    perform(10, 10, 500, 1000000, getStartId(ID_Th10Tx10Cr500));
1481:                }
1482:            }
1483:
1484:            /**
1485:             * Tests 100 transactions where each of them creates 500 objects using 10 threads.
1486:             */
1487:            public void testCreDelTh10Tx100Cr500() {
1488:                if (!interactive) {
1489:                    perform(10, 100, 500, 1000000,
1490:                            getStartId(ID_Th10Tx100Cr500));
1491:                }
1492:            }
1493:
1494:            /**
1495:             * Tests 1.000 transactions where each of them creates 500 objects using 10 threads.
1496:             */
1497:            public void testCreDelTh10Tx1000Cr500() {
1498:
1499:                if (!interactive) {
1500:                    perform(10, 1000, 500, 1000000,
1501:                            getStartId(ID_Th10Tx1000Cr500));
1502:                }
1503:            }
1504:
1505:            /**
1506:             * Tests 10 transactions where each of them creates 1.000 objects using 10 threads.
1507:             */
1508:            public void testCreDelTh10Tx10Cr1000() {
1509:                if (!interactive) {
1510:                    perform(10, 10, 1000, 1000000,
1511:                            getStartId(ID_Th10Tx10Cr1000));
1512:                }
1513:            }
1514:
1515:            /**
1516:             * Tests 100 transactions where each of them creates 1.000 objects using 10 threads.
1517:             */
1518:            public void testCreDelTh10Tx100Cr1000() {
1519:                if (!interactive) {
1520:                    perform(10, 100, 1000, 1000000,
1521:                            getStartId(ID_Th10Tx100Cr1000));
1522:                }
1523:            }
1524:
1525:            /**
1526:             * Tests 1.000 transactions where each of them creates 1.000 objects using 10 threads.
1527:             */
1528:            public void testCreDelTh10Tx1000Cr1000() {
1529:                if (!interactive) {
1530:                    perform(10, 1000, 1000, 1000000,
1531:                            getStartId(ID_Th10Tx1000Cr1000));
1532:                }
1533:            }
1534:
1535:            /**
1536:             * Tests 10 transactions where each of them creates 2.000 objects using 10 threads.
1537:             */
1538:            public void testCreDelTh10Tx10Cr2000() {
1539:                if (!interactive) {
1540:                    perform(10, 10, 2000, 10000000,
1541:                            getStartId(ID_Th10Tx10Cr2000));
1542:                }
1543:            }
1544:
1545:            /**
1546:             * Tests 100 transactions where each of them creates 2.000 objects using 10 threads.
1547:             */
1548:            public void testCreDelTh10Tx100Cr2000() {
1549:                if (!interactive) {
1550:                    perform(10, 100, 2000, 10000000,
1551:                            getStartId(ID_Th10Tx100Cr2000));
1552:                }
1553:            }
1554:
1555:            /**
1556:             * Tests 1.000 transactions where each of them creates 2.000 objects using 10 threads.
1557:             */
1558:            public void testCreDelTh10Tx1000Cr2000() {
1559:                if (!interactive) {
1560:                    perform(10, 1000, 2000, 10000000,
1561:                            getStartId(ID_Th10Tx1000Cr2000));
1562:                }
1563:            }
1564:
1565:            /**
1566:             * Tests 10 transactions where each of them creates 10.000 objects using 10 threads.
1567:             */
1568:            public void testCreDelTh10Tx10Cr10000() {
1569:                if (!interactive) {
1570:                    perform(10, 10, 10000, 10000000,
1571:                            getStartId(ID_Th10Tx10Cr10000));
1572:                }
1573:            }
1574:
1575:            /**
1576:             * Tests 100 transactions where each of them creates 10.000 objects using 10 threads.
1577:             */
1578:            public void testCreDelTh10Tx100Cr10000() {
1579:                if (!interactive) {
1580:                    perform(10, 100, 10000, 10000000,
1581:                            getStartId(ID_Th10Tx100Cr10000));
1582:                }
1583:            }
1584:        }
1585:
1586:        class Threshold {
1587:            private final int threshold;
1588:            private int level;
1589:
1590:            Threshold(int th) {
1591:                threshold = th;
1592:                level = 0;
1593:            }
1594:
1595:            void createDone() {
1596:                level++;
1597:            }
1598:
1599:            void deleteDone() {
1600:                level--;
1601:            }
1602:
1603:            boolean canDelete() {
1604:                return level >= threshold;
1605:            }
1606:
1607:            int getLevel() {
1608:                return level;
1609:            }
1610:
1611:            int getThreshold() {
1612:                return threshold;
1613:            }
1614:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.