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.util.monolog.api.BasicLevel;
0020: import org.objectweb.speedo.pobjects.common.ParamsTest;
0021:
0022: import javax.jdo.PersistenceManager;
0023: import javax.jdo.JDOFatalException;
0024:
0025: /**
0026: * Stresses the deletion function of Speedo.
0027: *
0028: * @author P. Dechamboux
0029: */
0030: public class TestDeletion extends IntUserIdHelper {
0031:
0032: private String DELETION = getLoggerName() + ".deletion";
0033:
0034: public TestDeletion(String s) {
0035: super (s);
0036: }
0037:
0038: protected String getLoggerName() {
0039: return STRESS_LOG_NAME + ".TestDeletion";
0040: }
0041:
0042: class DeletionCtx extends IUICtx {
0043: public int nbDeletion;
0044:
0045: public DeletionCtx(int dbSize, int nbDeletion) {
0046: super (dbSize);
0047: this .nbDeletion = nbDeletion;
0048: }
0049:
0050: public String toString() {
0051: return super .toString() + " / ndDeletion = " + nbDeletion;
0052: }
0053: }
0054:
0055: protected void prepareTest(StressHelper.TaskManager tm, Object ctx) {
0056: oids = null;
0057: super .prepareTest(tm, ctx);
0058: }
0059:
0060: protected void perform(Task task, int threadId, int txId,
0061: Object ctx, PerformResult res) {
0062: DeletionCtx dctx = (DeletionCtx) ctx;
0063: PersistenceManager pm = getPM(task, threadId, txId);
0064: try {
0065: res.beginTest();
0066: beginTx(pm, task, threadId, txId);
0067: for (int no = 0; no < dctx.nbDeletion; no++) {
0068: int oid = (txId * dctx.nbDeletion) + no;
0069: if (debug) {
0070: logger.log(BasicLevel.DEBUG, "Deleting object "
0071: + oid);
0072: }
0073: pm.deletePersistent(pm.getObjectById(dctx.oids[oid],
0074: false));
0075: }
0076: commitTx(pm, task, threadId, txId);
0077: res.endTest();
0078: } catch (JDOFatalException e) {
0079: rollbackOnException(pm, e, res, task, threadId, txId);
0080: } catch (Throwable e) {
0081: stopOnError(pm, e, res, task, threadId, txId);
0082: } finally {
0083: closePM(pm, threadId, txId, task, res);
0084: }
0085: }
0086:
0087: /**
0088: * Methode d'aiguillage
0089: */
0090: protected void perform(ParamsTest param) {
0091: if (!interactive) {
0092: perform(param.getNbth(), param.getNbtx(), param.getTo(),
0093: new DeletionCtx(param.getDbSize(), param.getNbc()));
0094: }
0095: }
0096:
0097: /**
0098: * Tests the deletion of a lot of persistent objects, with interactive
0099: * setting of test parameteres (see file userconf/project.properties).
0100: */
0101: public void testInteractive() {
0102: if (interactive) {
0103: perform(Integer.getInteger(THREAD, 10).intValue(), Integer
0104: .getInteger(TX, 100).intValue(), Integer
0105: .getInteger(TIMEOUT, 200000).intValue(),
0106: new DeletionCtx(Integer.getInteger(DBSIZE, 100000)
0107: .intValue(), Integer.getInteger(DELETION,
0108: 1000).intValue()));
0109: }
0110: }
0111:
0112: /**
0113: * Tests 10 transactions where each of them creates 1 object using 1
0114: * thread.
0115: */
0116: public void testDeletionTh1Tx10Cr1() {
0117: if (!interactive) {
0118: perform(1, 10, 1000000, new DeletionCtx(10, 1));
0119: }
0120: }
0121:
0122: /* *
0123: }
0124: class Toto {
0125: boolean interactive;
0126: void perform(ParamsTest p){}
0127: * */
0128:
0129: /**
0130: * Tests 100 transactions where each of them Delete 1 object using 1
0131: * thread.
0132: */
0133: public void testDeletionTh1Tx100De1() {
0134: ParamsTest params = new ParamsTest(1, 100, 1, 1000000, 0, 100);
0135: if (!interactive) {
0136: perform(params);
0137: }
0138: }
0139:
0140: /**
0141: * Tests 1.000 transactions where each of them deletes 1 object using 1
0142: * thread.
0143: */
0144: public void testDeletionTh1Tx1000Cr1() {
0145: ParamsTest params = new ParamsTest(1, 1000, 1, 1000000, 0, 1000);
0146: if (!interactive) {
0147: perform(params);
0148: }
0149: }
0150:
0151: /**
0152: * Tests 10.000 transactions where each of them deletes 1 object using 1
0153: * thread.
0154: */
0155: public void testDeletionTh1Tx10000Cr1() {
0156: ParamsTest params = new ParamsTest(1, 10000, 1, 1000000, 0,
0157: 10000);
0158: if (!interactive) {
0159: perform(params);
0160: }
0161: }
0162:
0163: /**
0164: * Tests 100.000 transactions where each of them deletes 1 object using 1
0165: * thread.
0166: */
0167: public void testDeletionTh1Tx100000Cr1() {
0168:
0169: ParamsTest params = new ParamsTest(1, 100000, 1, 10000000, 0,
0170: 100000);
0171: if (!interactive) {
0172: perform(params);
0173: }
0174: }
0175:
0176: /**
0177: * Tests 10 transactions where each of them deletes 10 objects using 1
0178: * thread.
0179: */
0180: public void testDeletionTh1Tx10Cr10() {
0181:
0182: ParamsTest params = new ParamsTest(1, 10, 10, 1000000, 0, 100);
0183: if (!interactive) {
0184: perform(params);
0185: }
0186: }
0187:
0188: /**
0189: * Tests 100 transactions where each of them deletes 10 objects using 1
0190: * thread.
0191: */
0192: public void testDeletionTh1Tx100Cr10() {
0193:
0194: ParamsTest params = new ParamsTest(1, 100, 10, 1000000, 0, 1000);
0195: if (!interactive) {
0196: perform(params);
0197: }
0198: }
0199:
0200: /**
0201: * Tests 1.000 transactions where each of them deletes 10 objects using 1
0202: * thread.
0203: */
0204: public void testDeletionTh1Tx1000Cr10() {
0205:
0206: ParamsTest params = new ParamsTest(1, 1000, 10, 1000000, 0,
0207: 10000);
0208: if (!interactive) {
0209: perform(params);
0210: }
0211: }
0212:
0213: /**
0214: * Tests 10.000 transactions where each of them deletes 10 objects using 1
0215: * thread.
0216: */
0217: public void testDeletionTh1Tx10000Cr10() {
0218:
0219: ParamsTest params = new ParamsTest(1, 10000, 10, 10000000, 0,
0220: 100000);
0221: if (!interactive) {
0222: perform(params);
0223: }
0224: }
0225:
0226: /**
0227: * Tests 100.000 transactions where each of them deletes 10 objects using 1
0228: * thread.
0229: */
0230: public void _testDeletionTh1Tx100000Cr10() {
0231:
0232: ParamsTest params = new ParamsTest(1, 100000, 10, 100000000, 0,
0233: 1000000);
0234: if (!interactive) {
0235: perform(params);
0236: }
0237: }
0238:
0239: /**
0240: * Tests 10 transactions where each of them deletes 100 objects using 1
0241: * thread.
0242: */
0243: public void testDeletionTh1Tx10Cr100() {
0244:
0245: ParamsTest params = new ParamsTest(1, 10, 100, 1000000, 0, 1000);
0246: if (!interactive) {
0247: perform(params);
0248: }
0249: }
0250:
0251: /**
0252: * Tests 100 transactions where each of them deletes 100 objects using 1
0253: * thread.
0254: */
0255: public void testDeletionTh1Tx100Cr100() {
0256:
0257: ParamsTest params = new ParamsTest(1, 100, 100, 1000000, 0,
0258: 10000);
0259: if (!interactive) {
0260: perform(params);
0261: }
0262: }
0263:
0264: /**
0265: * Tests 1.000 transactions where each of them deletes 100 objects using 1
0266: * thread.
0267: */
0268: public void testDeletionTh1Tx1000Cr100() {
0269:
0270: ParamsTest params = new ParamsTest(1, 1000, 100, 10000000, 0,
0271: 100000);
0272: if (!interactive) {
0273: perform(params);
0274: }
0275: }
0276:
0277: /**
0278: * Tests 10.000 transactions where each of them deletes 100 objects using 1
0279: * thread.
0280: */
0281: public void testDeletionTh1Tx10000Cr100() {
0282:
0283: ParamsTest params = new ParamsTest(1, 10000, 100, 100000000, 0,
0284: 1000000);
0285: if (!interactive) {
0286: perform(params);
0287: }
0288: }
0289:
0290: /**
0291: * Tests 10 transactions where each of them deletes 500 objects using 1
0292: * thread.
0293: */
0294: public void testDeletionTh1Tx10Cr500() {
0295:
0296: ParamsTest params = new ParamsTest(1, 10, 500, 1000000, 0, 5000);
0297: if (!interactive) {
0298: perform(params);
0299: }
0300: }
0301:
0302: /**
0303: * Tests 100 transactions where each of them deletes 500 objects using 1
0304: * thread.
0305: */
0306: public void testDeletionTh1Tx100Cr500() {
0307:
0308: ParamsTest params = new ParamsTest(1, 100, 500, 10000000, 0,
0309: 50000);
0310: if (!interactive) {
0311: perform(params);
0312: }
0313: }
0314:
0315: /**
0316: * Tests 1.000 transactions where each of them deletes 500 objects using 1
0317: * thread.
0318: */
0319: public void testDeletionTh1Tx1000Cr500() {
0320:
0321: ParamsTest params = new ParamsTest(1, 1000, 500, 100000000, 0,
0322: 500000);
0323: if (!interactive) {
0324: perform(params);
0325: }
0326: }
0327:
0328: /**
0329: * Tests 10 transactions where each of them deletes 1.000 objects using 1
0330: * thread.
0331: */
0332: public void testDeletionTh1Tx10Cr1000() {
0333:
0334: ParamsTest params = new ParamsTest(1, 10, 1000, 1000000, 0,
0335: 10000);
0336: if (!interactive) {
0337: perform(params);
0338: }
0339: }
0340:
0341: /**
0342: * Tests 100 transactions where each of them deletes 1.000 objects using 1
0343: * thread.
0344: */
0345: public void testDeletionTh1Tx100Cr1000() {
0346:
0347: ParamsTest params = new ParamsTest(1, 100, 1000, 10000000, 0,
0348: 100000);
0349: if (!interactive) {
0350: perform(params);
0351: }
0352: }
0353:
0354: /**
0355: * Tests 1.000 transactions where each of them deletes 1.000 objects using
0356: * 1 thread.
0357: */
0358: public void testDeletionTh1Tx1000Cr1000() {
0359:
0360: ParamsTest params = new ParamsTest(1, 1000, 1000, 100000000, 0,
0361: 1000000);
0362: if (!interactive) {
0363: perform(params);
0364: }
0365: }
0366:
0367: /**
0368: * Tests 10 transactions where each of them deletes 2.000 objects using 1
0369: * thread.
0370: */
0371: public void testDeletionTh1Tx10Cr2000() {
0372:
0373: ParamsTest params = new ParamsTest(1, 10, 2000, 10000000, 0,
0374: 20000);
0375: if (!interactive) {
0376: perform(params);
0377: }
0378: }
0379:
0380: /**
0381: * Tests 100 transactions where each of them deletes 2.000 objects using 1
0382: * thread.
0383: */
0384: public void testDeletionTh1Tx100Cr2000() {
0385:
0386: ParamsTest params = new ParamsTest(1, 100, 2000, 100000000, 0,
0387: 200000);
0388: if (!interactive) {
0389: perform(params);
0390: }
0391: }
0392:
0393: /**
0394: * Tests 10 transactions where each of them deletes 1 object using 2
0395: * threads.
0396: */
0397: public void testDeletionTh2Tx10Cr1() {
0398:
0399: ParamsTest params = new ParamsTest(2, 10, 1, 1000000, 0, 10);
0400: if (!interactive) {
0401: perform(params);
0402: }
0403: }
0404:
0405: /**
0406: * Tests 100 transactions where each of them deletes 1 object using 2
0407: * threads.
0408: */
0409: public void testDeletionTh2Tx100Cr1() {
0410:
0411: ParamsTest params = new ParamsTest(2, 100, 1, 1000000, 0, 100);
0412: if (!interactive) {
0413: perform(params);
0414: }
0415: }
0416:
0417: /**
0418: * Tests 1.000 transactions where each of them deletes 1 object using 2
0419: * threads.
0420: */
0421: public void testDeletionTh2Tx1000Cr1() {
0422:
0423: ParamsTest params = new ParamsTest(2, 1000, 1, 1000000, 0, 1000);
0424: if (!interactive) {
0425: perform(params);
0426: }
0427: }
0428:
0429: /**
0430: * Tests 10.000 transactions where each of them deletes 1 object using 2
0431: * threads.
0432: */
0433: public void testDeletionTh2Tx10000Cr1() {
0434:
0435: ParamsTest params = new ParamsTest(2, 10000, 1, 1000000, 0,
0436: 10000);
0437: if (!interactive) {
0438: perform(params);
0439: }
0440: }
0441:
0442: /**
0443: * Tests 100.000 transactions where each of them deletes 1 object using 2
0444: * threads.
0445: */
0446: public void _testDeletionTh2Tx100000Cr1() {
0447:
0448: ParamsTest params = new ParamsTest(2, 100000, 1, 1000000, 0,
0449: 100000);
0450: if (!interactive) {
0451: perform(params);
0452: }
0453: }
0454:
0455: /**
0456: * Tests 10 transactions where each of them deletes 10 objects using 2
0457: * threads.
0458: */
0459: public void testDeletionTh2Tx10Cr10() {
0460:
0461: ParamsTest params = new ParamsTest(2, 10, 10, 1000000, 0, 100);
0462: if (!interactive) {
0463: perform(params);
0464: }
0465: }
0466:
0467: /**
0468: * Tests 100 transactions where each of them deletes 10 objects using 2
0469: * threads.
0470: */
0471: public void testDeletionTh2Tx100Cr10() {
0472:
0473: ParamsTest params = new ParamsTest(2, 100, 10, 1000000, 0, 1000);
0474: if (!interactive) {
0475: perform(params);
0476: }
0477: }
0478:
0479: /**
0480: * Tests 1.000 transactions where each of them deletes 10 objects using 2
0481: * threads.
0482: */
0483: public void testDeletionTh2Tx1000Cr10() {
0484:
0485: ParamsTest params = new ParamsTest(2, 1000, 10, 1000000, 0,
0486: 10000);
0487: if (!interactive) {
0488: perform(params);
0489: }
0490: }
0491:
0492: /**
0493: * Tests 10.000 transactions where each of them deletes 10 objects using 2
0494: * threads.
0495: */
0496: public void testDeletionTh2Tx10000Cr10() {
0497:
0498: ParamsTest params = new ParamsTest(2, 10000, 10, 1000000, 0,
0499: 100000);
0500: if (!interactive) {
0501: perform(params);
0502: }
0503: }
0504:
0505: /**
0506: * Tests 100.000 transactions where each of them deletes 10 objects using 2
0507: * threads.
0508: */
0509: public void _testDeletionTh2Tx100000Cr10() {
0510:
0511: ParamsTest params = new ParamsTest(2, 100000, 10, 1000000, 0,
0512: 1000000);
0513: if (!interactive) {
0514: perform(params);
0515: }
0516: }
0517:
0518: /**
0519: * Tests 10 transactions where each of them deletes 100 objects using 2
0520: * threads.
0521: */
0522: public void testDeletionTh2Tx10Cr100() {
0523:
0524: ParamsTest params = new ParamsTest(2, 10, 100, 1000000, 0, 1000);
0525: if (!interactive) {
0526: perform(params);
0527: }
0528: }
0529:
0530: /**
0531: * Tests 100 transactions where each of them deletes 100 objects using 2
0532: * threads.
0533: */
0534: public void testDeletionTh2Tx100Cr100() {
0535:
0536: ParamsTest params = new ParamsTest(2, 100, 100, 1000000, 0,
0537: 10000);
0538: if (!interactive) {
0539: perform(params);
0540: }
0541: }
0542:
0543: /**
0544: * Tests 1.000 transactions where each of them deletes 100 objects using 2
0545: * threads.
0546: */
0547: public void testDeletionTh2Tx1000Cr100() {
0548:
0549: ParamsTest params = new ParamsTest(2, 1000, 100, 1000000, 0,
0550: 100000);
0551: if (!interactive) {
0552: perform(params);
0553: }
0554: }
0555:
0556: /**
0557: * Tests 100 transactions where each of them deletes 2.000 objects using 2
0558: * threads.
0559: */
0560: public void testDeletionTh2Tx100Cr2000() {
0561:
0562: ParamsTest params = new ParamsTest(2, 100, 2000, 10000000, 0,
0563: 200000);
0564: if (!interactive) {
0565: perform(params);
0566: }
0567: }
0568:
0569: /**
0570: * Tests 1.000 transactions where each of them deletes 2.000 objects using
0571: * 2 threads.
0572: */
0573: public void testDeletionTh2Tx1000Cr2000() {
0574:
0575: ParamsTest params = new ParamsTest(2, 1000, 2000, 10000000, 0,
0576: 2000000);
0577: if (!interactive) {
0578: perform(params);
0579: }
0580: }
0581:
0582: /**
0583: * Tests 10 transactions where each of them deletes 1 object using 3
0584: * threads.
0585: */
0586: public void testDeletionTh3Tx10Cr1() {
0587:
0588: ParamsTest params = new ParamsTest(3, 10, 1, 1000000, 0, 10);
0589: if (!interactive) {
0590: perform(params);
0591: }
0592: }
0593:
0594: /**
0595: * Tests 100 transactions where each of them deletes 1 object using 3
0596: * threads.
0597: */
0598: public void testDeletionTh3Tx100Cr1() {
0599:
0600: ParamsTest params = new ParamsTest(3, 100, 1, 1000000, 0, 100);
0601: if (!interactive) {
0602: perform(params);
0603: }
0604: }
0605:
0606: /**
0607: * Tests 1.000 transactions where each of them deletes 1 object using 3
0608: * threads.
0609: */
0610: public void testDeletionTh3Tx1000Cr1() {
0611:
0612: ParamsTest params = new ParamsTest(3, 1000, 1, 1000000, 0, 1000);
0613: if (!interactive) {
0614: perform(params);
0615: }
0616: }
0617:
0618: /**
0619: * Tests 10.000 transactions where each of them deletes 1 object using 3
0620: * threads.
0621: */
0622: public void testDeletionTh3Tx10000Cr1() {
0623:
0624: ParamsTest params = new ParamsTest(3, 10000, 1, 1000000, 0,
0625: 10000);
0626: if (!interactive) {
0627: perform(params);
0628: }
0629: }
0630:
0631: /**
0632: * Tests 100.000 transactions where each of them deletes 1 object using 3
0633: * threads.
0634: */
0635: public void _testDeletionTh3Tx100000Cr1() {
0636:
0637: ParamsTest params = new ParamsTest(3, 100000, 1, 1000000, 0,
0638: 100000);
0639: if (!interactive) {
0640: perform(params);
0641: }
0642: }
0643:
0644: /**
0645: * Tests 10 transactions where each of them deletes 10 objects using 3
0646: * threads.
0647: */
0648: public void testDeletionTh3Tx10Cr10() {
0649:
0650: ParamsTest params = new ParamsTest(3, 10, 10, 1000000, 0, 100);
0651: if (!interactive) {
0652: perform(params);
0653: }
0654: }
0655:
0656: /**
0657: * Tests 100 transactions where each of them deletes 10 objects using 3
0658: * threads.
0659: */
0660: public void testDeletionTh3Tx100Cr10() {
0661:
0662: ParamsTest params = new ParamsTest(3, 100, 10, 1000000, 0, 1000);
0663: if (!interactive) {
0664: perform(params);
0665: }
0666: }
0667:
0668: /**
0669: * Tests 1.000 transactions where each of them deletes 10 objects using 3
0670: * threads.
0671: */
0672: public void testDeletionTh3Tx1000Cr10() {
0673:
0674: ParamsTest params = new ParamsTest(3, 1000, 10, 1000000, 0,
0675: 10000);
0676: if (!interactive) {
0677: perform(params);
0678: }
0679: }
0680:
0681: /**
0682: * Tests 10.000 transactions where each of them deletes 10 objects using 3
0683: * threads.
0684: */
0685: public void testDeletionTh3Tx10000Cr10() {
0686:
0687: ParamsTest params = new ParamsTest(3, 10000, 10, 1000000, 0,
0688: 100000);
0689: if (!interactive) {
0690: perform(params);
0691: }
0692: }
0693:
0694: /**
0695: * Tests 100.000 transactions where each of them deletes 10 objects using 3
0696: * threads.
0697: */
0698: public void _testDeletionTh3Tx100000Cr10() {
0699:
0700: ParamsTest params = new ParamsTest(3, 100000, 10, 1000000, 0,
0701: 1000000);
0702: if (!interactive) {
0703: perform(params);
0704: }
0705: }
0706:
0707: /**
0708: * Tests 100 transactions where each of them deletes 1 object using 4
0709: * threads.
0710: */
0711: public void testDeletionTh4Tx100Cr1() {
0712:
0713: ParamsTest params = new ParamsTest(4, 100, 1, 1000000, 0, 100);
0714: if (!interactive) {
0715: perform(params);
0716: }
0717: }
0718:
0719: /**
0720: * Tests 1.000 transactions where each of them deletes 1 object using 4
0721: * threads.
0722: */
0723: public void testDeletionTh4Tx1000Cr1() {
0724:
0725: ParamsTest params = new ParamsTest(4, 1000, 1, 1000000, 0, 1000);
0726: if (!interactive) {
0727: perform(params);
0728: }
0729: }
0730:
0731: /**
0732: * Tests 10.000 transactions where each of them deletes 1 object using 4
0733: * threads.
0734: */
0735: public void testDeletionTh4Tx10000Cr1() {
0736:
0737: ParamsTest params = new ParamsTest(4, 10000, 1, 1000000, 0,
0738: 10000);
0739: if (!interactive) {
0740: perform(params);
0741: }
0742: }
0743:
0744: /**
0745: * Tests 100.000 transactions where each of them deletes 1 object using 4
0746: * threads.
0747: */
0748: public void _testDeletionTh4Tx100000Cr1() {
0749:
0750: ParamsTest params = new ParamsTest(4, 100000, 1, 1000000, 0,
0751: 100000);
0752: if (!interactive) {
0753: perform(params);
0754: }
0755: }
0756:
0757: /**
0758: * Tests 10 transactions where each of them deletes 10 objects using 4
0759: * threads.
0760: */
0761: public void testDeletionTh4Tx10Cr10() {
0762:
0763: ParamsTest params = new ParamsTest(4, 10, 10, 1000000, 0, 100);
0764: if (!interactive) {
0765: perform(params);
0766: }
0767: }
0768:
0769: /**
0770: * Tests 1.000 transactions where each of them deletes 10 objects using 4
0771: * threads.
0772: */
0773: public void testDeletionTh4Tx1000Cr10() {
0774:
0775: ParamsTest params = new ParamsTest(4, 1000, 10, 1000000, 0,
0776: 10000);
0777: if (!interactive) {
0778: perform(params);
0779: }
0780: }
0781:
0782: /**
0783: * Tests 10.000 transactions where each of them deletes 10 objects using 4
0784: * threads.
0785: */
0786: public void testDeletionTh4Tx10000Cr10() {
0787:
0788: ParamsTest params = new ParamsTest(4, 10000, 10, 1000000, 0,
0789: 100000);
0790: if (!interactive) {
0791: perform(params);
0792: }
0793: }
0794:
0795: /**
0796: * Tests 100.000 transactions where each of them deletes 10 objects using 4
0797: * threads.
0798: */
0799: public void _testDeletionTh4Tx100000Cr10() {
0800:
0801: ParamsTest params = new ParamsTest(4, 100000, 10, 1000000, 0,
0802: 1000000);
0803: if (!interactive) {
0804: perform(params);
0805: }
0806: }
0807:
0808: /**
0809: * Tests 100 transactions where each of them deletes 500 objects using 4
0810: * threads.
0811: */
0812: public void testDeletionTh4Tx100Cr500() {
0813:
0814: ParamsTest params = new ParamsTest(4, 100, 500, 1000000, 0,
0815: 50000);
0816: if (!interactive) {
0817: perform(params);
0818: }
0819: }
0820:
0821: /**
0822: * Tests 1.000 transactions where each of them deletes 500 objects using 4
0823: * threads.
0824: */
0825: public void testDeletionTh4Tx1000Cr500() {
0826:
0827: ParamsTest params = new ParamsTest(4, 1000, 500, 1000000, 0,
0828: 500000);
0829: if (!interactive) {
0830: perform(params);
0831: }
0832: }
0833:
0834: /**
0835: * Tests 100 transactions where each of them deletes 10.000 objects using 4
0836: * threads.
0837: */
0838: public void testDeletionTh4Tx100Cr10000() {
0839:
0840: ParamsTest params = new ParamsTest(4, 100, 10000, 10000000,
0841: 1000000);
0842: if (!interactive) {
0843: perform(params);
0844: }
0845: }
0846:
0847: /**
0848: * Tests 10 transactions where each of them deletes 1 object using 10
0849: * threads.
0850: */
0851: public void testDeletionTh10Tx10Cr1() {
0852:
0853: ParamsTest params = new ParamsTest(10, 10, 1, 1000000, 0, 10);
0854: if (!interactive) {
0855: perform(params);
0856: }
0857: }
0858:
0859: /**
0860: * Tests 100 transactions where each of them deletes 1 object using 10
0861: * threads.
0862: */
0863: public void testDeletionTh10Tx100Cr1() {
0864:
0865: ParamsTest params = new ParamsTest(10, 100, 1, 1000000, 0, 100);
0866: if (!interactive) {
0867: perform(params);
0868: }
0869: }
0870:
0871: /**
0872: * Tests 1.000 transactions where each of them deletes 1 object using 10
0873: * threads.
0874: */
0875: public void testDeletionTh10Tx1000Cr1() {
0876:
0877: ParamsTest params = new ParamsTest(10, 1000, 1, 1000000, 0,
0878: 1000);
0879: if (!interactive) {
0880: perform(params);
0881: }
0882: }
0883:
0884: /**
0885: * Tests 10.000 transactions where each of them deletes 1 object using 10
0886: * threads.
0887: */
0888: public void testDeletionTh10Tx10000Cr1() {
0889:
0890: ParamsTest params = new ParamsTest(10, 10000, 1, 1000000, 0,
0891: 10000);
0892: if (!interactive) {
0893: perform(params);
0894: }
0895: }
0896:
0897: /**
0898: * Tests 100.000 transactions where each of them deletes 1 object using 10
0899: * threads.
0900: */
0901: public void _testDeletionTh10Tx100000Cr1() {
0902:
0903: ParamsTest params = new ParamsTest(10, 100000, 1, 1000000, 0,
0904: 100000);
0905: if (!interactive) {
0906: perform(params);
0907: }
0908: }
0909:
0910: /**
0911: * Tests 10 transactions where each of them deletes 10 objects using 10
0912: * threads.
0913: */
0914: public void testDeletionTh10Tx10Cr10() {
0915:
0916: ParamsTest params = new ParamsTest(10, 10, 10, 1000000, 0, 100);
0917: if (!interactive) {
0918: perform(params);
0919: }
0920: }
0921:
0922: /**
0923: * Tests 100 transactions where each of them deletes 10 objects using 10
0924: * threads.
0925: */
0926: public void testDeletionTh10Tx100Cr10() {
0927:
0928: ParamsTest params = new ParamsTest(10, 100, 10, 1000000, 0,
0929: 1000);
0930: if (!interactive) {
0931: perform(params);
0932: }
0933: }
0934:
0935: /**
0936: * Tests 1.000 transactions where each of them deletes 10 objects using 10
0937: * threads.
0938: */
0939: public void testDeletionTh10Tx1000Cr10() {
0940:
0941: ParamsTest params = new ParamsTest(10, 1000, 10, 1000000, 0,
0942: 10000);
0943: if (!interactive) {
0944: perform(params);
0945: }
0946: }
0947:
0948: /**
0949: * Tests 10.000 transactions where each of them deletes 10 objects using 10
0950: * threads.
0951: */
0952: public void testDeletionTh10Tx10000Cr10() {
0953:
0954: ParamsTest params = new ParamsTest(10, 10000, 10, 1000000, 0,
0955: 100000);
0956: if (!interactive) {
0957: perform(params);
0958: }
0959: }
0960:
0961: /**
0962: * Tests 100.000 transactions where each of them deletes 10 objects using
0963: * 10 threads.
0964: */
0965: public void _testDeletionTh10Tx100000Cr10() {
0966:
0967: ParamsTest params = new ParamsTest(10, 100000, 10, 1000000, 0,
0968: 1000000);
0969: if (!interactive) {
0970: perform(params);
0971: }
0972: }
0973:
0974: /**
0975: * Tests 100 transactions where each of them deletes 500 objects using 10
0976: * threads.
0977: */
0978: public void testDeletionTh10Tx100Cr500() {
0979:
0980: ParamsTest params = new ParamsTest(10, 100, 500, 1000000, 0,
0981: 50000);
0982: if (!interactive) {
0983: perform(params);
0984: }
0985: }
0986:
0987: /**
0988: * Tests 1.000 transactions where each of them deletes 500 objects using 10
0989: * threads.
0990: */
0991: public void testDeletionTh10Tx1000Cr500() {
0992:
0993: ParamsTest params = new ParamsTest(10, 1000, 500, 1000000, 0,
0994: 500000);
0995: if (!interactive) {
0996: perform(params);
0997: }
0998: }
0999:
1000: /**
1001: * Tests 1.000 transactions where each of them deletes 1.000 objects using
1002: * 10 threads.
1003: */
1004: public void testDeletionTh10Tx1000Cr1000() {
1005:
1006: ParamsTest params = new ParamsTest(10, 1000, 1000, 1000000, 0,
1007: 1000000);
1008: if (!interactive) {
1009: perform(params);
1010: }
1011: }
1012:
1013: /**
1014: * Tests 100 transactions where each of them deletes 10.000 objects using
1015: * 10 threads.
1016: */
1017: public void testDeletionTh10Tx100Cr10000() {
1018:
1019: ParamsTest params = new ParamsTest(10, 100, 10000, 10000000, 0,
1020: 1000000);
1021:
1022: if (!interactive) {
1023: perform(params);
1024: }
1025: }
1026:
1027: }
|