KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > measurements > suites > JoinPointMeasurements1_micro


1 package measurements.suites;
2
3 import junit.framework.Test;
4 import junit.framework.Assert;
5 import ch.ethz.inf.util.junit.PerformanceTest;
6 import ch.ethz.inf.util.junit.PerformanceTestSuite;
7 import ch.ethz.prose.ProseSystem;
8 import ch.ethz.prose.DefaultAspect;
9 import ch.ethz.prose.Aspect;
10 import ch.ethz.prose.crosscut.Crosscut;
11 import ch.ethz.prose.crosscut.MethodCut;
12 import ch.ethz.prose.crosscut.REST;
13 import ch.ethz.prose.filter.PointCutter;
14 import ch.ethz.prose.filter.Executions;
15 import ch.ethz.prose.filter.Within;
16 import ch.ethz.jvmai.MethodEntryJoinPoint;
17 import ch.ethz.jvmai.MethodExitJoinPoint;
18
19
20
21 /**
22  * JoinPoint micro-measurements.
23  *
24  * Performance micro-measurements tests for method boundaries,
25  * fields accesses and modifications, exception handlers:
26  *
27  * 1) INVOKEVIRTUAL -> invoke a normal method
28  * 2) SYNC INVOKEVIRTUAL -> invoke a normal but synchronized method
29  * 3) INVOKEINTERFACE -> invoke a method through an interface
30  * 4) INVOKESPECIAL -> invoke a private method
31  * 5) INVOKESTATIC -> invoke a static method
32  * 6) GETFIELD -> used when a field has been read
33  * 7) PUTFIELD -> used when a field has been write
34  * 8) Exception Catch
35  * 9) Exception Throw
36  *
37  * Each test is executed "RUNS" times.
38  *
39  * @author Angela Nicoara
40  */

41 public class JoinPointMeasurements1_micro extends PerformanceTest {
42
43     public boolean useProse = false;
44     public boolean checkAssert = true;
45
46     public static int counter=0;
47
48     // INVOKEVIRTUAL
49
public void localMethod() { }
50     public void localMethodLongO(Object JavaDoc ob1, Object JavaDoc ob2) { }
51     public void localMethodLongI(int ob1, int ob2) { }
52     public void localMethodLongL(long ob1, long ob2) { }
53     public void localMethodLongD(double ob1, double ob2) { }
54
55     // INVOKESPECIAL
56
private void privatelocalMethod() { }
57     private void privatelocalMethodLongO(Object JavaDoc ob1, Object JavaDoc ob2) { }
58     private void privatelocalMethodLongI(int ob1, int ob2) { }
59     private void privatelocalMethodLongL(long ob1, long ob2) { }
60     private void privatelocalMethodLongD(double ob1, double ob2) { }
61     
62     // INVOKEINTERFACE
63
protected JoinPointTestInterface obInterface = new JoinPointTestClass();
64     
65     // SYNC INVOKEVIRTUAL
66
protected JoinPointTestClass obSync = new JoinPointTestClass();
67
68     
69     // METHOD ENTRY 1
70
public class MethodEntryAspect_1 extends DefaultAspect
71     {
72         public Crosscut c1 = new MethodCut()
73         {
74             // execute the advice 'before' the methods '^localMethod.*' and '^privatelocalMethod.*'
75
public void METHOD_ARGS(JoinPointMeasurements1_micro target, REST args)
76             {
77                 counter++;
78             }
79             
80             // .. && calls('^localMethod.*' and '^privatelocalMethod.*')
81
protected PointCutter pointCutter()
82             {
83                 return ( (Executions.before()) . AND
84                                (
85                                     ( (Within.method("^localMethod.*")) . AND (Within.type("JoinPointMeasurements1_micro")) ) . OR
86                                     ( (Within.method("^privatelocalMethod.*")) . AND (Within.type("JoinPointMeasurements1_micro")) )
87 /*
88                                     ( (Within.method("localMethod")) . AND (Within.type("JoinPointMeasurements1_micro")) ) . OR
89                                     ( (Within.method("localMethodLongO")) . AND (Within.type("JoinPointMeasurements1_micro")) ) . OR
90                                     ( (Within.method("localMethodLongI")) . AND (Within.type("JoinPointMeasurements1_micro")) ) . OR
91                                     ( (Within.method("localMethodLongL")) . AND (Within.type("JoinPointMeasurements1_micro")) ) . OR
92                                     ( (Within.method("localMethodLongD")) . AND (Within.type("JoinPointMeasurements1_micro")) ) . OR
93                                     ( (Within.method("privatelocalMethod")) . AND (Within.type("JoinPointMeasurements1_micro")) ) . OR
94                                     ( (Within.method("privatelocalMethodLongO")) . AND (Within.type("JoinPointMeasurements1_micro")) ) . OR
95                                     ( (Within.method("privatelocalMethodLongI")) . AND (Within.type("JoinPointMeasurements1_micro")) ) . OR
96                                     ( (Within.method("privatelocalMethodLongL")) . AND (Within.type("JoinPointMeasurements1_micro")) ) . OR
97                                     ( (Within.method("privatelocalMethodLongD")) . AND (Within.type("JoinPointMeasurements1_micro")) )
98 */

99                                )
100                 );
101             }
102         };
103     }
104
105     // METHOD EXIT 1
106
public class MethodExitAspect_1 extends DefaultAspect
107     {
108         public Crosscut c2 = new MethodCut()
109         {
110             // execute the advice 'after' the method '^localMethod.*' and '^privatelocalMethod.*'
111
public void METHOD_ARGS(JoinPointMeasurements1_micro target, REST args)
112             {
113                 counter++;
114             }
115
116             // .. && calls('^localMethod.*' and '^privatelocalMethod.*')
117
protected PointCutter pointCutter()
118             {
119                 return ( (Executions.after()) . AND
120                                (
121                                     ( (Within.method("^localMethod.*")) . AND (Within.type("JoinPointMeasurements1_micro")) ) . OR
122                                     ( (Within.method("^privatelocalMethod.*")) . AND (Within.type("JoinPointMeasurements1_micro")) )
123 /*
124                                     ( (Within.method("localMethod")) . AND (Within.type("JoinPointMeasurements1_micro")) ) . OR
125                                     ( (Within.method("localMethodLongO")) . AND (Within.type("JoinPointMeasurements1_micro")) ) . OR
126                                     ( (Within.method("localMethodLongI")) . AND (Within.type("JoinPointMeasurements1_micro")) ) . OR
127                                     ( (Within.method("localMethodLongL")) . AND (Within.type("JoinPointMeasurements1_micro")) ) . OR
128                                     ( (Within.method("localMethodLongD")) . AND (Within.type("JoinPointMeasurements1_micro")) ) . OR
129                                     ( (Within.method("privatelocalMethod")) . AND (Within.type("JoinPointMeasurements1_micro")) ) . OR
130                                     ( (Within.method("privatelocalMethodLongO")) . AND (Within.type("JoinPointMeasurements1_micro")) ) . OR
131                                     ( (Within.method("privatelocalMethodLongI")) . AND (Within.type("JoinPointMeasurements1_micro")) ) . OR
132                                     ( (Within.method("privatelocalMethodLongL")) . AND (Within.type("JoinPointMeasurements1_micro")) ) . OR
133                                     ( (Within.method("privatelocalMethodLongD")) . AND (Within.type("JoinPointMeasurements1_micro")) )
134 */

135                                )
136                 );
137             }
138         };
139     }
140     
141     // METHOD ENTRY 2
142
public class MethodEntryAspect_2 extends DefaultAspect
143     {
144         public Crosscut c3 = new MethodCut()
145         {
146             // execute the advice 'before' the methods '^interfaceMethod.*' and '^syncMethod.*' and '^staticMethod.*'
147
public void METHOD_ARGS(JoinPointTestClass target, REST args)
148             {
149                 counter++;
150             }
151
152             // .. && calls('^interfaceMethod.*' and '^syncMethod.*' and '^staticMethod.*')
153
protected PointCutter pointCutter()
154             {
155                 return ( (Executions.before()) . AND
156                             (
157                                 ( (Within.method("^interfaceMethod.*")) . AND (Within.type("JoinPointTestClass")) ) . OR
158                                 ( (Within.method("^syncMethod.*")) . AND (Within.type("JoinPointTestClass")) ) . OR
159                                 ( (Within.method("^staticMethod.*")) . AND (Within.type("JoinPointTestClass")) )
160                             )
161                 );
162             }
163         };
164     }
165
166     // METHOD EXIT 2
167
public class MethodExitAspect_2 extends DefaultAspect
168     {
169         public Crosscut c4 = new MethodCut()
170         {
171             // execute the advice 'after' the methods '^interfaceMethod.*' and '^syncMethod.*' and '^staticMethod.*'
172
public void METHOD_ARGS(JoinPointTestClass target, REST args)
173             {
174                 counter++;
175             }
176
177             // .. && calls('^interfaceMethod.*' and '^syncMethod.*' and '^staticMethod.*')
178
protected PointCutter pointCutter()
179             {
180                 return ( (Executions.after()) . AND
181                             (
182                                 ( (Within.method("^interfaceMethod.*")) . AND (Within.type("JoinPointTestClass")) ) . OR
183                                 ( (Within.method("^syncMethod.*")) . AND (Within.type("JoinPointTestClass")) ) . OR
184                                 ( (Within.method("^staticMethod.*")) . AND (Within.type("JoinPointTestClass")) )
185                             )
186                 );
187             }
188         };
189     }
190     
191     Aspect aspect1; // METHOD ENTRY 1
192
Aspect aspect2; // METHOD EXIT 1
193
Aspect aspect3; // METHOD ENTRY 2
194
Aspect aspect4; // METHOD EXIT 2
195

196     
197     public JoinPointMeasurements1_micro(String JavaDoc name) {
198         super(name);
199         //RANGE = new int[] { 100000000 };
200
//RANGE = new int[] { 1000000 };
201
RANGE = new int[] { 10000 };
202         //RANGE = new int[] { 1 };
203

204         String JavaDoc proseParam = System.getProperty("useprose");
205         if (proseParam != null) useProse = true;
206     }
207
208     protected void setUp() throws Exception JavaDoc
209     {
210         
211         if (!useProse) return;
212
213         try {
214             ProseSystem.startup();
215         } catch (Exception JavaDoc e) {
216             Assert.fail("ProseSystem.startup() failed");
217         }
218         
219         aspect1 = new MethodEntryAspect_1();
220         aspect2 = new MethodExitAspect_1();
221         aspect3 = new MethodEntryAspect_2();
222         aspect4 = new MethodExitAspect_2();
223         
224         counter=0;
225     }
226     
227     protected void tearDown()
228     {
229         if (!useProse) return;
230
231         try {
232             ProseSystem.teardown();
233         } catch (Exception JavaDoc e) {
234             Assert.fail("ProseSystem.teardown() failed");
235         }
236     }
237
238     //=====================================================
239
/*
240     // 1) INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
241     public void testVirtualMethod_no_jp_NoArg()
242     {
243         startChronometer();
244         for (int i = 0; i < RUNS; i++) localMethod();
245         stopChronometer();
246     }
247 */

248     // 3) INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
249
public void testVirtualMethodEntry_jp_activated_NoArg()
250     {
251         if (useProse) ProseSystem.getAspectManager().insert(aspect1);
252
253         startChronometer();
254         for (int i = 0; i < RUNS; i++) localMethod();
255         stopChronometer();
256         
257         if (useProse) ProseSystem.getAspectManager().withdraw(aspect1);
258
259         if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
260     }
261     
262     // 3) INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
263
public void testVirtualMethodExit_jp_activated_NoArg()
264     {
265         if (useProse) ProseSystem.getAspectManager().insert(aspect2);
266         
267         startChronometer();
268         for (int i = 0; i < RUNS; i++) localMethod();
269         stopChronometer();
270         
271         if (useProse) ProseSystem.getAspectManager().withdraw(aspect2);
272         
273         if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
274     }
275
276     //=====================================================
277
/*
278     // 1) SYNC INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
279     public void testSyncVirtualMethod_no_jp_NoArg()
280     {
281         startChronometer();
282         for (int i = 0; i < RUNS; i++) obSync.syncMethodShort();
283         stopChronometer();
284     }
285 */

286     // 3) SYNC INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
287
public void testSyncVirtualMethodEntry_jp_activated_NoArg()
288     {
289         if (useProse) ProseSystem.getAspectManager().insert(aspect3);
290         
291         startChronometer();
292         for (int i = 0; i < RUNS; i++) obSync.syncMethodShort();
293         stopChronometer();
294         
295         if (useProse) ProseSystem.getAspectManager().withdraw(aspect3);
296         
297         if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
298     }
299     
300     // 3) SYNC INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
301
public void testSyncVirtualMethodExit_jp_activated_NoArg()
302     {
303         if (useProse) ProseSystem.getAspectManager().insert(aspect4);
304         
305         startChronometer();
306         for (int i = 0; i < RUNS; i++) obSync.syncMethodShort();
307         stopChronometer();
308         
309         if (useProse) ProseSystem.getAspectManager().withdraw(aspect4);
310         
311         if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
312     }
313     
314     //=====================================================
315
/*
316     // 1) INVOKEINTERFACE - no call to weaver because the joinpoint isn't activated
317     public void testInterfaceMethod_no_jp_NoArg()
318     {
319         startChronometer();
320         for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodShort();
321         stopChronometer();
322     }
323 */

324     // 3) INVOKEINTERFACE - call to empty weaver because of on active, unlocked joinpoint
325
public void testInterfaceMethodEntry_jp_activated_NoArg()
326     {
327         if (useProse) ProseSystem.getAspectManager().insert(aspect3);
328         
329         startChronometer();
330         for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodShort();
331         stopChronometer();
332         
333         if (useProse) ProseSystem.getAspectManager().withdraw(aspect3);
334         
335         if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
336     }
337     
338     // 3) INVOKEINTERFACE - call to empty weaver because of on active, unlocked joinpoint
339
public void testInterfaceMethodExit_jp_activated_NoArg()
340     {
341         if (useProse) ProseSystem.getAspectManager().insert(aspect4);
342         
343         startChronometer();
344         for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodShort();
345         stopChronometer();
346         
347         if (useProse) ProseSystem.getAspectManager().withdraw(aspect4);
348         
349         if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
350     }
351     
352     //=====================================================
353
/*
354     // 1) INVOKESTATIC - no call to weaver because the joinpoint isn't activated
355     public void testStaticMethod_no_jp_NoArg()
356     {
357         startChronometer();
358         for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodShort();
359         stopChronometer();
360     }
361 */

362     // 3) INVOKESTATIC - call to empty weaver because of on active, unlocked joinpoint
363
public void testStaticMethodEntry_jp_activated_NoArg()
364     {
365         if (useProse) ProseSystem.getAspectManager().insert(aspect3);
366         
367         startChronometer();
368         for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodShort();
369         stopChronometer();
370         
371         if (useProse) ProseSystem.getAspectManager().withdraw(aspect3);
372         
373         if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
374     }
375
376     // 3) INVOKESTATIC - call to empty weaver because of on active, unlocked joinpoint
377
public void testStaticMethodExit_jp_activated_NoArg()
378     {
379         if (useProse) ProseSystem.getAspectManager().insert(aspect4);
380         
381         startChronometer();
382         for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodShort();
383         stopChronometer();
384         
385         if (useProse) ProseSystem.getAspectManager().withdraw(aspect4);
386         
387         if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
388     }
389     
390     //=====================================================
391
/*
392     // 1) INVOKESPECIAL - no call to weaver because the joinpoint isn't activated
393     public void testSpecialMethod_no_jp_NoArg()
394     {
395         startChronometer();
396         for (int i = 0; i < RUNS; i++) privatelocalMethod();
397         stopChronometer();
398     }
399 */

400     // 3) INVOKESPECIAL - call to empty weaver because of on active, unlocked joinpoint
401
public void testSpecialMethodEntry_jp_activated_NoArg()
402     {
403         if (useProse) ProseSystem.getAspectManager().insert(aspect1);
404         
405         startChronometer();
406         for (int i = 0; i < RUNS; i++) privatelocalMethod();
407         stopChronometer();
408         
409         if (useProse) ProseSystem.getAspectManager().withdraw(aspect1);
410         
411         if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
412     }
413     
414     // 3) INVOKESPECIAL - call to empty weaver because of on active, unlocked joinpoint
415
public void testSpecialMethodExit_jp_activated_NoArg()
416     {
417         if (useProse) ProseSystem.getAspectManager().insert(aspect2);
418         
419         startChronometer();
420         for (int i = 0; i < RUNS; i++) privatelocalMethod();
421         stopChronometer();
422         
423         if (useProse) ProseSystem.getAspectManager().withdraw(aspect2);
424         
425         if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
426     }
427     
428     //=====================================================
429
//=====================================================
430
//=====================================================
431
//=====================================================
432
//=====================================================
433

434     // Method arguments: (Object, Object)
435
//=====================================================
436
/*
437     // 1) INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
438     public void testVirtualMethod_LongO()
439     {
440         Object obj = new Object();
441         startChronometer();
442         for (int i = 0; i < RUNS; i++) localMethodLongO(obj, obj);
443         stopChronometer();
444     }
445 */

446     // 3) INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
447
public void testVirtualMethodEntry_jp_activated_LongO()
448     {
449         Object JavaDoc obj = new Object JavaDoc();
450
451         if (useProse) ProseSystem.getAspectManager().insert(aspect1);
452         
453         startChronometer();
454         for (int i = 0; i < RUNS; i++) localMethodLongO(obj, obj);
455         stopChronometer();
456         
457         if (useProse) ProseSystem.getAspectManager().withdraw(aspect1);
458         
459         if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
460     }
461     
462     // 3) INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
463
public void testVirtualMethodExit_jp_activated_LongO()
464     {
465         Object JavaDoc obj = new Object JavaDoc();
466
467         if (useProse) ProseSystem.getAspectManager().insert(aspect2);
468         
469         startChronometer();
470         for (int i = 0; i < RUNS; i++) localMethodLongO(obj, obj);
471         stopChronometer();
472         
473         if (useProse) ProseSystem.getAspectManager().withdraw(aspect2);
474         
475         if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
476     }
477
478     //=====================================================
479
/*
480     // 1) SYNC INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
481     public void testSyncVirtualMethod_LongO()
482     {
483         Object obj = new Object();
484         startChronometer();
485         for (int i = 0; i < RUNS; i++) obSync.syncMethodLongO(obj, obj);
486         stopChronometer();
487     }
488 */

489     // 3) SYNC INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
490
public void testSyncVirtualMethodEntry_jp_activated_LongO()
491     {
492         Object JavaDoc obj = new Object JavaDoc();
493
494         if (useProse) ProseSystem.getAspectManager().insert(aspect3);
495         
496         startChronometer();
497         for (int i = 0; i < RUNS; i++) obSync.syncMethodLongO(obj, obj);
498         stopChronometer();
499         
500         if (useProse) ProseSystem.getAspectManager().withdraw(aspect3);
501         
502         if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
503     }
504     
505     // 3) SYNC INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
506
public void testSyncVirtualMethodExit_jp_activated_LongO()
507     {
508         Object JavaDoc obj = new Object JavaDoc();
509         
510         if (useProse) ProseSystem.getAspectManager().insert(aspect4);
511
512         startChronometer();
513         for (int i = 0; i < RUNS; i++) obSync.syncMethodLongO(obj, obj);
514         stopChronometer();
515         
516         if (useProse) ProseSystem.getAspectManager().withdraw(aspect4);
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_LongO()
525     {
526         Object obj = new Object();
527         startChronometer();
528         for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodLongO(obj, obj);
529         stopChronometer();
530     }
531 */

532     // 3) INVOKEINTERFACE - call to empty weaver because of on active, unlocked joinpoint
533
public void testInterfaceMethodEntry_jp_activated_LongO()
534     {
535         Object JavaDoc obj = new Object JavaDoc();
536         
537         if (useProse) ProseSystem.getAspectManager().insert(aspect3);
538         
539         startChronometer();
540         for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodLongO(obj, obj);
541         stopChronometer();
542         
543         if (useProse) ProseSystem.getAspectManager().withdraw(aspect3);
544         
545         if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
546     }
547     
548     // 3) INVOKEINTERFACE - call to empty weaver because of on active, unlocked joinpoint
549
public void testInterfaceMethodExit_jp_activated_LongO()
550     {
551         Object JavaDoc obj = new Object JavaDoc();
552         
553         if (useProse) ProseSystem.getAspectManager().insert(aspect4);
554
555         startChronometer();
556         for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodLongO(obj, obj);
557         stopChronometer();
558         
559         if (useProse) ProseSystem.getAspectManager().withdraw(aspect4);
560         
561         if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
562     }
563     
564     //=====================================================
565
/*
566     // 1) INVOKESTATIC - no call to weaver because the joinpoint isn't activated
567     public void testStaticMethod_LongO()
568     {
569         Object obj = new Object();
570         startChronometer();
571         for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodLongO(obj, obj);
572         stopChronometer();
573     }
574 */

575     // 3) INVOKESTATIC - call to empty weaver because of on active, unlocked joinpoint
576
public void testStaticMethodEntry_jp_activated_LongO()
577     {
578         Object JavaDoc obj = new Object JavaDoc();
579         
580         if (useProse) ProseSystem.getAspectManager().insert(aspect3);
581
582         startChronometer();
583         for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodLongO(obj, obj);
584         stopChronometer();
585         
586         if (useProse) ProseSystem.getAspectManager().withdraw(aspect3);
587         
588         if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
589     }
590
591     // 3) INVOKESTATIC - call to empty weaver because of on active, unlocked joinpoint
592
public void testStaticMethodExit_jp_activated_LongO()
593     {
594         Object JavaDoc obj = new Object JavaDoc();
595         
596         if (useProse) ProseSystem.getAspectManager().insert(aspect4);
597
598         startChronometer();
599         for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodLongO(obj, obj);
600         stopChronometer();
601         
602         if (useProse) ProseSystem.getAspectManager().withdraw(aspect4);
603         
604         if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
605     }
606     
607     //=====================================================
608
/*
609     // 1) INVOKESPECIAL - no call to weaver because the joinpoint isn't activated
610     public void testSpecialMethod_LongO()
611     {
612         Object obj = new Object();
613         startChronometer();
614         for (int i = 0; i < RUNS; i++) privatelocalMethodLongO(obj, obj);
615         stopChronometer();
616     }
617 */

618     // 3) INVOKESPECIAL - call to empty weaver because of on active, unlocked joinpoint
619
public void testSpecialMethodEntry_jp_activated_LongO()
620     {
621         Object JavaDoc obj = new Object JavaDoc();
622         
623         if (useProse) ProseSystem.getAspectManager().insert(aspect1);
624
625         startChronometer();
626         for (int i = 0; i < RUNS; i++) privatelocalMethodLongO(obj, obj);
627         stopChronometer();
628         
629         if (useProse) ProseSystem.getAspectManager().withdraw(aspect1);
630         
631         if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
632     }
633     
634     // 3) INVOKESPECIAL - call to empty weaver because of on active, unlocked joinpoint
635
public void testSpecialMethodExit_jp_activated_LongO()
636     {
637         Object JavaDoc obj = new Object JavaDoc();
638         
639         if (useProse) ProseSystem.getAspectManager().insert(aspect2);
640
641         startChronometer();
642         for (int i = 0; i < RUNS; i++) privatelocalMethodLongO(obj, obj);
643         stopChronometer();
644         
645         if (useProse) ProseSystem.getAspectManager().withdraw(aspect2);
646         
647         if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
648     }
649     
650     //=====================================================
651
//=====================================================
652

653     
654     // Method arguments: (int, int)
655
//=====================================================
656
/*
657     // 1) INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
658     public void testVirtualMethod_LongI()
659     {
660         int obj = 1;
661         startChronometer();
662         for (int i = 0; i < RUNS; i++) localMethodLongI(obj, obj);
663         stopChronometer();
664     }
665 */

666     // 3) INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
667
public void testVirtualMethodEntry_jp_activated_LongI()
668     {
669         int obj = 1;
670         
671         if (useProse) ProseSystem.getAspectManager().insert(aspect1);
672
673         startChronometer();
674         for (int i = 0; i < RUNS; i++) localMethodLongI(obj, obj);
675         stopChronometer();
676         
677         if (useProse) ProseSystem.getAspectManager().withdraw(aspect1);
678         
679         if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
680     }
681     
682     // 3) INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
683
public void testVirtualMethodExit_jp_activated_LongI()
684     {
685         int obj = 1;
686         
687         if (useProse) ProseSystem.getAspectManager().insert(aspect2);
688
689         startChronometer();
690         for (int i = 0; i < RUNS; i++) localMethodLongI(obj, obj);
691         stopChronometer();
692         
693         if (useProse) ProseSystem.getAspectManager().withdraw(aspect2);
694         
695         if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
696     }
697     
698     //=====================================================
699
/*
700     // 1) SYNC INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
701     public void testSyncVirtualMethod_LongI()
702     {
703         int obj = 1;
704         startChronometer();
705         for (int i = 0; i < RUNS; i++) obSync.syncMethodLongI(obj, obj);
706         stopChronometer();
707     }
708 */

709     // 3) SYNC INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
710
public void testSyncVirtualMethodEntry_jp_activated_LongI()
711     {
712         int obj = 1;
713         
714         if (useProse) ProseSystem.getAspectManager().insert(aspect3);
715
716         startChronometer();
717         for (int i = 0; i < RUNS; i++) obSync.syncMethodLongI(obj, obj);
718         stopChronometer();
719         
720         if (useProse) ProseSystem.getAspectManager().withdraw(aspect3);
721         
722         if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
723     }
724     
725     // 3) SYNC INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
726
public void testSyncVirtualMethodExit_jp_activated_LongI()
727     {
728         int obj = 1;
729         
730         if (useProse) ProseSystem.getAspectManager().insert(aspect4);
731
732         startChronometer();
733         for (int i = 0; i < RUNS; i++) obSync.syncMethodLongI(obj, obj);
734         stopChronometer();
735         
736         if (useProse) ProseSystem.getAspectManager().withdraw(aspect4);
737         
738         if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
739     }
740     
741     //=====================================================
742
/*
743     // 1) INVOKEINTERFACE - no call to weaver because the joinpoint isn't activated
744     public void testInterfaceMethod_LongI()
745     {
746         int obj = 1;
747         startChronometer();
748         for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodLongI(obj, obj);
749         stopChronometer();
750     }
751 */

752     // 3) INVOKEINTERFACE - call to empty weaver because of on active, unlocked joinpoint
753
public void testInterfaceMethodEntry_jp_activated_LongI()
754     {
755         int obj = 1;
756         
757         if (useProse) ProseSystem.getAspectManager().insert(aspect3);
758
759         startChronometer();
760         for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodLongI(obj, obj);
761         stopChronometer();
762         
763         if (useProse) ProseSystem.getAspectManager().withdraw(aspect3);
764         
765         if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
766     }
767     
768     // 3) INVOKEINTERFACE - call to empty weaver because of on active, unlocked joinpoint
769
public void testInterfaceMethodExit_jp_activated_LongI()
770     {
771         int obj = 1;
772         
773         if (useProse) ProseSystem.getAspectManager().insert(aspect4);
774
775         startChronometer();
776         for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodLongI(obj, obj);
777         stopChronometer();
778         
779         if (useProse) ProseSystem.getAspectManager().withdraw(aspect4);
780         
781         if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
782     }
783     
784     //=====================================================
785
/*
786     // 1) INVOKESTATIC - no call to weaver because the joinpoint isn't activated
787     public void testStaticMethod_LongI()
788     {
789         int obj = 1;
790         startChronometer();
791         for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodLongI(obj, obj);
792         stopChronometer();
793     }
794 */

795     // 3) INVOKESTATIC - call to empty weaver because of on active, unlocked joinpoint
796
public void testStaticMethodEntry_jp_activated_LongI()
797     {
798         int obj = 1;
799         
800         if (useProse) ProseSystem.getAspectManager().insert(aspect3);
801
802         startChronometer();
803         for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodLongI(obj, obj);
804         stopChronometer();
805         
806         if (useProse) ProseSystem.getAspectManager().withdraw(aspect3);
807         
808         if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
809     }
810
811     // 3) INVOKESTATIC - call to empty weaver because of on active, unlocked joinpoint
812
public void testStaticMethodExit_jp_activated_LongI()
813     {
814         int obj = 1;
815         
816         if (useProse) ProseSystem.getAspectManager().insert(aspect4);
817
818         startChronometer();
819         for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodLongI(obj, obj);
820         stopChronometer();
821         
822         if (useProse) ProseSystem.getAspectManager().withdraw(aspect4);
823         
824         if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
825     }
826     
827     //=====================================================
828
/*
829     // 1) INVOKESPECIAL - no call to weaver because the joinpoint isn't activated
830     public void testSpecialMethod_LongI()
831     {
832         int obj = 1;
833         startChronometer();
834         for (int i = 0; i < RUNS; i++) privatelocalMethodLongI(obj, obj);
835         stopChronometer();
836     }
837 */

838     // 3) INVOKESPECIAL - call to empty weaver because of on active, unlocked joinpoint
839
public void testSpecialMethodEntry_jp_activated_LongI()
840     {
841         int obj = 1;
842
843         if (useProse) ProseSystem.getAspectManager().insert(aspect1);
844         
845         startChronometer();
846         for (int i = 0; i < RUNS; i++) privatelocalMethodLongI(obj, obj);
847         stopChronometer();
848         
849         if (useProse) ProseSystem.getAspectManager().withdraw(aspect1);
850         
851         if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
852     }
853     
854     // 3) INVOKESPECIAL - call to empty weaver because of on active, unlocked joinpoint
855
public void testSpecialMethodExit_jp_activated_LongI()
856     {
857         int obj = 1;
858
859         if (useProse) ProseSystem.getAspectManager().insert(aspect2);
860         
861         startChronometer();
862         for (int i = 0; i < RUNS; i++) privatelocalMethodLongI(obj, obj);
863         stopChronometer();
864         
865         if (useProse) ProseSystem.getAspectManager().withdraw(aspect2);
866         
867         if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
868     }
869     
870     //=====================================================
871
//=====================================================
872

873     
874     // Method arguments: (long, long)
875
//=====================================================
876
/*
877     // 1) INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
878     public void testVirtualMethod_LongL()
879     {
880         long obj = 1;
881         startChronometer();
882         for (int i = 0; i < RUNS; i++) localMethodLongL(obj, obj);
883         stopChronometer();
884     }
885 */

886     // 3) INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
887
public void testVirtualMethodEntry_jp_activated_LongL()
888     {
889         long obj = 1;
890         
891         if (useProse) ProseSystem.getAspectManager().insert(aspect1);
892
893         startChronometer();
894         for (int i = 0; i < RUNS; i++) localMethodLongL(obj, obj);
895         stopChronometer();
896         
897         if (useProse) ProseSystem.getAspectManager().withdraw(aspect1);
898         
899         if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
900     }
901     
902     // 3) INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
903
public void testVirtualMethodExit_jp_activated_LongL()
904     {
905         long obj = 1;
906         
907         if (useProse) ProseSystem.getAspectManager().insert(aspect2);
908
909         startChronometer();
910         for (int i = 0; i < RUNS; i++) localMethodLongL(obj, obj);
911         stopChronometer();
912         
913         if (useProse) ProseSystem.getAspectManager().withdraw(aspect2);
914         
915         if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
916     }
917     
918     //=====================================================
919
/*
920     // 1) SYNC INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
921     public void testSyncVirtualMethod_LongL()
922     {
923         long obj = 1;
924         startChronometer();
925         for (int i = 0; i < RUNS; i++) obSync.syncMethodLongL(obj, obj);
926         stopChronometer();
927     }
928 */

929     // 3) SYNC INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
930
public void testSyncVirtualMethodEntry_jp_activated_LongL()
931     {
932         long obj = 1;
933         
934         if (useProse) ProseSystem.getAspectManager().insert(aspect3);
935
936         startChronometer();
937         for (int i = 0; i < RUNS; i++) obSync.syncMethodLongL(obj, obj);
938         stopChronometer();
939         
940         if (useProse) ProseSystem.getAspectManager().withdraw(aspect3);
941         
942         if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
943     }
944     
945     // 3) SYNC INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
946
public void testSyncVirtualMethodExit_jp_activated_LongL()
947     {
948         long obj = 1;
949         
950         if (useProse) ProseSystem.getAspectManager().insert(aspect4);
951
952         startChronometer();
953         for (int i = 0; i < RUNS; i++) obSync.syncMethodLongL(obj, obj);
954         stopChronometer();
955         
956         if (useProse) ProseSystem.getAspectManager().withdraw(aspect4);
957         
958         if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
959     }
960     
961     //=====================================================
962
/*
963     // 1) INVOKEINTERFACE - no call to weaver because the joinpoint isn't activated
964     public void testInterfaceMethod_LongL()
965     {
966         long obj = 1;
967         startChronometer();
968         for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodLongL(obj, obj);
969         stopChronometer();
970     }
971 */

972     // 3) INVOKEINTERFACE - call to empty weaver because of on active, unlocked joinpoint
973
public void testInterfaceMethodEntry_jp_activated_LongL()
974     {
975         long obj = 1;
976         
977         if (useProse) ProseSystem.getAspectManager().insert(aspect3);
978
979         startChronometer();
980         for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodLongL(obj, obj);
981         stopChronometer();
982         
983         if (useProse) ProseSystem.getAspectManager().withdraw(aspect3);
984         
985         if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
986     }
987     
988     // 3) INVOKEINTERFACE - call to empty weaver because of on active, unlocked joinpoint
989
public void testInterfaceMethodExit_jp_activated_LongL()
990     {
991         long obj = 1;
992         
993         if (useProse) ProseSystem.getAspectManager().insert(aspect4);
994
995         startChronometer();
996         for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodLongL(obj, obj);
997         stopChronometer();
998         
999         if (useProse) ProseSystem.getAspectManager().withdraw(aspect4);
1000        
1001        if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
1002    }
1003    
1004    //=====================================================
1005
/*
1006    // 1) INVOKESTATIC - no call to weaver because the joinpoint isn't activated
1007    public void testStaticMethod_LongL()
1008    {
1009        long obj = 1;
1010        startChronometer();
1011        for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodLongL(obj, obj);
1012        stopChronometer();
1013    }
1014*/

1015    // 3) INVOKESTATIC - call to empty weaver because of on active, unlocked joinpoint
1016
public void testStaticMethodEntry_jp_activated_LongL()
1017    {
1018        long obj = 1;
1019
1020        if (useProse) ProseSystem.getAspectManager().insert(aspect3);
1021        
1022        startChronometer();
1023        for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodLongL(obj, obj);
1024        stopChronometer();
1025        
1026        if (useProse) ProseSystem.getAspectManager().withdraw(aspect3);
1027        
1028        if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
1029    }
1030
1031    // 3) INVOKESTATIC - call to empty weaver because of on active, unlocked joinpoint
1032
public void testStaticMethodExit_jp_activated_LongL()
1033    {
1034        long obj = 1;
1035        
1036        if (useProse) ProseSystem.getAspectManager().insert(aspect4);
1037
1038        startChronometer();
1039        for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodLongL(obj, obj);
1040        stopChronometer();
1041        
1042        if (useProse) ProseSystem.getAspectManager().withdraw(aspect4);
1043        
1044        if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
1045    }
1046    
1047    //=====================================================
1048
/*
1049    // 1) INVOKESPECIAL - no call to weaver because the joinpoint isn't activated
1050    public void testSpecialMethod_LongL()
1051    {
1052        long obj = 1;
1053        startChronometer();
1054        for (int i = 0; i < RUNS; i++) privatelocalMethodLongL(obj, obj);
1055        stopChronometer();
1056    }
1057*/

1058    // 3) INVOKESPECIAL - call to empty weaver because of on active, unlocked joinpoint
1059
public void testSpecialMethodEntry_jp_activated_LongL()
1060    {
1061        long obj = 1;
1062        
1063        if (useProse) ProseSystem.getAspectManager().insert(aspect1);
1064
1065        startChronometer();
1066        for (int i = 0; i < RUNS; i++) privatelocalMethodLongL(obj, obj);
1067        stopChronometer();
1068        
1069        if (useProse) ProseSystem.getAspectManager().withdraw(aspect1);
1070        
1071        if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
1072    }
1073    
1074    // 3) INVOKESPECIAL - call to empty weaver because of on active, unlocked joinpoint
1075
public void testSpecialMethodExit_jp_activated_LongL()
1076    {
1077        long obj = 1;
1078        
1079        if (useProse) ProseSystem.getAspectManager().insert(aspect2);
1080
1081        startChronometer();
1082        for (int i = 0; i < RUNS; i++) privatelocalMethodLongL(obj, obj);
1083        stopChronometer();
1084        
1085        if (useProse) ProseSystem.getAspectManager().withdraw(aspect2);
1086        
1087        if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
1088    }
1089    
1090    //=====================================================
1091
//=====================================================
1092

1093
1094    // Method arguments: (double, double)
1095
//=====================================================
1096
/*
1097    // 1) INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
1098    public void testVirtualMethod_LongD()
1099    {
1100        double obj = 10.1;
1101        startChronometer();
1102        for (int i = 0; i < RUNS; i++) localMethodLongD(obj, obj);
1103        stopChronometer();
1104    }
1105*/

1106    // 3) INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
1107
public void testVirtualMethodEntry_jp_activated_LongD()
1108    {
1109        double obj = 10.1;
1110        
1111        if (useProse) ProseSystem.getAspectManager().insert(aspect1);
1112
1113        startChronometer();
1114        for (int i = 0; i < RUNS; i++) localMethodLongD(obj, obj);
1115        stopChronometer();
1116        
1117        if (useProse) ProseSystem.getAspectManager().withdraw(aspect1);
1118        
1119        if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
1120    }
1121    
1122    // 3) INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
1123
public void testVirtualMethodExit_jp_activated_LongD()
1124    {
1125        double obj = 10.1;
1126        
1127        if (useProse) ProseSystem.getAspectManager().insert(aspect2);
1128
1129        startChronometer();
1130        for (int i = 0; i < RUNS; i++) localMethodLongD(obj, obj);
1131        stopChronometer();
1132        
1133        if (useProse) ProseSystem.getAspectManager().withdraw(aspect2);
1134        
1135        if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
1136    }
1137
1138    
1139    //=====================================================
1140
/*
1141    // 1) SYNC INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
1142    public void testSyncVirtualMethod_LongD()
1143    {
1144        double obj = 10.1;
1145        startChronometer();
1146        for (int i = 0; i < RUNS; i++) obSync.syncMethodLongD(obj, obj);
1147        stopChronometer();
1148    }
1149*/

1150    // 3) SYNC INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
1151
public void testSyncVirtualMethodEntry_jp_activated_LongD()
1152    {
1153        double obj = 10.1;
1154        
1155        if (useProse) ProseSystem.getAspectManager().insert(aspect3);
1156
1157        startChronometer();
1158        for (int i = 0; i < RUNS; i++) obSync.syncMethodLongD(obj, obj);
1159        stopChronometer();
1160        
1161        if (useProse) ProseSystem.getAspectManager().withdraw(aspect3);
1162        
1163        if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
1164    }
1165    
1166    // 3) SYNC INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
1167
public void testSyncVirtualMethodExit_jp_activated_LongD()
1168    {
1169        double obj = 10.1;
1170        
1171        if (useProse) ProseSystem.getAspectManager().insert(aspect4);
1172
1173        startChronometer();
1174        for (int i = 0; i < RUNS; i++) obSync.syncMethodLongD(obj, obj);
1175        stopChronometer();
1176        
1177        if (useProse) ProseSystem.getAspectManager().withdraw(aspect4);
1178        
1179        if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
1180    }
1181    
1182    //=====================================================
1183
/*
1184    // 1) INVOKEINTERFACE - no call to weaver because the joinpoint isn't activated
1185    public void testInterfaceMethod_LongD()
1186    {
1187        double obj = 10.1;
1188        startChronometer();
1189        for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodLongD(obj, obj);
1190        stopChronometer();
1191    }
1192*/

1193    // 3) INVOKEINTERFACE - call to empty weaver because of on active, unlocked joinpoint
1194
public void testInterfaceMethodEntry_jp_activated_LongD()
1195    {
1196        double obj = 10.1;
1197
1198        if (useProse) ProseSystem.getAspectManager().insert(aspect3);
1199        
1200        startChronometer();
1201        for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodLongD(obj, obj);
1202        stopChronometer();
1203        
1204        if (useProse) ProseSystem.getAspectManager().withdraw(aspect3);
1205        
1206        if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
1207    }
1208    
1209    // 3) INVOKEINTERFACE - call to empty weaver because of on active, unlocked joinpoint
1210
public void testInterfaceMethodExit_jp_activated_LongD()
1211    {
1212        double obj = 10.1;
1213        
1214        if (useProse) ProseSystem.getAspectManager().insert(aspect4);
1215
1216        startChronometer();
1217        for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodLongD(obj, obj);
1218        stopChronometer();
1219        
1220        if (useProse) ProseSystem.getAspectManager().withdraw(aspect4);
1221        
1222        if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
1223    }
1224    
1225    //=====================================================
1226
/*
1227    // 1) INVOKESTATIC - no call to weaver because the joinpoint isn't activated
1228    public void testStaticMethod_LongD()
1229    {
1230        double obj = 10.1;
1231        startChronometer();
1232        for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodLongD(obj, obj);
1233        stopChronometer();
1234    }
1235*/

1236    // 3) INVOKESTATIC - call to empty weaver because of on active, unlocked joinpoint
1237
public void testStaticMethodEntry_jp_activated_LongD()
1238    {
1239        double obj = 10.1;
1240        
1241        if (useProse) ProseSystem.getAspectManager().insert(aspect3);
1242
1243        startChronometer();
1244        for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodLongD(obj, obj);
1245        stopChronometer();
1246        
1247        if (useProse) ProseSystem.getAspectManager().withdraw(aspect3);
1248        
1249        if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
1250    }
1251
1252    // 3) INVOKESTATIC - call to empty weaver because of on active, unlocked joinpoint
1253
public void testStaticMethodExit_jp_activated_LongD()
1254    {
1255        double obj = 10.1;
1256        
1257        if (useProse) ProseSystem.getAspectManager().insert(aspect4);
1258
1259        startChronometer();
1260        for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodLongD(obj, obj);
1261        stopChronometer();
1262        
1263        if (useProse) ProseSystem.getAspectManager().withdraw(aspect4);
1264        
1265        if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
1266    }
1267    
1268    //=====================================================
1269
/*
1270    // 1) INVOKESPECIAL - no call to weaver because the joinpoint isn't activated
1271    public void testSpecialMethod_LongD()
1272    {
1273        double obj = 10.1;
1274        startChronometer();
1275        for (int i = 0; i < RUNS; i++) privatelocalMethodLongD(obj, obj);
1276        stopChronometer();
1277    }
1278*/

1279    // 3) INVOKESPECIAL - call to empty weaver because of on active, unlocked joinpoint
1280
public void testSpecialMethodEntry_jp_activated_LongD()
1281    {
1282        double obj = 10.1;
1283        
1284        if (useProse) ProseSystem.getAspectManager().insert(aspect1);
1285
1286        startChronometer();
1287        for (int i = 0; i < RUNS; i++) privatelocalMethodLongD(obj, obj);
1288        stopChronometer();
1289        
1290        if (useProse) ProseSystem.getAspectManager().withdraw(aspect1);
1291        
1292        if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
1293    }
1294    
1295    // 3) INVOKESPECIAL - call to empty weaver because of on active, unlocked joinpoint
1296
public void testSpecialMethodExit_jp_activated_LongD()
1297    {
1298        double obj = 10.1;
1299        
1300        if (useProse) ProseSystem.getAspectManager().insert(aspect2);
1301
1302        startChronometer();
1303        for (int i = 0; i < RUNS; i++) privatelocalMethodLongD(obj, obj);
1304        stopChronometer();
1305        
1306        if (useProse) ProseSystem.getAspectManager().withdraw(aspect2);
1307        
1308        if (checkAssert) assertEquals("Hook notifications", RUNS, counter);
1309    }
1310    
1311    //=====================================================
1312
//=====================================================
1313

1314  public static Test suite() {
1315    return new PerformanceTestSuite(JoinPointMeasurements1_micro.class);
1316  }
1317  
1318}
Popular Tags