001: package measurements.suites;
002:
003: import java.lang.reflect.Field;
004: import java.lang.reflect.Method;
005:
006: import junit.framework.Test;
007: import ch.ethz.inf.util.junit.PerformanceTest;
008: import ch.ethz.inf.util.junit.PerformanceTestSuite;
009: import ch.ethz.jvmai.*;
010:
011: /**
012: * JoinPoint micro-measurements.
013: *
014: * Performance micro-measurements tests for method boundaries,
015: * fields accesses and modifications, exception handlers:
016: *
017: * 1) INVOKEVIRTUAL -> invoke a normal method
018: * 2) SYNC INVOKEVIRTUAL -> invoke a normal but synchronized method
019: * 3) INVOKEINTERFACE -> invoke a method through an interface
020: * 4) INVOKESPECIAL -> invoke a private method
021: * 5) INVOKESTATIC -> invoke a static method
022: * 6) GETFIELD -> used when a field has been read
023: * 7) PUTFIELD -> used when a field has been write
024: * 8) Exception Catch
025: * 9) Exception Throw
026: *
027: * Each test is executed "RUNS" times.
028: *
029: * @author Angela Nicoara
030: */
031: public class JoinPointMeasurements1_aj extends PerformanceTest {
032:
033: public boolean useProse = false;
034: public boolean checkAssert = true;
035:
036: protected JVMAspectInterface aspectInterface;
037: protected TestHook hook;
038:
039: // INVOKEVIRTUAL
040: public void localMethod() {
041: }
042:
043: public void localMethodLongO(Object ob1, Object ob2) {
044: }
045:
046: public void localMethodLongI(int ob1, int ob2) {
047: }
048:
049: public void localMethodLongL(long ob1, long ob2) {
050: }
051:
052: public void localMethodLongD(double ob1, double ob2) {
053: }
054:
055: // INVOKESPECIAL
056: private void privatelocalMethod() {
057: }
058:
059: private void privatelocalMethodLongO(Object ob1, Object ob2) {
060: }
061:
062: private void privatelocalMethodLongI(int ob1, int ob2) {
063: }
064:
065: private void privatelocalMethodLongL(long ob1, long ob2) {
066: }
067:
068: private void privatelocalMethodLongD(double ob1, double ob2) {
069: }
070:
071: // INVOKEINTERFACE
072: protected JoinPointTestInterface obInterface = new JoinPointTestClass();
073:
074: // SYNC INVOKEVIRTUAL
075: protected JoinPointTestClass obSync = new JoinPointTestClass();
076:
077: public int theField = 0;
078:
079: // GETFIELD
080: // In case of fullcode weaving the field that is accessed or modified has to be in a method
081: public void theFieldAccess(int runs) {
082: int n = 0;
083:
084: startChronometer();
085: for (int i = 0; i < RUNS; i++)
086: n = this .theField;
087: stopChronometer();
088: }
089:
090: // PUTFIELD
091: // In case of fullcode weaving the field that is accessed or modified has to be in a method
092: public void theFieldModification(int runs) {
093: startChronometer();
094: for (int i = 0; i < RUNS; i++)
095: this .theField = i;
096: stopChronometer();
097: }
098:
099: // INVOKEVIRTUAL
100: protected Method method;
101: protected Method methodLongO;
102: protected Method methodLongI;
103: protected Method methodLongL;
104: protected Method methodLongD;
105:
106: // SYNC INVOKEVIRTUAL
107: protected Method syncMethod;
108: protected Method syncMethodLongO;
109: protected Method syncMethodLongI;
110: protected Method syncMethodLongL;
111: protected Method syncMethodLongD;
112:
113: // INVOKEINTERFACE
114: protected Method interfaceMethod;
115: protected Method interfaceMethodLongO;
116: protected Method interfaceMethodLongI;
117: protected Method interfaceMethodLongL;
118: protected Method interfaceMethodLongD;
119:
120: // INVOKESTATIC
121: protected Method staticMethod;
122: protected Method staticMethodLongO;
123: protected Method staticMethodLongI;
124: protected Method staticMethodLongL;
125: protected Method staticMethodLongD;
126:
127: // INVOKESPECIAL
128: protected Method privateMethod;
129: protected Method privateMethodLongO;
130: protected Method privateMethodLongI;
131: protected Method privateMethodLongL;
132: protected Method privateMethodLongD;
133:
134: protected Field field;
135:
136: public class TestException extends Exception {
137: };
138:
139: public TestException exception = new TestException();
140:
141: /*
142: public static int fieldAccessCount;
143: public static int fieldModificationCount;
144: public static int methodEntryCount;
145: public static int methodExitCount;
146: public static int exceptionThrowCount;
147: public static int exceptionCatchCount;
148: */
149: public static int counter;
150:
151: public static class TestHook extends JoinPointHook {
152: /*
153: public void onFieldAccess(FieldAccessJoinPoint joinPoint) { fieldAccessCount++; }
154: public void onFieldModification(FieldModificationJoinPoint joinPoint) { fieldModificationCount++; }
155: public void onMethodEntry(MethodEntryJoinPoint joinPoint) { methodEntryCount++; }
156: public void onMethodExit(MethodExitJoinPoint joinPoint) { methodExitCount++; }
157: public void onExceptionThrow(ExceptionJoinPoint joinPoint) { exceptionThrowCount++; }
158: public void onExceptionCatch(ExceptionCatchJoinPoint joinPoint) { exceptionCatchCount++; }
159: public void onClassLoad(Class cls) {}
160: */
161: public void onFieldAccess(FieldAccessJoinPoint joinPoint) {
162: counter++;
163: }
164:
165: public void onFieldModification(
166: FieldModificationJoinPoint joinPoint) {
167: counter++;
168: }
169:
170: public void onMethodEntry(MethodEntryJoinPoint joinPoint) {
171: counter++;
172: }
173:
174: public void onMethodExit(MethodExitJoinPoint joinPoint) {
175: counter++;
176: }
177:
178: public void onExceptionThrow(ExceptionJoinPoint joinPoint) {
179: counter++;
180: }
181:
182: public void onExceptionCatch(ExceptionCatchJoinPoint joinPoint) {
183: counter++;
184: }
185:
186: public void onClassLoad(Class cls) {
187: }
188:
189: public void onConstructor(ConstructorJoinPoint joinPoint) {
190: }
191: }
192:
193: public JoinPointMeasurements1_aj(String name) {
194: super (name);
195: RANGE = new int[] { 100000000 };
196:
197: String proseParam = System.getProperty("useprose");
198: if (proseParam != null)
199: useProse = true;
200: }
201:
202: protected void setUp() throws Exception {
203: if (useProse) {
204: String providerName = System
205: .getProperty("ch.ethz.prose.JVMAIProvider");
206: Class providerClass = Class.forName(providerName);
207: Provider provider = (Provider) providerClass.newInstance();
208:
209: aspectInterface = provider.getAspectInterface();
210: aspectInterface.startup(null, true);
211:
212: hook = new TestHook();
213: aspectInterface.setJoinPointHook(hook);
214:
215: // INVOKEVIRTUAL
216: method = JoinPointMeasurements1_aj.class.getDeclaredMethod(
217: "localMethod", new Class[] {});
218: methodLongO = JoinPointMeasurements1_aj.class
219: .getDeclaredMethod("localMethodLongO", new Class[] {
220: Object.class, Object.class });
221: methodLongI = JoinPointMeasurements1_aj.class
222: .getDeclaredMethod("localMethodLongI", new Class[] {
223: Integer.TYPE, Integer.TYPE });
224: methodLongL = JoinPointMeasurements1_aj.class
225: .getDeclaredMethod("localMethodLongL", new Class[] {
226: Long.TYPE, Long.TYPE });
227: methodLongD = JoinPointMeasurements1_aj.class
228: .getDeclaredMethod("localMethodLongD", new Class[] {
229: Double.TYPE, Double.TYPE });
230:
231: // SYNC INVOKEVIRTUAL
232: syncMethod = JoinPointTestClass.class.getDeclaredMethod(
233: "syncMethodShort", new Class[] {});
234: syncMethodLongO = JoinPointTestClass.class
235: .getDeclaredMethod("syncMethodLongO", new Class[] {
236: Object.class, Object.class });
237: syncMethodLongI = JoinPointTestClass.class
238: .getDeclaredMethod("syncMethodLongI", new Class[] {
239: Integer.TYPE, Integer.TYPE });
240: syncMethodLongL = JoinPointTestClass.class
241: .getDeclaredMethod("syncMethodLongL", new Class[] {
242: Long.TYPE, Long.TYPE });
243: syncMethodLongD = JoinPointTestClass.class
244: .getDeclaredMethod("syncMethodLongD", new Class[] {
245: Double.TYPE, Double.TYPE });
246:
247: // INVOKEINTERFACE
248: interfaceMethod = JoinPointTestClass.class
249: .getDeclaredMethod("interfaceMethodShort",
250: new Class[] {});
251: interfaceMethodLongO = JoinPointTestClass.class
252: .getDeclaredMethod("interfaceMethodLongO",
253: new Class[] { Object.class, Object.class });
254: interfaceMethodLongI = JoinPointTestClass.class
255: .getDeclaredMethod("interfaceMethodLongI",
256: new Class[] { Integer.TYPE, Integer.TYPE });
257: interfaceMethodLongL = JoinPointTestClass.class
258: .getDeclaredMethod("interfaceMethodLongL",
259: new Class[] { Long.TYPE, Long.TYPE });
260: interfaceMethodLongD = JoinPointTestClass.class
261: .getDeclaredMethod("interfaceMethodLongD",
262: new Class[] { Double.TYPE, Double.TYPE });
263:
264: // INVOKESTATIC
265: staticMethod = JoinPointTestClass.class.getDeclaredMethod(
266: "staticMethodShort", new Class[] {});
267: staticMethodLongO = JoinPointTestClass.class
268: .getDeclaredMethod("staticMethodLongO",
269: new Class[] { Object.class, Object.class });
270: staticMethodLongI = JoinPointTestClass.class
271: .getDeclaredMethod("staticMethodLongI",
272: new Class[] { Integer.TYPE, Integer.TYPE });
273: staticMethodLongL = JoinPointTestClass.class
274: .getDeclaredMethod("staticMethodLongL",
275: new Class[] { Long.TYPE, Long.TYPE });
276: staticMethodLongD = JoinPointTestClass.class
277: .getDeclaredMethod("staticMethodLongD",
278: new Class[] { Double.TYPE, Double.TYPE });
279:
280: // INVOKESPECIAL
281: privateMethod = JoinPointMeasurements1_aj.class
282: .getDeclaredMethod("privatelocalMethod",
283: new Class[] {});
284: privateMethodLongO = JoinPointMeasurements1_aj.class
285: .getDeclaredMethod("privatelocalMethodLongO",
286: new Class[] { Object.class, Object.class });
287: privateMethodLongI = JoinPointMeasurements1_aj.class
288: .getDeclaredMethod("privatelocalMethodLongI",
289: new Class[] { Integer.TYPE, Integer.TYPE });
290: privateMethodLongL = JoinPointMeasurements1_aj.class
291: .getDeclaredMethod("privatelocalMethodLongL",
292: new Class[] { Long.TYPE, Long.TYPE });
293: privateMethodLongD = JoinPointMeasurements1_aj.class
294: .getDeclaredMethod("privatelocalMethodLongD",
295: new Class[] { Double.TYPE, Double.TYPE });
296:
297: field = JoinPointMeasurements1_aj.class
298: .getDeclaredField("theField");
299: }
300: /*
301: fieldAccessCount = 0;
302: fieldModificationCount = 0;
303: methodEntryCount = 0;
304: methodExitCount = 0;
305: exceptionThrowCount = 0;
306: exceptionCatchCount = 0;
307: */
308: counter = 0;
309: }
310:
311: protected void tearDown() {
312: if (useProse)
313: aspectInterface.teardown();
314: }
315:
316: //=====================================================
317:
318: // 1) INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
319: public void testVirtualMethod_no_jp_NoArg() {
320: startChronometer();
321: for (int i = 0; i < RUNS; i++)
322: localMethod();
323: stopChronometer();
324:
325: if (checkAssert)
326: assertEquals("Hook notifications", RUNS, counter);
327: }
328:
329: //=====================================================
330:
331: // 1) SYNC INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
332: public void testSyncVirtualMethod_no_jp_NoArg() {
333: startChronometer();
334: for (int i = 0; i < RUNS; i++)
335: obSync.syncMethodShort();
336: stopChronometer();
337:
338: if (checkAssert)
339: assertEquals("Hook notifications", RUNS, counter);
340: }
341:
342: //=====================================================
343:
344: // 1) INVOKEINTERFACE - no call to weaver because the joinpoint isn't activated
345: public void testInterfaceMethod_no_jp_NoArg() {
346: startChronometer();
347: for (int i = 0; i < RUNS; i++)
348: obInterface.interfaceMethodShort();
349: stopChronometer();
350:
351: if (checkAssert)
352: assertEquals("Hook notifications", RUNS, counter);
353: }
354:
355: //=====================================================
356:
357: // 1) INVOKESTATIC - no call to weaver because the joinpoint isn't activated
358: public void testStaticMethod_no_jp_NoArg() {
359: startChronometer();
360: for (int i = 0; i < RUNS; i++)
361: JoinPointTestClass.staticMethodShort();
362: stopChronometer();
363:
364: if (checkAssert)
365: assertEquals("Hook notifications", RUNS, counter);
366: }
367:
368: //=====================================================
369:
370: // 1) INVOKESPECIAL - no call to weaver because the joinpoint isn't activated
371: public void testSpecialMethod_no_jp_NoArg() {
372: startChronometer();
373: for (int i = 0; i < RUNS; i++)
374: privatelocalMethod();
375: stopChronometer();
376:
377: if (checkAssert)
378: assertEquals("Hook notifications", RUNS, counter);
379: }
380:
381: //=====================================================
382:
383: // 1) GETFIELD - no call to weaver because the joinpoint isn't activated
384: public void testFieldAccess_no_jp_NoArg() {
385: this .theFieldAccess(RUNS);
386:
387: // if(checkAssert) assertEquals("Hook notifications", RUNS, counter);
388: }
389:
390: //=====================================================
391:
392: // 1) PUTFIELD - no call to weaver because the joinpoint isn't activated
393: public void testFieldModification_no_jp_NoArg() {
394: this .theFieldModification(RUNS);
395:
396: // if(checkAssert) assertEquals("Hook notifications", RUNS, counter);
397: }
398:
399: //=====================================================
400:
401: public void exceptionThrow() throws TestException {
402: throw exception;
403: }
404:
405: public void exceptionCatch() {
406: try {
407: exceptionThrow();
408: } catch (TestException e) {
409: }
410: }
411:
412: //=====================================================
413: /*
414: // 1) THROW - no call to weaver because the joinpoint isn't activated
415: public void testExceptionThrow_no_jp_NoArg()
416: {
417: //RUNS = 1000000;
418: TestException e = new TestException();
419:
420: startChronometer();
421: for (int i = 0; i < RUNS; i++) exceptionCatch();
422: stopChronometer();
423: }
424: */
425: //=====================================================
426: // 1) CATCH - no call to weaver because the joinpoint isn't activated
427: public void testExceptionCatch_no_jp_NoArg() {
428: //RUNS = 1000000;
429: TestException e = new TestException();
430:
431: startChronometer();
432: for (int i = 0; i < RUNS; i++)
433: exceptionCatch();
434: stopChronometer();
435:
436: // if(checkAssert) assertEquals("Hook notifications", RUNS, counter);
437: }
438:
439: //=====================================================
440: //=====================================================
441: //=====================================================
442: //=====================================================
443: //=====================================================
444:
445: // Method arguments: (Object, Object)
446: //=====================================================
447:
448: // 1) INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
449: public void testVirtualMethod_LongO() {
450: Object obj = new Object();
451: startChronometer();
452: for (int i = 0; i < RUNS; i++)
453: localMethodLongO(obj, obj);
454: stopChronometer();
455:
456: if (checkAssert)
457: assertEquals("Hook notifications", RUNS, counter);
458: }
459:
460: //=====================================================
461:
462: // 1) SYNC INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
463: public void testSyncVirtualMethod_LongO() {
464: Object obj = new Object();
465: startChronometer();
466: for (int i = 0; i < RUNS; i++)
467: obSync.syncMethodLongO(obj, obj);
468: stopChronometer();
469:
470: if (checkAssert)
471: assertEquals("Hook notifications", RUNS, counter);
472: }
473:
474: //=====================================================
475:
476: // 1) INVOKEINTERFACE - no call to weaver because the joinpoint isn't activated
477: public void testInterfaceMethod_LongO() {
478: Object obj = new Object();
479: startChronometer();
480: for (int i = 0; i < RUNS; i++)
481: obInterface.interfaceMethodLongO(obj, obj);
482: stopChronometer();
483:
484: if (checkAssert)
485: assertEquals("Hook notifications", RUNS, counter);
486: }
487:
488: //=====================================================
489:
490: // 1) INVOKESTATIC - no call to weaver because the joinpoint isn't activated
491: public void testStaticMethod_LongO() {
492: Object obj = new Object();
493: startChronometer();
494: for (int i = 0; i < RUNS; i++)
495: JoinPointTestClass.staticMethodLongO(obj, obj);
496: stopChronometer();
497:
498: if (checkAssert)
499: assertEquals("Hook notifications", RUNS, counter);
500: }
501:
502: //=====================================================
503:
504: // 1) INVOKESPECIAL - no call to weaver because the joinpoint isn't activated
505: public void testSpecialMethod_LongO() {
506: Object obj = new Object();
507: startChronometer();
508: for (int i = 0; i < RUNS; i++)
509: privatelocalMethodLongO(obj, obj);
510: stopChronometer();
511:
512: if (checkAssert)
513: assertEquals("Hook notifications", RUNS, counter);
514: }
515:
516: //=====================================================
517: //=====================================================
518:
519: // Method arguments: (int, int)
520: //=====================================================
521:
522: // 1) INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
523: public void testVirtualMethod_LongI() {
524: int obj = 1;
525: startChronometer();
526: for (int i = 0; i < RUNS; i++)
527: localMethodLongI(obj, obj);
528: stopChronometer();
529:
530: if (checkAssert)
531: assertEquals("Hook notifications", RUNS, counter);
532: }
533:
534: //=====================================================
535:
536: // 1) SYNC INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
537: public void testSyncVirtualMethod_LongI() {
538: int obj = 1;
539: startChronometer();
540: for (int i = 0; i < RUNS; i++)
541: obSync.syncMethodLongI(obj, obj);
542: stopChronometer();
543:
544: if (checkAssert)
545: assertEquals("Hook notifications", RUNS, counter);
546: }
547:
548: //=====================================================
549:
550: // 1) INVOKEINTERFACE - no call to weaver because the joinpoint isn't activated
551: public void testInterfaceMethod_LongI() {
552: int obj = 1;
553: startChronometer();
554: for (int i = 0; i < RUNS; i++)
555: obInterface.interfaceMethodLongI(obj, obj);
556: stopChronometer();
557:
558: if (checkAssert)
559: assertEquals("Hook notifications", RUNS, counter);
560: }
561:
562: //=====================================================
563:
564: // 1) INVOKESTATIC - no call to weaver because the joinpoint isn't activated
565: public void testStaticMethod_LongI() {
566: int obj = 1;
567: startChronometer();
568: for (int i = 0; i < RUNS; i++)
569: JoinPointTestClass.staticMethodLongI(obj, obj);
570: stopChronometer();
571:
572: if (checkAssert)
573: assertEquals("Hook notifications", RUNS, counter);
574: }
575:
576: //=====================================================
577:
578: // 1) INVOKESPECIAL - no call to weaver because the joinpoint isn't activated
579: public void testSpecialMethod_LongI() {
580: int obj = 1;
581: startChronometer();
582: for (int i = 0; i < RUNS; i++)
583: privatelocalMethodLongI(obj, obj);
584: stopChronometer();
585:
586: if (checkAssert)
587: assertEquals("Hook notifications", RUNS, counter);
588: }
589:
590: //=====================================================
591: //=====================================================
592:
593: // Method arguments: (long, long)
594: //=====================================================
595:
596: // 1) INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
597: public void testVirtualMethod_LongL() {
598: long obj = 1;
599: startChronometer();
600: for (int i = 0; i < RUNS; i++)
601: localMethodLongL(obj, obj);
602: stopChronometer();
603:
604: if (checkAssert)
605: assertEquals("Hook notifications", RUNS, counter);
606: }
607:
608: //=====================================================
609:
610: // 1) SYNC INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
611: public void testSyncVirtualMethod_LongL() {
612: long obj = 1;
613: startChronometer();
614: for (int i = 0; i < RUNS; i++)
615: obSync.syncMethodLongL(obj, obj);
616: stopChronometer();
617:
618: if (checkAssert)
619: assertEquals("Hook notifications", RUNS, counter);
620: }
621:
622: //=====================================================
623:
624: // 1) INVOKEINTERFACE - no call to weaver because the joinpoint isn't activated
625: public void testInterfaceMethod_LongL() {
626: long obj = 1;
627: startChronometer();
628: for (int i = 0; i < RUNS; i++)
629: obInterface.interfaceMethodLongL(obj, obj);
630: stopChronometer();
631:
632: if (checkAssert)
633: assertEquals("Hook notifications", RUNS, counter);
634: }
635:
636: //=====================================================
637:
638: // 1) INVOKESTATIC - no call to weaver because the joinpoint isn't activated
639: public void testStaticMethod_LongL() {
640: long obj = 1;
641: startChronometer();
642: for (int i = 0; i < RUNS; i++)
643: JoinPointTestClass.staticMethodLongL(obj, obj);
644: stopChronometer();
645:
646: if (checkAssert)
647: assertEquals("Hook notifications", RUNS, counter);
648: }
649:
650: //=====================================================
651:
652: // 1) INVOKESPECIAL - no call to weaver because the joinpoint isn't activated
653: public void testSpecialMethod_LongL() {
654: long obj = 1;
655: startChronometer();
656: for (int i = 0; i < RUNS; i++)
657: privatelocalMethodLongL(obj, obj);
658: stopChronometer();
659:
660: if (checkAssert)
661: assertEquals("Hook notifications", RUNS, counter);
662: }
663:
664: //=====================================================
665: //=====================================================
666:
667: // Method arguments: (double, double)
668: //=====================================================
669:
670: // 1) INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
671: public void testVirtualMethod_LongD() {
672: double obj = 10.1;
673: startChronometer();
674: for (int i = 0; i < RUNS; i++)
675: localMethodLongD(obj, obj);
676: stopChronometer();
677:
678: if (checkAssert)
679: assertEquals("Hook notifications", RUNS, counter);
680: }
681:
682: //=====================================================
683:
684: // 1) SYNC INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
685: public void testSyncVirtualMethod_LongD() {
686: double obj = 10.1;
687: startChronometer();
688: for (int i = 0; i < RUNS; i++)
689: obSync.syncMethodLongD(obj, obj);
690: stopChronometer();
691:
692: if (checkAssert)
693: assertEquals("Hook notifications", RUNS, counter);
694: }
695:
696: //=====================================================
697:
698: // 1) INVOKEINTERFACE - no call to weaver because the joinpoint isn't activated
699: public void testInterfaceMethod_LongD() {
700: double obj = 10.1;
701: startChronometer();
702: for (int i = 0; i < RUNS; i++)
703: obInterface.interfaceMethodLongD(obj, obj);
704: stopChronometer();
705:
706: if (checkAssert)
707: assertEquals("Hook notifications", RUNS, counter);
708: }
709:
710: //=====================================================
711:
712: // 1) INVOKESTATIC - no call to weaver because the joinpoint isn't activated
713: public void testStaticMethod_LongD() {
714: double obj = 10.1;
715: startChronometer();
716: for (int i = 0; i < RUNS; i++)
717: JoinPointTestClass.staticMethodLongD(obj, obj);
718: stopChronometer();
719:
720: if (checkAssert)
721: assertEquals("Hook notifications", RUNS, counter);
722: }
723:
724: //=====================================================
725:
726: // 1) INVOKESPECIAL - no call to weaver because the joinpoint isn't activated
727: public void testSpecialMethod_LongD() {
728: double obj = 10.1;
729: startChronometer();
730: for (int i = 0; i < RUNS; i++)
731: privatelocalMethodLongD(obj, obj);
732: stopChronometer();
733:
734: if (checkAssert)
735: assertEquals("Hook notifications", RUNS, counter);
736: }
737:
738: //=====================================================
739: //=====================================================
740:
741: public static Test suite() {
742: return new PerformanceTestSuite(JoinPointMeasurements1_aj.class);
743: }
744:
745: }
|