KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > measurements > suites > JoinPointMeasurements1_aj


1 package measurements.suites;
2
3 import java.lang.reflect.Field JavaDoc;
4 import java.lang.reflect.Method JavaDoc;
5
6 import junit.framework.Test;
7 import ch.ethz.inf.util.junit.PerformanceTest;
8 import ch.ethz.inf.util.junit.PerformanceTestSuite;
9 import ch.ethz.jvmai.*;
10
11 /**
12  * JoinPoint micro-measurements.
13  *
14  * Performance micro-measurements tests for method boundaries,
15  * fields accesses and modifications, exception handlers:
16  *
17  * 1) INVOKEVIRTUAL -> invoke a normal method
18  * 2) SYNC INVOKEVIRTUAL -> invoke a normal but synchronized method
19  * 3) INVOKEINTERFACE -> invoke a method through an interface
20  * 4) INVOKESPECIAL -> invoke a private method
21  * 5) INVOKESTATIC -> invoke a static method
22  * 6) GETFIELD -> used when a field has been read
23  * 7) PUTFIELD -> used when a field has been write
24  * 8) Exception Catch
25  * 9) Exception Throw
26  *
27  * Each test is executed "RUNS" times.
28  *
29  * @author Angela Nicoara
30  */

31 public class JoinPointMeasurements1_aj extends PerformanceTest {
32
33     public boolean useProse = false;
34     public boolean checkAssert = true;
35
36     protected JVMAspectInterface aspectInterface;
37     protected TestHook hook;
38
39     // INVOKEVIRTUAL
40
public void localMethod() { }
41     public void localMethodLongO(Object JavaDoc ob1, Object JavaDoc ob2) { }
42     public void localMethodLongI(int ob1, int ob2) { }
43     public void localMethodLongL(long ob1, long ob2) { }
44     public void localMethodLongD(double ob1, double ob2) { }
45
46     // INVOKESPECIAL
47
private void privatelocalMethod() { }
48     private void privatelocalMethodLongO(Object JavaDoc ob1, Object JavaDoc ob2) { }
49     private void privatelocalMethodLongI(int ob1, int ob2) { }
50     private void privatelocalMethodLongL(long ob1, long ob2) { }
51     private void privatelocalMethodLongD(double ob1, double ob2) { }
52     
53     // INVOKEINTERFACE
54
protected JoinPointTestInterface obInterface = new JoinPointTestClass();
55     
56     // SYNC INVOKEVIRTUAL
57
protected JoinPointTestClass obSync = new JoinPointTestClass();
58     
59     public int theField = 0;
60     
61     // GETFIELD
62
// In case of fullcode weaving the field that is accessed or modified has to be in a method
63
public void theFieldAccess(int runs)
64     {
65         int n = 0;
66
67         startChronometer();
68         for (int i = 0; i < RUNS; i++) n = this.theField;
69         stopChronometer();
70     }
71     
72     // PUTFIELD
73
// In case of fullcode weaving the field that is accessed or modified has to be in a method
74
public void theFieldModification(int runs)
75     {
76         startChronometer();
77         for (int i = 0; i < RUNS; i++) this.theField = i;
78         stopChronometer();
79     }
80
81     // INVOKEVIRTUAL
82
protected Method JavaDoc method;
83     protected Method JavaDoc methodLongO;
84     protected Method JavaDoc methodLongI;
85     protected Method JavaDoc methodLongL;
86     protected Method JavaDoc methodLongD;
87
88     // SYNC INVOKEVIRTUAL
89
protected Method JavaDoc syncMethod;
90     protected Method JavaDoc syncMethodLongO;
91     protected Method JavaDoc syncMethodLongI;
92     protected Method JavaDoc syncMethodLongL;
93     protected Method JavaDoc syncMethodLongD;
94     
95     // INVOKEINTERFACE
96
protected Method JavaDoc interfaceMethod;
97     protected Method JavaDoc interfaceMethodLongO;
98     protected Method JavaDoc interfaceMethodLongI;
99     protected Method JavaDoc interfaceMethodLongL;
100     protected Method JavaDoc interfaceMethodLongD;
101     
102     // INVOKESTATIC
103
protected Method JavaDoc staticMethod;
104     protected Method JavaDoc staticMethodLongO;
105     protected Method JavaDoc staticMethodLongI;
106     protected Method JavaDoc staticMethodLongL;
107     protected Method JavaDoc staticMethodLongD;
108
109     // INVOKESPECIAL
110
protected Method JavaDoc privateMethod;
111     protected Method JavaDoc privateMethodLongO;
112     protected Method JavaDoc privateMethodLongI;
113     protected Method JavaDoc privateMethodLongL;
114     protected Method JavaDoc privateMethodLongD;
115     
116     protected Field JavaDoc field;
117     
118     public class TestException extends Exception JavaDoc {};
119     public TestException exception = new TestException();
120
121 /*
122     public static int fieldAccessCount;
123     public static int fieldModificationCount;
124     public static int methodEntryCount;
125     public static int methodExitCount;
126     public static int exceptionThrowCount;
127     public static int exceptionCatchCount;
128 */

129     public static int counter;
130
131         
132     public static class TestHook extends JoinPointHook
133     {
134 /*
135         public void onFieldAccess(FieldAccessJoinPoint joinPoint) { fieldAccessCount++; }
136         public void onFieldModification(FieldModificationJoinPoint joinPoint) { fieldModificationCount++; }
137         public void onMethodEntry(MethodEntryJoinPoint joinPoint) { methodEntryCount++; }
138         public void onMethodExit(MethodExitJoinPoint joinPoint) { methodExitCount++; }
139         public void onExceptionThrow(ExceptionJoinPoint joinPoint) { exceptionThrowCount++; }
140         public void onExceptionCatch(ExceptionCatchJoinPoint joinPoint) { exceptionCatchCount++; }
141         public void onClassLoad(Class cls) {}
142 */

143         public void onFieldAccess(FieldAccessJoinPoint joinPoint) { counter++; }
144         public void onFieldModification(FieldModificationJoinPoint joinPoint) { counter++; }
145         public void onMethodEntry(MethodEntryJoinPoint joinPoint) { counter++; }
146         public void onMethodExit(MethodExitJoinPoint joinPoint) { counter++; }
147         public void onExceptionThrow(ExceptionJoinPoint joinPoint) { counter++; }
148         public void onExceptionCatch(ExceptionCatchJoinPoint joinPoint) { counter++; }
149         public void onClassLoad(Class JavaDoc cls) {}
150     }
151     
152     public JoinPointMeasurements1_aj(String JavaDoc name) {
153         super(name);
154         RANGE = new int[] { 100000000 };
155         
156         String JavaDoc proseParam = System.getProperty("useprose");
157         if (proseParam != null) useProse = true;
158     }
159
160     protected void setUp() throws Exception JavaDoc
161     {
162         if (useProse)
163         {
164             String JavaDoc providerName = System.getProperty("ch.ethz.prose.JVMAIProvider");
165             Class JavaDoc providerClass = Class.forName(providerName);
166             Provider provider = (Provider) providerClass.newInstance();
167
168             aspectInterface = provider.getAspectInterface();
169             aspectInterface.startup(null, true);
170
171             hook = new TestHook();
172             aspectInterface.setJoinPointHook(hook);
173
174             // INVOKEVIRTUAL
175
method = JoinPointMeasurements1_aj.class.getDeclaredMethod("localMethod", new Class JavaDoc[] {});
176             methodLongO = JoinPointMeasurements1_aj.class.getDeclaredMethod("localMethodLongO", new Class JavaDoc[] {Object JavaDoc.class, Object JavaDoc.class});
177             methodLongI = JoinPointMeasurements1_aj.class.getDeclaredMethod("localMethodLongI", new Class JavaDoc[] {Integer.TYPE, Integer.TYPE});
178             methodLongL = JoinPointMeasurements1_aj.class.getDeclaredMethod("localMethodLongL", new Class JavaDoc[] {Long.TYPE, Long.TYPE});
179             methodLongD = JoinPointMeasurements1_aj.class.getDeclaredMethod("localMethodLongD", new Class JavaDoc[] {Double.TYPE, Double.TYPE});
180
181             // SYNC INVOKEVIRTUAL
182
syncMethod = JoinPointTestClass.class.getDeclaredMethod("syncMethodShort", new Class JavaDoc[] {});
183             syncMethodLongO = JoinPointTestClass.class.getDeclaredMethod("syncMethodLongO", new Class JavaDoc[] {Object JavaDoc.class, Object JavaDoc.class});
184             syncMethodLongI = JoinPointTestClass.class.getDeclaredMethod("syncMethodLongI", new Class JavaDoc[] {Integer.TYPE, Integer.TYPE});
185             syncMethodLongL = JoinPointTestClass.class.getDeclaredMethod("syncMethodLongL", new Class JavaDoc[] {Long.TYPE, Long.TYPE});
186             syncMethodLongD = JoinPointTestClass.class.getDeclaredMethod("syncMethodLongD", new Class JavaDoc[] {Double.TYPE, Double.TYPE});
187             
188             // INVOKEINTERFACE
189
interfaceMethod = JoinPointTestClass.class.getDeclaredMethod("interfaceMethodShort", new Class JavaDoc[] {});
190             interfaceMethodLongO = JoinPointTestClass.class.getDeclaredMethod("interfaceMethodLongO", new Class JavaDoc[] {Object JavaDoc.class, Object JavaDoc.class});
191             interfaceMethodLongI = JoinPointTestClass.class.getDeclaredMethod("interfaceMethodLongI", new Class JavaDoc[] {Integer.TYPE, Integer.TYPE});
192             interfaceMethodLongL = JoinPointTestClass.class.getDeclaredMethod("interfaceMethodLongL", new Class JavaDoc[] {Long.TYPE, Long.TYPE});
193             interfaceMethodLongD = JoinPointTestClass.class.getDeclaredMethod("interfaceMethodLongD", new Class JavaDoc[] {Double.TYPE, Double.TYPE});
194
195             // INVOKESTATIC
196
staticMethod = JoinPointTestClass.class.getDeclaredMethod("staticMethodShort", new Class JavaDoc[] {});
197             staticMethodLongO = JoinPointTestClass.class.getDeclaredMethod("staticMethodLongO", new Class JavaDoc[] {Object JavaDoc.class, Object JavaDoc.class});
198             staticMethodLongI = JoinPointTestClass.class.getDeclaredMethod("staticMethodLongI", new Class JavaDoc[] {Integer.TYPE, Integer.TYPE});
199             staticMethodLongL = JoinPointTestClass.class.getDeclaredMethod("staticMethodLongL", new Class JavaDoc[] {Long.TYPE, Long.TYPE});
200             staticMethodLongD = JoinPointTestClass.class.getDeclaredMethod("staticMethodLongD", new Class JavaDoc[] {Double.TYPE, Double.TYPE});
201             
202             // INVOKESPECIAL
203
privateMethod = JoinPointMeasurements1_aj.class.getDeclaredMethod("privatelocalMethod", new Class JavaDoc[] {});
204             privateMethodLongO = JoinPointMeasurements1_aj.class.getDeclaredMethod("privatelocalMethodLongO", new Class JavaDoc[] {Object JavaDoc.class, Object JavaDoc.class});
205             privateMethodLongI = JoinPointMeasurements1_aj.class.getDeclaredMethod("privatelocalMethodLongI", new Class JavaDoc[] {Integer.TYPE, Integer.TYPE});
206             privateMethodLongL = JoinPointMeasurements1_aj.class.getDeclaredMethod("privatelocalMethodLongL", new Class JavaDoc[] {Long.TYPE, Long.TYPE});
207             privateMethodLongD = JoinPointMeasurements1_aj.class.getDeclaredMethod("privatelocalMethodLongD", new Class JavaDoc[] {Double.TYPE, Double.TYPE});
208
209             field = JoinPointMeasurements1_aj.class.getDeclaredField("theField");
210         }
211 /*
212         fieldAccessCount = 0;
213         fieldModificationCount = 0;
214         methodEntryCount = 0;
215         methodExitCount = 0;
216         exceptionThrowCount = 0;
217         exceptionCatchCount = 0;
218 */

219         counter = 0;
220     }
221     
222     protected void tearDown()
223     {
224         if (useProse) aspectInterface.teardown();
225     }
226
227     //=====================================================
228

229     // 1) INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
230
public void testVirtualMethod_no_jp_NoArg()
231     {
232         startChronometer();
233         for (int i = 0; i < RUNS; i++) localMethod();
234         stopChronometer();
235     
236     if(checkAssert) assertEquals("Hook notifications", RUNS, counter);
237     }
238     
239     //=====================================================
240

241     // 1) SYNC INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
242
public void testSyncVirtualMethod_no_jp_NoArg()
243     {
244         startChronometer();
245         for (int i = 0; i < RUNS; i++) obSync.syncMethodShort();
246         stopChronometer();
247
248     if(checkAssert) assertEquals("Hook notifications", RUNS, counter);
249     }
250     
251     //=====================================================
252

253     // 1) INVOKEINTERFACE - no call to weaver because the joinpoint isn't activated
254
public void testInterfaceMethod_no_jp_NoArg()
255     {
256         startChronometer();
257         for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodShort();
258         stopChronometer();
259
260     if(checkAssert) assertEquals("Hook notifications", RUNS, counter);
261     }
262     
263     //=====================================================
264

265     // 1) INVOKESTATIC - no call to weaver because the joinpoint isn't activated
266
public void testStaticMethod_no_jp_NoArg()
267     {
268         startChronometer();
269         for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodShort();
270         stopChronometer();
271
272     if(checkAssert) assertEquals("Hook notifications", RUNS, counter);
273     }
274     
275     //=====================================================
276

277     // 1) INVOKESPECIAL - no call to weaver because the joinpoint isn't activated
278
public void testSpecialMethod_no_jp_NoArg()
279     {
280         startChronometer();
281         for (int i = 0; i < RUNS; i++) privatelocalMethod();
282         stopChronometer();
283
284     if(checkAssert) assertEquals("Hook notifications", RUNS, counter);
285     }
286     
287     //=====================================================
288

289     // 1) GETFIELD - no call to weaver because the joinpoint isn't activated
290
public void testFieldAccess_no_jp_NoArg()
291     {
292         this.theFieldAccess(RUNS);
293
294 // if(checkAssert) assertEquals("Hook notifications", RUNS, counter);
295
}
296     
297     //=====================================================
298

299     // 1) PUTFIELD - no call to weaver because the joinpoint isn't activated
300
public void testFieldModification_no_jp_NoArg()
301     {
302         this.theFieldModification(RUNS);
303
304 // if(checkAssert) assertEquals("Hook notifications", RUNS, counter);
305
}
306     
307     //=====================================================
308

309     public void exceptionThrow() throws TestException {
310         throw exception;
311     }
312
313     public void exceptionCatch() {
314         try {
315             exceptionThrow();
316         } catch (TestException e) {}
317     }
318
319     //=====================================================
320
/*
321     // 1) THROW - no call to weaver because the joinpoint isn't activated
322     public void testExceptionThrow_no_jp_NoArg()
323     {
324         //RUNS = 1000000;
325         TestException e = new TestException();
326
327         startChronometer();
328         for (int i = 0; i < RUNS; i++) exceptionCatch();
329         stopChronometer();
330     }
331 */

332     //=====================================================
333

334     // 1) CATCH - no call to weaver because the joinpoint isn't activated
335
public void testExceptionCatch_no_jp_NoArg()
336     {
337         //RUNS = 1000000;
338
TestException e = new TestException();
339
340         startChronometer();
341         for (int i = 0; i < RUNS; i++) exceptionCatch();
342         stopChronometer();
343
344 // if(checkAssert) assertEquals("Hook notifications", RUNS, counter);
345
}
346     
347     
348     //=====================================================
349
//=====================================================
350
//=====================================================
351
//=====================================================
352
//=====================================================
353

354     // Method arguments: (Object, Object)
355
//=====================================================
356

357     // 1) INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
358
public void testVirtualMethod_LongO()
359     {
360         Object JavaDoc obj = new Object JavaDoc();
361         startChronometer();
362         for (int i = 0; i < RUNS; i++) localMethodLongO(obj, obj);
363         stopChronometer();
364
365     if(checkAssert) assertEquals("Hook notifications", RUNS, counter);
366     }
367
368     //=====================================================
369

370     // 1) SYNC INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
371
public void testSyncVirtualMethod_LongO()
372     {
373         Object JavaDoc obj = new Object JavaDoc();
374         startChronometer();
375         for (int i = 0; i < RUNS; i++) obSync.syncMethodLongO(obj, obj);
376         stopChronometer();
377
378     if(checkAssert) assertEquals("Hook notifications", RUNS, counter);
379     }
380
381     //=====================================================
382

383     // 1) INVOKEINTERFACE - no call to weaver because the joinpoint isn't activated
384
public void testInterfaceMethod_LongO()
385     {
386         Object JavaDoc obj = new Object JavaDoc();
387         startChronometer();
388         for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodLongO(obj, obj);
389         stopChronometer();
390
391     if(checkAssert) assertEquals("Hook notifications", RUNS, counter);
392     }
393
394     //=====================================================
395

396     // 1) INVOKESTATIC - no call to weaver because the joinpoint isn't activated
397
public void testStaticMethod_LongO()
398     {
399         Object JavaDoc obj = new Object JavaDoc();
400         startChronometer();
401         for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodLongO(obj, obj);
402         stopChronometer();
403
404     if(checkAssert) assertEquals("Hook notifications", RUNS, counter);
405     }
406
407     //=====================================================
408

409     // 1) INVOKESPECIAL - no call to weaver because the joinpoint isn't activated
410
public void testSpecialMethod_LongO()
411     {
412         Object JavaDoc obj = new Object JavaDoc();
413         startChronometer();
414         for (int i = 0; i < RUNS; i++) privatelocalMethodLongO(obj, obj);
415         stopChronometer();
416
417     if(checkAssert) assertEquals("Hook notifications", RUNS, counter);
418     }
419
420     //=====================================================
421
//=====================================================
422

423     
424     // Method arguments: (int, int)
425
//=====================================================
426

427     // 1) INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
428
public void testVirtualMethod_LongI()
429     {
430         int obj = 1;
431         startChronometer();
432         for (int i = 0; i < RUNS; i++) localMethodLongI(obj, obj);
433         stopChronometer();
434
435     if(checkAssert) assertEquals("Hook notifications", RUNS, counter);
436     }
437
438     //=====================================================
439

440     // 1) SYNC INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
441
public void testSyncVirtualMethod_LongI()
442     {
443         int obj = 1;
444         startChronometer();
445         for (int i = 0; i < RUNS; i++) obSync.syncMethodLongI(obj, obj);
446         stopChronometer();
447
448     if(checkAssert) assertEquals("Hook notifications", RUNS, counter);
449     }
450
451     //=====================================================
452

453     // 1) INVOKEINTERFACE - no call to weaver because the joinpoint isn't activated
454
public void testInterfaceMethod_LongI()
455     {
456         int obj = 1;
457         startChronometer();
458         for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodLongI(obj, obj);
459         stopChronometer();
460
461     if(checkAssert) assertEquals("Hook notifications", RUNS, counter);
462     }
463
464     //=====================================================
465

466     // 1) INVOKESTATIC - no call to weaver because the joinpoint isn't activated
467
public void testStaticMethod_LongI()
468     {
469         int obj = 1;
470         startChronometer();
471         for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodLongI(obj, obj);
472         stopChronometer();
473
474     if(checkAssert) assertEquals("Hook notifications", RUNS, counter);
475     }
476
477     //=====================================================
478

479     // 1) INVOKESPECIAL - no call to weaver because the joinpoint isn't activated
480
public void testSpecialMethod_LongI()
481     {
482         int obj = 1;
483         startChronometer();
484         for (int i = 0; i < RUNS; i++) privatelocalMethodLongI(obj, obj);
485         stopChronometer();
486
487     if(checkAssert) assertEquals("Hook notifications", RUNS, counter);
488     }
489
490     //=====================================================
491
//=====================================================
492

493     
494     // Method arguments: (long, long)
495
//=====================================================
496

497     // 1) INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
498
public void testVirtualMethod_LongL()
499     {
500         long obj = 1;
501         startChronometer();
502         for (int i = 0; i < RUNS; i++) localMethodLongL(obj, obj);
503         stopChronometer();
504
505     if(checkAssert) assertEquals("Hook notifications", RUNS, counter);
506     }
507
508     //=====================================================
509

510     // 1) SYNC INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
511
public void testSyncVirtualMethod_LongL()
512     {
513         long obj = 1;
514         startChronometer();
515         for (int i = 0; i < RUNS; i++) obSync.syncMethodLongL(obj, obj);
516         stopChronometer();
517
518     if(checkAssert) assertEquals("Hook notifications", RUNS, counter);
519     }
520
521     //=====================================================
522

523     // 1) INVOKEINTERFACE - no call to weaver because the joinpoint isn't activated
524
public void testInterfaceMethod_LongL()
525     {
526         long obj = 1;
527         startChronometer();
528         for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodLongL(obj, obj);
529         stopChronometer();
530
531     if(checkAssert) assertEquals("Hook notifications", RUNS, counter);
532     }
533
534     //=====================================================
535

536     // 1) INVOKESTATIC - no call to weaver because the joinpoint isn't activated
537
public void testStaticMethod_LongL()
538     {
539         long obj = 1;
540         startChronometer();
541         for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodLongL(obj, obj);
542         stopChronometer();
543
544     if(checkAssert) assertEquals("Hook notifications", RUNS, counter);
545     }
546
547     //=====================================================
548

549     // 1) INVOKESPECIAL - no call to weaver because the joinpoint isn't activated
550
public void testSpecialMethod_LongL()
551     {
552         long obj = 1;
553         startChronometer();
554         for (int i = 0; i < RUNS; i++) privatelocalMethodLongL(obj, obj);
555         stopChronometer();
556
557     if(checkAssert) assertEquals("Hook notifications", RUNS, counter);
558     }
559
560     //=====================================================
561
//=====================================================
562

563
564     // Method arguments: (double, double)
565
//=====================================================
566

567     // 1) INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
568
public void testVirtualMethod_LongD()
569     {
570         double obj = 10.1;
571         startChronometer();
572         for (int i = 0; i < RUNS; i++) localMethodLongD(obj, obj);
573         stopChronometer();
574
575     if(checkAssert) assertEquals("Hook notifications", RUNS, counter);
576     }
577
578     //=====================================================
579

580     // 1) SYNC INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
581
public void testSyncVirtualMethod_LongD()
582     {
583         double obj = 10.1;
584         startChronometer();
585         for (int i = 0; i < RUNS; i++) obSync.syncMethodLongD(obj, obj);
586         stopChronometer();
587
588     if(checkAssert) assertEquals("Hook notifications", RUNS, counter);
589     }
590
591     //=====================================================
592

593     // 1) INVOKEINTERFACE - no call to weaver because the joinpoint isn't activated
594
public void testInterfaceMethod_LongD()
595     {
596         double obj = 10.1;
597         startChronometer();
598         for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodLongD(obj, obj);
599         stopChronometer();
600
601     if(checkAssert) assertEquals("Hook notifications", RUNS, counter);
602     }
603
604     //=====================================================
605

606     // 1) INVOKESTATIC - no call to weaver because the joinpoint isn't activated
607
public void testStaticMethod_LongD()
608     {
609         double obj = 10.1;
610         startChronometer();
611         for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodLongD(obj, obj);
612         stopChronometer();
613
614     if(checkAssert) assertEquals("Hook notifications", RUNS, counter);
615     }
616
617     //=====================================================
618

619     // 1) INVOKESPECIAL - no call to weaver because the joinpoint isn't activated
620
public void testSpecialMethod_LongD()
621     {
622         double obj = 10.1;
623         startChronometer();
624         for (int i = 0; i < RUNS; i++) privatelocalMethodLongD(obj, obj);
625         stopChronometer();
626
627     if(checkAssert) assertEquals("Hook notifications", RUNS, counter);
628     }
629     
630     //=====================================================
631
//=====================================================
632

633   public static Test suite() {
634     return new PerformanceTestSuite(JoinPointMeasurements1_aj.class);
635   }
636   
637 }
Popular Tags