Source Code Cross Referenced for JoinPointMeasurements1_micro.java in  » Byte-Code » PROSE » measurements » suites » Java Source Code / Java DocumentationJava Source Code and Java Documentation

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


0001:        package measurements.suites;
0002:
0003:        import junit.framework.Test;
0004:        import junit.framework.Assert;
0005:        import ch.ethz.inf.util.junit.PerformanceTest;
0006:        import ch.ethz.inf.util.junit.PerformanceTestSuite;
0007:        import ch.ethz.prose.ProseSystem;
0008:        import ch.ethz.prose.DefaultAspect;
0009:        import ch.ethz.prose.Aspect;
0010:        import ch.ethz.prose.crosscut.Crosscut;
0011:        import ch.ethz.prose.crosscut.MethodCut;
0012:        import ch.ethz.prose.crosscut.REST;
0013:        import ch.ethz.prose.filter.PointCutter;
0014:        import ch.ethz.prose.filter.Executions;
0015:        import ch.ethz.prose.filter.Within;
0016:        import ch.ethz.jvmai.MethodEntryJoinPoint;
0017:        import ch.ethz.jvmai.MethodExitJoinPoint;
0018:
0019:        /**
0020:         * JoinPoint micro-measurements.
0021:         * 
0022:         * Performance micro-measurements tests for method boundaries, 
0023:         * fields accesses and modifications, exception handlers:
0024:         * 
0025:         * 1) INVOKEVIRTUAL -> invoke a normal method
0026:         * 2) SYNC INVOKEVIRTUAL -> invoke a normal but synchronized method
0027:         * 3) INVOKEINTERFACE -> invoke a method through an interface
0028:         * 4) INVOKESPECIAL -> invoke a private method
0029:         * 5) INVOKESTATIC -> invoke a static method 
0030:         * 6) GETFIELD -> used when a field has been read
0031:         * 7) PUTFIELD -> used when a field has been write
0032:         * 8) Exception Catch
0033:         * 9) Exception Throw
0034:         * 
0035:         * Each test is executed "RUNS" times.
0036:         * 
0037:         * @author Angela Nicoara
0038:         */
0039:        public class JoinPointMeasurements1_micro extends PerformanceTest {
0040:
0041:            public boolean useProse = false;
0042:            public boolean checkAssert = true;
0043:
0044:            public static int counter = 0;
0045:
0046:            // INVOKEVIRTUAL
0047:            public void localMethod() {
0048:            }
0049:
0050:            public void localMethodLongO(Object ob1, Object ob2) {
0051:            }
0052:
0053:            public void localMethodLongI(int ob1, int ob2) {
0054:            }
0055:
0056:            public void localMethodLongL(long ob1, long ob2) {
0057:            }
0058:
0059:            public void localMethodLongD(double ob1, double ob2) {
0060:            }
0061:
0062:            // INVOKESPECIAL
0063:            private void privatelocalMethod() {
0064:            }
0065:
0066:            private void privatelocalMethodLongO(Object ob1, Object ob2) {
0067:            }
0068:
0069:            private void privatelocalMethodLongI(int ob1, int ob2) {
0070:            }
0071:
0072:            private void privatelocalMethodLongL(long ob1, long ob2) {
0073:            }
0074:
0075:            private void privatelocalMethodLongD(double ob1, double ob2) {
0076:            }
0077:
0078:            // INVOKEINTERFACE
0079:            protected JoinPointTestInterface obInterface = new JoinPointTestClass();
0080:
0081:            // SYNC INVOKEVIRTUAL
0082:            protected JoinPointTestClass obSync = new JoinPointTestClass();
0083:
0084:            // METHOD ENTRY 1
0085:            public class MethodEntryAspect_1 extends DefaultAspect {
0086:                public Crosscut c1 = new MethodCut() {
0087:                    // execute the advice 'before' the methods '^localMethod.*' and '^privatelocalMethod.*'
0088:                    public void METHOD_ARGS(
0089:                            JoinPointMeasurements1_micro target, REST args) {
0090:                        counter++;
0091:                    }
0092:
0093:                    // .. && calls('^localMethod.*' and '^privatelocalMethod.*')
0094:                    protected PointCutter pointCutter() {
0095:                        return ((Executions.before())
0096:                                .AND(((Within.method("^localMethod.*"))
0097:                                        .AND(Within
0098:                                                .type("JoinPointMeasurements1_micro")))
0099:                                        .OR((Within
0100:                                                .method("^privatelocalMethod.*"))
0101:                                                .AND(Within
0102:                                                        .type("JoinPointMeasurements1_micro")))
0103:                                /*
0104:                                 ( (Within.method("localMethod")) . AND (Within.type("JoinPointMeasurements1_micro")) ) . OR
0105:                                 ( (Within.method("localMethodLongO")) . AND (Within.type("JoinPointMeasurements1_micro")) ) . OR
0106:                                 ( (Within.method("localMethodLongI")) . AND (Within.type("JoinPointMeasurements1_micro")) ) . OR
0107:                                 ( (Within.method("localMethodLongL")) . AND (Within.type("JoinPointMeasurements1_micro")) ) . OR
0108:                                 ( (Within.method("localMethodLongD")) . AND (Within.type("JoinPointMeasurements1_micro")) ) . OR
0109:                                 ( (Within.method("privatelocalMethod")) . AND (Within.type("JoinPointMeasurements1_micro")) ) . OR
0110:                                 ( (Within.method("privatelocalMethodLongO")) . AND (Within.type("JoinPointMeasurements1_micro")) ) . OR
0111:                                 ( (Within.method("privatelocalMethodLongI")) . AND (Within.type("JoinPointMeasurements1_micro")) ) . OR
0112:                                 ( (Within.method("privatelocalMethodLongL")) . AND (Within.type("JoinPointMeasurements1_micro")) ) . OR
0113:                                 ( (Within.method("privatelocalMethodLongD")) . AND (Within.type("JoinPointMeasurements1_micro")) )
0114:                                 */
0115:                                ));
0116:                    }
0117:                };
0118:            }
0119:
0120:            // METHOD EXIT 1
0121:            public class MethodExitAspect_1 extends DefaultAspect {
0122:                public Crosscut c2 = new MethodCut() {
0123:                    // execute the advice 'after' the method '^localMethod.*' and  '^privatelocalMethod.*'
0124:                    public void METHOD_ARGS(
0125:                            JoinPointMeasurements1_micro target, REST args) {
0126:                        counter++;
0127:                    }
0128:
0129:                    // .. && calls('^localMethod.*' and '^privatelocalMethod.*')
0130:                    protected PointCutter pointCutter() {
0131:                        return ((Executions.after())
0132:                                .AND(((Within.method("^localMethod.*"))
0133:                                        .AND(Within
0134:                                                .type("JoinPointMeasurements1_micro")))
0135:                                        .OR((Within
0136:                                                .method("^privatelocalMethod.*"))
0137:                                                .AND(Within
0138:                                                        .type("JoinPointMeasurements1_micro")))
0139:                                /*
0140:                                 ( (Within.method("localMethod")) . AND (Within.type("JoinPointMeasurements1_micro")) ) . OR
0141:                                 ( (Within.method("localMethodLongO")) . AND (Within.type("JoinPointMeasurements1_micro")) ) . OR
0142:                                 ( (Within.method("localMethodLongI")) . AND (Within.type("JoinPointMeasurements1_micro")) ) . OR
0143:                                 ( (Within.method("localMethodLongL")) . AND (Within.type("JoinPointMeasurements1_micro")) ) . OR
0144:                                 ( (Within.method("localMethodLongD")) . AND (Within.type("JoinPointMeasurements1_micro")) ) . OR
0145:                                 ( (Within.method("privatelocalMethod")) . AND (Within.type("JoinPointMeasurements1_micro")) ) . OR
0146:                                 ( (Within.method("privatelocalMethodLongO")) . AND (Within.type("JoinPointMeasurements1_micro")) ) . OR
0147:                                 ( (Within.method("privatelocalMethodLongI")) . AND (Within.type("JoinPointMeasurements1_micro")) ) . OR
0148:                                 ( (Within.method("privatelocalMethodLongL")) . AND (Within.type("JoinPointMeasurements1_micro")) ) . OR
0149:                                 ( (Within.method("privatelocalMethodLongD")) . AND (Within.type("JoinPointMeasurements1_micro")) )
0150:                                 */
0151:                                ));
0152:                    }
0153:                };
0154:            }
0155:
0156:            // METHOD ENTRY 2
0157:            public class MethodEntryAspect_2 extends DefaultAspect {
0158:                public Crosscut c3 = new MethodCut() {
0159:                    // execute the advice 'before' the methods '^interfaceMethod.*' and  '^syncMethod.*' and '^staticMethod.*' 
0160:                    public void METHOD_ARGS(JoinPointTestClass target, REST args) {
0161:                        counter++;
0162:                    }
0163:
0164:                    // .. && calls('^interfaceMethod.*' and '^syncMethod.*' and '^staticMethod.*')
0165:                    protected PointCutter pointCutter() {
0166:                        return ((Executions.before()).AND(((Within
0167:                                .method("^interfaceMethod.*")).AND(Within
0168:                                .type("JoinPointTestClass"))).OR(
0169:                                (Within.method("^syncMethod.*")).AND(Within
0170:                                        .type("JoinPointTestClass"))).OR(
0171:                                (Within.method("^staticMethod.*")).AND(Within
0172:                                        .type("JoinPointTestClass")))));
0173:                    }
0174:                };
0175:            }
0176:
0177:            // METHOD EXIT 2
0178:            public class MethodExitAspect_2 extends DefaultAspect {
0179:                public Crosscut c4 = new MethodCut() {
0180:                    // execute the advice 'after' the methods '^interfaceMethod.*' and  '^syncMethod.*' and '^staticMethod.*' 
0181:                    public void METHOD_ARGS(JoinPointTestClass target, REST args) {
0182:                        counter++;
0183:                    }
0184:
0185:                    // .. && calls('^interfaceMethod.*' and '^syncMethod.*' and '^staticMethod.*')
0186:                    protected PointCutter pointCutter() {
0187:                        return ((Executions.after()).AND(((Within
0188:                                .method("^interfaceMethod.*")).AND(Within
0189:                                .type("JoinPointTestClass"))).OR(
0190:                                (Within.method("^syncMethod.*")).AND(Within
0191:                                        .type("JoinPointTestClass"))).OR(
0192:                                (Within.method("^staticMethod.*")).AND(Within
0193:                                        .type("JoinPointTestClass")))));
0194:                    }
0195:                };
0196:            }
0197:
0198:            Aspect aspect1; // METHOD ENTRY 1
0199:            Aspect aspect2; // METHOD EXIT 1
0200:            Aspect aspect3; // METHOD ENTRY 2
0201:            Aspect aspect4; // METHOD EXIT 2
0202:
0203:            public JoinPointMeasurements1_micro(String name) {
0204:                super (name);
0205:                //RANGE = new int[] { 100000000 };
0206:                //RANGE = new int[] { 1000000 };
0207:                RANGE = new int[] { 10000 };
0208:                //RANGE = new int[] { 1 };
0209:
0210:                String proseParam = System.getProperty("useprose");
0211:                if (proseParam != null)
0212:                    useProse = true;
0213:            }
0214:
0215:            protected void setUp() throws Exception {
0216:
0217:                if (!useProse)
0218:                    return;
0219:
0220:                try {
0221:                    ProseSystem.startup();
0222:                } catch (Exception e) {
0223:                    Assert.fail("ProseSystem.startup() failed");
0224:                }
0225:
0226:                aspect1 = new MethodEntryAspect_1();
0227:                aspect2 = new MethodExitAspect_1();
0228:                aspect3 = new MethodEntryAspect_2();
0229:                aspect4 = new MethodExitAspect_2();
0230:
0231:                counter = 0;
0232:            }
0233:
0234:            protected void tearDown() {
0235:                if (!useProse)
0236:                    return;
0237:
0238:                try {
0239:                    ProseSystem.teardown();
0240:                } catch (Exception e) {
0241:                    Assert.fail("ProseSystem.teardown() failed");
0242:                }
0243:            }
0244:
0245:            //=====================================================
0246:            /*    
0247:             // 1) INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
0248:             public void testVirtualMethod_no_jp_NoArg()
0249:             {
0250:             startChronometer();
0251:             for (int i = 0; i < RUNS; i++) localMethod();
0252:             stopChronometer();
0253:             }
0254:             */
0255:            // 3) INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
0256:            public void testVirtualMethodEntry_jp_activated_NoArg() {
0257:                if (useProse)
0258:                    ProseSystem.getAspectManager().insert(aspect1);
0259:
0260:                startChronometer();
0261:                for (int i = 0; i < RUNS; i++)
0262:                    localMethod();
0263:                stopChronometer();
0264:
0265:                if (useProse)
0266:                    ProseSystem.getAspectManager().withdraw(aspect1);
0267:
0268:                if (checkAssert)
0269:                    assertEquals("Hook notifications", RUNS, counter);
0270:            }
0271:
0272:            // 3) INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
0273:            public void testVirtualMethodExit_jp_activated_NoArg() {
0274:                if (useProse)
0275:                    ProseSystem.getAspectManager().insert(aspect2);
0276:
0277:                startChronometer();
0278:                for (int i = 0; i < RUNS; i++)
0279:                    localMethod();
0280:                stopChronometer();
0281:
0282:                if (useProse)
0283:                    ProseSystem.getAspectManager().withdraw(aspect2);
0284:
0285:                if (checkAssert)
0286:                    assertEquals("Hook notifications", RUNS, counter);
0287:            }
0288:
0289:            //=====================================================
0290:            /*    
0291:             // 1) SYNC INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
0292:             public void testSyncVirtualMethod_no_jp_NoArg()
0293:             {
0294:             startChronometer();
0295:             for (int i = 0; i < RUNS; i++) obSync.syncMethodShort();
0296:             stopChronometer();
0297:             }
0298:             */
0299:            // 3) SYNC INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
0300:            public void testSyncVirtualMethodEntry_jp_activated_NoArg() {
0301:                if (useProse)
0302:                    ProseSystem.getAspectManager().insert(aspect3);
0303:
0304:                startChronometer();
0305:                for (int i = 0; i < RUNS; i++)
0306:                    obSync.syncMethodShort();
0307:                stopChronometer();
0308:
0309:                if (useProse)
0310:                    ProseSystem.getAspectManager().withdraw(aspect3);
0311:
0312:                if (checkAssert)
0313:                    assertEquals("Hook notifications", RUNS, counter);
0314:            }
0315:
0316:            // 3) SYNC INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
0317:            public void testSyncVirtualMethodExit_jp_activated_NoArg() {
0318:                if (useProse)
0319:                    ProseSystem.getAspectManager().insert(aspect4);
0320:
0321:                startChronometer();
0322:                for (int i = 0; i < RUNS; i++)
0323:                    obSync.syncMethodShort();
0324:                stopChronometer();
0325:
0326:                if (useProse)
0327:                    ProseSystem.getAspectManager().withdraw(aspect4);
0328:
0329:                if (checkAssert)
0330:                    assertEquals("Hook notifications", RUNS, counter);
0331:            }
0332:
0333:            //=====================================================
0334:            /*    
0335:             // 1) INVOKEINTERFACE - no call to weaver because the joinpoint isn't activated
0336:             public void testInterfaceMethod_no_jp_NoArg() 
0337:             {
0338:             startChronometer();
0339:             for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodShort();
0340:             stopChronometer();
0341:             }
0342:             */
0343:            // 3) INVOKEINTERFACE - call to empty weaver because of on active, unlocked joinpoint
0344:            public void testInterfaceMethodEntry_jp_activated_NoArg() {
0345:                if (useProse)
0346:                    ProseSystem.getAspectManager().insert(aspect3);
0347:
0348:                startChronometer();
0349:                for (int i = 0; i < RUNS; i++)
0350:                    obInterface.interfaceMethodShort();
0351:                stopChronometer();
0352:
0353:                if (useProse)
0354:                    ProseSystem.getAspectManager().withdraw(aspect3);
0355:
0356:                if (checkAssert)
0357:                    assertEquals("Hook notifications", RUNS, counter);
0358:            }
0359:
0360:            // 3) INVOKEINTERFACE - call to empty weaver because of on active, unlocked joinpoint
0361:            public void testInterfaceMethodExit_jp_activated_NoArg() {
0362:                if (useProse)
0363:                    ProseSystem.getAspectManager().insert(aspect4);
0364:
0365:                startChronometer();
0366:                for (int i = 0; i < RUNS; i++)
0367:                    obInterface.interfaceMethodShort();
0368:                stopChronometer();
0369:
0370:                if (useProse)
0371:                    ProseSystem.getAspectManager().withdraw(aspect4);
0372:
0373:                if (checkAssert)
0374:                    assertEquals("Hook notifications", RUNS, counter);
0375:            }
0376:
0377:            //=====================================================
0378:            /*    
0379:             // 1) INVOKESTATIC - no call to weaver because the joinpoint isn't activated
0380:             public void testStaticMethod_no_jp_NoArg() 
0381:             {
0382:             startChronometer();
0383:             for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodShort();
0384:             stopChronometer();
0385:             }
0386:             */
0387:            // 3) INVOKESTATIC - call to empty weaver because of on active, unlocked joinpoint
0388:            public void testStaticMethodEntry_jp_activated_NoArg() {
0389:                if (useProse)
0390:                    ProseSystem.getAspectManager().insert(aspect3);
0391:
0392:                startChronometer();
0393:                for (int i = 0; i < RUNS; i++)
0394:                    JoinPointTestClass.staticMethodShort();
0395:                stopChronometer();
0396:
0397:                if (useProse)
0398:                    ProseSystem.getAspectManager().withdraw(aspect3);
0399:
0400:                if (checkAssert)
0401:                    assertEquals("Hook notifications", RUNS, counter);
0402:            }
0403:
0404:            // 3) INVOKESTATIC - call to empty weaver because of on active, unlocked joinpoint
0405:            public void testStaticMethodExit_jp_activated_NoArg() {
0406:                if (useProse)
0407:                    ProseSystem.getAspectManager().insert(aspect4);
0408:
0409:                startChronometer();
0410:                for (int i = 0; i < RUNS; i++)
0411:                    JoinPointTestClass.staticMethodShort();
0412:                stopChronometer();
0413:
0414:                if (useProse)
0415:                    ProseSystem.getAspectManager().withdraw(aspect4);
0416:
0417:                if (checkAssert)
0418:                    assertEquals("Hook notifications", RUNS, counter);
0419:            }
0420:
0421:            //=====================================================
0422:            /*    
0423:             // 1) INVOKESPECIAL - no call to weaver because the joinpoint isn't activated
0424:             public void testSpecialMethod_no_jp_NoArg() 
0425:             {
0426:             startChronometer();
0427:             for (int i = 0; i < RUNS; i++) privatelocalMethod();
0428:             stopChronometer();
0429:             }
0430:             */
0431:            // 3) INVOKESPECIAL - call to empty weaver because of on active, unlocked joinpoint
0432:            public void testSpecialMethodEntry_jp_activated_NoArg() {
0433:                if (useProse)
0434:                    ProseSystem.getAspectManager().insert(aspect1);
0435:
0436:                startChronometer();
0437:                for (int i = 0; i < RUNS; i++)
0438:                    privatelocalMethod();
0439:                stopChronometer();
0440:
0441:                if (useProse)
0442:                    ProseSystem.getAspectManager().withdraw(aspect1);
0443:
0444:                if (checkAssert)
0445:                    assertEquals("Hook notifications", RUNS, counter);
0446:            }
0447:
0448:            // 3) INVOKESPECIAL - call to empty weaver because of on active, unlocked joinpoint
0449:            public void testSpecialMethodExit_jp_activated_NoArg() {
0450:                if (useProse)
0451:                    ProseSystem.getAspectManager().insert(aspect2);
0452:
0453:                startChronometer();
0454:                for (int i = 0; i < RUNS; i++)
0455:                    privatelocalMethod();
0456:                stopChronometer();
0457:
0458:                if (useProse)
0459:                    ProseSystem.getAspectManager().withdraw(aspect2);
0460:
0461:                if (checkAssert)
0462:                    assertEquals("Hook notifications", RUNS, counter);
0463:            }
0464:
0465:            //=====================================================
0466:            //=====================================================
0467:            //=====================================================
0468:            //=====================================================
0469:            //=====================================================
0470:
0471:            // Method arguments: (Object, Object)
0472:            //=====================================================
0473:            /*    
0474:             // 1) INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
0475:             public void testVirtualMethod_LongO() 
0476:             {
0477:             Object obj = new Object();
0478:             startChronometer();
0479:             for (int i = 0; i < RUNS; i++) localMethodLongO(obj, obj);
0480:             stopChronometer();
0481:             }
0482:             */
0483:            // 3) INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
0484:            public void testVirtualMethodEntry_jp_activated_LongO() {
0485:                Object obj = new Object();
0486:
0487:                if (useProse)
0488:                    ProseSystem.getAspectManager().insert(aspect1);
0489:
0490:                startChronometer();
0491:                for (int i = 0; i < RUNS; i++)
0492:                    localMethodLongO(obj, obj);
0493:                stopChronometer();
0494:
0495:                if (useProse)
0496:                    ProseSystem.getAspectManager().withdraw(aspect1);
0497:
0498:                if (checkAssert)
0499:                    assertEquals("Hook notifications", RUNS, counter);
0500:            }
0501:
0502:            // 3) INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
0503:            public void testVirtualMethodExit_jp_activated_LongO() {
0504:                Object obj = new Object();
0505:
0506:                if (useProse)
0507:                    ProseSystem.getAspectManager().insert(aspect2);
0508:
0509:                startChronometer();
0510:                for (int i = 0; i < RUNS; i++)
0511:                    localMethodLongO(obj, obj);
0512:                stopChronometer();
0513:
0514:                if (useProse)
0515:                    ProseSystem.getAspectManager().withdraw(aspect2);
0516:
0517:                if (checkAssert)
0518:                    assertEquals("Hook notifications", RUNS, counter);
0519:            }
0520:
0521:            //=====================================================
0522:            /*    
0523:             // 1) SYNC INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
0524:             public void testSyncVirtualMethod_LongO() 
0525:             {
0526:             Object obj = new Object();
0527:             startChronometer();
0528:             for (int i = 0; i < RUNS; i++) obSync.syncMethodLongO(obj, obj);
0529:             stopChronometer();
0530:             }
0531:             */
0532:            // 3) SYNC INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
0533:            public void testSyncVirtualMethodEntry_jp_activated_LongO() {
0534:                Object obj = new Object();
0535:
0536:                if (useProse)
0537:                    ProseSystem.getAspectManager().insert(aspect3);
0538:
0539:                startChronometer();
0540:                for (int i = 0; i < RUNS; i++)
0541:                    obSync.syncMethodLongO(obj, obj);
0542:                stopChronometer();
0543:
0544:                if (useProse)
0545:                    ProseSystem.getAspectManager().withdraw(aspect3);
0546:
0547:                if (checkAssert)
0548:                    assertEquals("Hook notifications", RUNS, counter);
0549:            }
0550:
0551:            // 3) SYNC INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
0552:            public void testSyncVirtualMethodExit_jp_activated_LongO() {
0553:                Object obj = new Object();
0554:
0555:                if (useProse)
0556:                    ProseSystem.getAspectManager().insert(aspect4);
0557:
0558:                startChronometer();
0559:                for (int i = 0; i < RUNS; i++)
0560:                    obSync.syncMethodLongO(obj, obj);
0561:                stopChronometer();
0562:
0563:                if (useProse)
0564:                    ProseSystem.getAspectManager().withdraw(aspect4);
0565:
0566:                if (checkAssert)
0567:                    assertEquals("Hook notifications", RUNS, counter);
0568:            }
0569:
0570:            //=====================================================
0571:            /*   
0572:               // 1) INVOKEINTERFACE - no call to weaver because the joinpoint isn't activated
0573:               public void testInterfaceMethod_LongO() 
0574:               {
0575:               	Object obj = new Object();
0576:               	startChronometer();
0577:               	for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodLongO(obj, obj);
0578:               	stopChronometer();
0579:               }
0580:             */
0581:            // 3) INVOKEINTERFACE - call to empty weaver because of on active, unlocked joinpoint
0582:            public void testInterfaceMethodEntry_jp_activated_LongO() {
0583:                Object obj = new Object();
0584:
0585:                if (useProse)
0586:                    ProseSystem.getAspectManager().insert(aspect3);
0587:
0588:                startChronometer();
0589:                for (int i = 0; i < RUNS; i++)
0590:                    obInterface.interfaceMethodLongO(obj, obj);
0591:                stopChronometer();
0592:
0593:                if (useProse)
0594:                    ProseSystem.getAspectManager().withdraw(aspect3);
0595:
0596:                if (checkAssert)
0597:                    assertEquals("Hook notifications", RUNS, counter);
0598:            }
0599:
0600:            // 3) INVOKEINTERFACE - call to empty weaver because of on active, unlocked joinpoint
0601:            public void testInterfaceMethodExit_jp_activated_LongO() {
0602:                Object obj = new Object();
0603:
0604:                if (useProse)
0605:                    ProseSystem.getAspectManager().insert(aspect4);
0606:
0607:                startChronometer();
0608:                for (int i = 0; i < RUNS; i++)
0609:                    obInterface.interfaceMethodLongO(obj, obj);
0610:                stopChronometer();
0611:
0612:                if (useProse)
0613:                    ProseSystem.getAspectManager().withdraw(aspect4);
0614:
0615:                if (checkAssert)
0616:                    assertEquals("Hook notifications", RUNS, counter);
0617:            }
0618:
0619:            //=====================================================
0620:            /*    
0621:             // 1) INVOKESTATIC - no call to weaver because the joinpoint isn't activated
0622:             public void testStaticMethod_LongO() 
0623:             {
0624:             Object obj = new Object();
0625:             startChronometer();
0626:             for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodLongO(obj, obj);
0627:             stopChronometer();
0628:             }
0629:             */
0630:            // 3) INVOKESTATIC - call to empty weaver because of on active, unlocked joinpoint
0631:            public void testStaticMethodEntry_jp_activated_LongO() {
0632:                Object obj = new Object();
0633:
0634:                if (useProse)
0635:                    ProseSystem.getAspectManager().insert(aspect3);
0636:
0637:                startChronometer();
0638:                for (int i = 0; i < RUNS; i++)
0639:                    JoinPointTestClass.staticMethodLongO(obj, obj);
0640:                stopChronometer();
0641:
0642:                if (useProse)
0643:                    ProseSystem.getAspectManager().withdraw(aspect3);
0644:
0645:                if (checkAssert)
0646:                    assertEquals("Hook notifications", RUNS, counter);
0647:            }
0648:
0649:            // 3) INVOKESTATIC - call to empty weaver because of on active, unlocked joinpoint
0650:            public void testStaticMethodExit_jp_activated_LongO() {
0651:                Object obj = new Object();
0652:
0653:                if (useProse)
0654:                    ProseSystem.getAspectManager().insert(aspect4);
0655:
0656:                startChronometer();
0657:                for (int i = 0; i < RUNS; i++)
0658:                    JoinPointTestClass.staticMethodLongO(obj, obj);
0659:                stopChronometer();
0660:
0661:                if (useProse)
0662:                    ProseSystem.getAspectManager().withdraw(aspect4);
0663:
0664:                if (checkAssert)
0665:                    assertEquals("Hook notifications", RUNS, counter);
0666:            }
0667:
0668:            //=====================================================
0669:            /*    
0670:             // 1) INVOKESPECIAL - no call to weaver because the joinpoint isn't activated
0671:             public void testSpecialMethod_LongO() 
0672:             {
0673:             Object obj = new Object();
0674:             startChronometer();
0675:             for (int i = 0; i < RUNS; i++) privatelocalMethodLongO(obj, obj);
0676:             stopChronometer();
0677:             }
0678:             */
0679:            // 3) INVOKESPECIAL - call to empty weaver because of on active, unlocked joinpoint
0680:            public void testSpecialMethodEntry_jp_activated_LongO() {
0681:                Object obj = new Object();
0682:
0683:                if (useProse)
0684:                    ProseSystem.getAspectManager().insert(aspect1);
0685:
0686:                startChronometer();
0687:                for (int i = 0; i < RUNS; i++)
0688:                    privatelocalMethodLongO(obj, obj);
0689:                stopChronometer();
0690:
0691:                if (useProse)
0692:                    ProseSystem.getAspectManager().withdraw(aspect1);
0693:
0694:                if (checkAssert)
0695:                    assertEquals("Hook notifications", RUNS, counter);
0696:            }
0697:
0698:            // 3) INVOKESPECIAL - call to empty weaver because of on active, unlocked joinpoint
0699:            public void testSpecialMethodExit_jp_activated_LongO() {
0700:                Object obj = new Object();
0701:
0702:                if (useProse)
0703:                    ProseSystem.getAspectManager().insert(aspect2);
0704:
0705:                startChronometer();
0706:                for (int i = 0; i < RUNS; i++)
0707:                    privatelocalMethodLongO(obj, obj);
0708:                stopChronometer();
0709:
0710:                if (useProse)
0711:                    ProseSystem.getAspectManager().withdraw(aspect2);
0712:
0713:                if (checkAssert)
0714:                    assertEquals("Hook notifications", RUNS, counter);
0715:            }
0716:
0717:            //=====================================================
0718:            //=====================================================
0719:
0720:            // Method arguments: (int, int)
0721:            //=====================================================
0722:            /*    
0723:             // 1) INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
0724:             public void testVirtualMethod_LongI() 
0725:             {
0726:             int obj = 1;
0727:             startChronometer();
0728:             for (int i = 0; i < RUNS; i++) localMethodLongI(obj, obj);
0729:             stopChronometer();
0730:             }
0731:             */
0732:            // 3) INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
0733:            public void testVirtualMethodEntry_jp_activated_LongI() {
0734:                int obj = 1;
0735:
0736:                if (useProse)
0737:                    ProseSystem.getAspectManager().insert(aspect1);
0738:
0739:                startChronometer();
0740:                for (int i = 0; i < RUNS; i++)
0741:                    localMethodLongI(obj, obj);
0742:                stopChronometer();
0743:
0744:                if (useProse)
0745:                    ProseSystem.getAspectManager().withdraw(aspect1);
0746:
0747:                if (checkAssert)
0748:                    assertEquals("Hook notifications", RUNS, counter);
0749:            }
0750:
0751:            // 3) INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
0752:            public void testVirtualMethodExit_jp_activated_LongI() {
0753:                int obj = 1;
0754:
0755:                if (useProse)
0756:                    ProseSystem.getAspectManager().insert(aspect2);
0757:
0758:                startChronometer();
0759:                for (int i = 0; i < RUNS; i++)
0760:                    localMethodLongI(obj, obj);
0761:                stopChronometer();
0762:
0763:                if (useProse)
0764:                    ProseSystem.getAspectManager().withdraw(aspect2);
0765:
0766:                if (checkAssert)
0767:                    assertEquals("Hook notifications", RUNS, counter);
0768:            }
0769:
0770:            //=====================================================
0771:            /*    
0772:             // 1) SYNC INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
0773:             public void testSyncVirtualMethod_LongI() 
0774:             {
0775:             int obj = 1;
0776:             startChronometer();
0777:             for (int i = 0; i < RUNS; i++) obSync.syncMethodLongI(obj, obj);
0778:             stopChronometer();
0779:             }
0780:             */
0781:            // 3) SYNC INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
0782:            public void testSyncVirtualMethodEntry_jp_activated_LongI() {
0783:                int obj = 1;
0784:
0785:                if (useProse)
0786:                    ProseSystem.getAspectManager().insert(aspect3);
0787:
0788:                startChronometer();
0789:                for (int i = 0; i < RUNS; i++)
0790:                    obSync.syncMethodLongI(obj, obj);
0791:                stopChronometer();
0792:
0793:                if (useProse)
0794:                    ProseSystem.getAspectManager().withdraw(aspect3);
0795:
0796:                if (checkAssert)
0797:                    assertEquals("Hook notifications", RUNS, counter);
0798:            }
0799:
0800:            // 3) SYNC INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
0801:            public void testSyncVirtualMethodExit_jp_activated_LongI() {
0802:                int obj = 1;
0803:
0804:                if (useProse)
0805:                    ProseSystem.getAspectManager().insert(aspect4);
0806:
0807:                startChronometer();
0808:                for (int i = 0; i < RUNS; i++)
0809:                    obSync.syncMethodLongI(obj, obj);
0810:                stopChronometer();
0811:
0812:                if (useProse)
0813:                    ProseSystem.getAspectManager().withdraw(aspect4);
0814:
0815:                if (checkAssert)
0816:                    assertEquals("Hook notifications", RUNS, counter);
0817:            }
0818:
0819:            //=====================================================
0820:            /*    
0821:             // 1) INVOKEINTERFACE - no call to weaver because the joinpoint isn't activated
0822:             public void testInterfaceMethod_LongI() 
0823:             {
0824:             int obj = 1;
0825:             startChronometer();
0826:             for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodLongI(obj, obj);
0827:             stopChronometer();
0828:             }
0829:             */
0830:            // 3) INVOKEINTERFACE - call to empty weaver because of on active, unlocked joinpoint
0831:            public void testInterfaceMethodEntry_jp_activated_LongI() {
0832:                int obj = 1;
0833:
0834:                if (useProse)
0835:                    ProseSystem.getAspectManager().insert(aspect3);
0836:
0837:                startChronometer();
0838:                for (int i = 0; i < RUNS; i++)
0839:                    obInterface.interfaceMethodLongI(obj, obj);
0840:                stopChronometer();
0841:
0842:                if (useProse)
0843:                    ProseSystem.getAspectManager().withdraw(aspect3);
0844:
0845:                if (checkAssert)
0846:                    assertEquals("Hook notifications", RUNS, counter);
0847:            }
0848:
0849:            // 3) INVOKEINTERFACE - call to empty weaver because of on active, unlocked joinpoint
0850:            public void testInterfaceMethodExit_jp_activated_LongI() {
0851:                int obj = 1;
0852:
0853:                if (useProse)
0854:                    ProseSystem.getAspectManager().insert(aspect4);
0855:
0856:                startChronometer();
0857:                for (int i = 0; i < RUNS; i++)
0858:                    obInterface.interfaceMethodLongI(obj, obj);
0859:                stopChronometer();
0860:
0861:                if (useProse)
0862:                    ProseSystem.getAspectManager().withdraw(aspect4);
0863:
0864:                if (checkAssert)
0865:                    assertEquals("Hook notifications", RUNS, counter);
0866:            }
0867:
0868:            //=====================================================
0869:            /*    
0870:             // 1) INVOKESTATIC - no call to weaver because the joinpoint isn't activated
0871:             public void testStaticMethod_LongI() 
0872:             {
0873:             int obj = 1;
0874:             startChronometer();
0875:             for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodLongI(obj, obj);
0876:             stopChronometer();
0877:             }
0878:             */
0879:            // 3) INVOKESTATIC - call to empty weaver because of on active, unlocked joinpoint
0880:            public void testStaticMethodEntry_jp_activated_LongI() {
0881:                int obj = 1;
0882:
0883:                if (useProse)
0884:                    ProseSystem.getAspectManager().insert(aspect3);
0885:
0886:                startChronometer();
0887:                for (int i = 0; i < RUNS; i++)
0888:                    JoinPointTestClass.staticMethodLongI(obj, obj);
0889:                stopChronometer();
0890:
0891:                if (useProse)
0892:                    ProseSystem.getAspectManager().withdraw(aspect3);
0893:
0894:                if (checkAssert)
0895:                    assertEquals("Hook notifications", RUNS, counter);
0896:            }
0897:
0898:            // 3) INVOKESTATIC - call to empty weaver because of on active, unlocked joinpoint
0899:            public void testStaticMethodExit_jp_activated_LongI() {
0900:                int obj = 1;
0901:
0902:                if (useProse)
0903:                    ProseSystem.getAspectManager().insert(aspect4);
0904:
0905:                startChronometer();
0906:                for (int i = 0; i < RUNS; i++)
0907:                    JoinPointTestClass.staticMethodLongI(obj, obj);
0908:                stopChronometer();
0909:
0910:                if (useProse)
0911:                    ProseSystem.getAspectManager().withdraw(aspect4);
0912:
0913:                if (checkAssert)
0914:                    assertEquals("Hook notifications", RUNS, counter);
0915:            }
0916:
0917:            //=====================================================
0918:            /*    
0919:             // 1) INVOKESPECIAL - no call to weaver because the joinpoint isn't activated
0920:             public void testSpecialMethod_LongI() 
0921:             {
0922:             int obj = 1;
0923:             startChronometer();
0924:             for (int i = 0; i < RUNS; i++) privatelocalMethodLongI(obj, obj);
0925:             stopChronometer();
0926:             }
0927:             */
0928:            // 3) INVOKESPECIAL - call to empty weaver because of on active, unlocked joinpoint
0929:            public void testSpecialMethodEntry_jp_activated_LongI() {
0930:                int obj = 1;
0931:
0932:                if (useProse)
0933:                    ProseSystem.getAspectManager().insert(aspect1);
0934:
0935:                startChronometer();
0936:                for (int i = 0; i < RUNS; i++)
0937:                    privatelocalMethodLongI(obj, obj);
0938:                stopChronometer();
0939:
0940:                if (useProse)
0941:                    ProseSystem.getAspectManager().withdraw(aspect1);
0942:
0943:                if (checkAssert)
0944:                    assertEquals("Hook notifications", RUNS, counter);
0945:            }
0946:
0947:            // 3) INVOKESPECIAL - call to empty weaver because of on active, unlocked joinpoint
0948:            public void testSpecialMethodExit_jp_activated_LongI() {
0949:                int obj = 1;
0950:
0951:                if (useProse)
0952:                    ProseSystem.getAspectManager().insert(aspect2);
0953:
0954:                startChronometer();
0955:                for (int i = 0; i < RUNS; i++)
0956:                    privatelocalMethodLongI(obj, obj);
0957:                stopChronometer();
0958:
0959:                if (useProse)
0960:                    ProseSystem.getAspectManager().withdraw(aspect2);
0961:
0962:                if (checkAssert)
0963:                    assertEquals("Hook notifications", RUNS, counter);
0964:            }
0965:
0966:            //=====================================================
0967:            //=====================================================    
0968:
0969:            // Method arguments: (long, long)
0970:            //=====================================================
0971:            /*    
0972:             // 1) INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
0973:             public void testVirtualMethod_LongL() 
0974:             {
0975:             long obj = 1;
0976:             startChronometer();
0977:             for (int i = 0; i < RUNS; i++) localMethodLongL(obj, obj);
0978:             stopChronometer();
0979:             }
0980:             */
0981:            // 3) INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
0982:            public void testVirtualMethodEntry_jp_activated_LongL() {
0983:                long obj = 1;
0984:
0985:                if (useProse)
0986:                    ProseSystem.getAspectManager().insert(aspect1);
0987:
0988:                startChronometer();
0989:                for (int i = 0; i < RUNS; i++)
0990:                    localMethodLongL(obj, obj);
0991:                stopChronometer();
0992:
0993:                if (useProse)
0994:                    ProseSystem.getAspectManager().withdraw(aspect1);
0995:
0996:                if (checkAssert)
0997:                    assertEquals("Hook notifications", RUNS, counter);
0998:            }
0999:
1000:            // 3) INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
1001:            public void testVirtualMethodExit_jp_activated_LongL() {
1002:                long obj = 1;
1003:
1004:                if (useProse)
1005:                    ProseSystem.getAspectManager().insert(aspect2);
1006:
1007:                startChronometer();
1008:                for (int i = 0; i < RUNS; i++)
1009:                    localMethodLongL(obj, obj);
1010:                stopChronometer();
1011:
1012:                if (useProse)
1013:                    ProseSystem.getAspectManager().withdraw(aspect2);
1014:
1015:                if (checkAssert)
1016:                    assertEquals("Hook notifications", RUNS, counter);
1017:            }
1018:
1019:            //=====================================================
1020:            /*    
1021:             // 1) SYNC INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
1022:             public void testSyncVirtualMethod_LongL() 
1023:             {
1024:             long obj = 1;
1025:             startChronometer();
1026:             for (int i = 0; i < RUNS; i++) obSync.syncMethodLongL(obj, obj);
1027:             stopChronometer();
1028:             }
1029:             */
1030:            // 3) SYNC INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
1031:            public void testSyncVirtualMethodEntry_jp_activated_LongL() {
1032:                long obj = 1;
1033:
1034:                if (useProse)
1035:                    ProseSystem.getAspectManager().insert(aspect3);
1036:
1037:                startChronometer();
1038:                for (int i = 0; i < RUNS; i++)
1039:                    obSync.syncMethodLongL(obj, obj);
1040:                stopChronometer();
1041:
1042:                if (useProse)
1043:                    ProseSystem.getAspectManager().withdraw(aspect3);
1044:
1045:                if (checkAssert)
1046:                    assertEquals("Hook notifications", RUNS, counter);
1047:            }
1048:
1049:            // 3) SYNC INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
1050:            public void testSyncVirtualMethodExit_jp_activated_LongL() {
1051:                long obj = 1;
1052:
1053:                if (useProse)
1054:                    ProseSystem.getAspectManager().insert(aspect4);
1055:
1056:                startChronometer();
1057:                for (int i = 0; i < RUNS; i++)
1058:                    obSync.syncMethodLongL(obj, obj);
1059:                stopChronometer();
1060:
1061:                if (useProse)
1062:                    ProseSystem.getAspectManager().withdraw(aspect4);
1063:
1064:                if (checkAssert)
1065:                    assertEquals("Hook notifications", RUNS, counter);
1066:            }
1067:
1068:            //=====================================================
1069:            /*    
1070:             // 1) INVOKEINTERFACE - no call to weaver because the joinpoint isn't activated
1071:             public void testInterfaceMethod_LongL() 
1072:             {
1073:             long obj = 1;
1074:             startChronometer();
1075:             for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodLongL(obj, obj);
1076:             stopChronometer();
1077:             }
1078:             */
1079:            // 3) INVOKEINTERFACE - call to empty weaver because of on active, unlocked joinpoint
1080:            public void testInterfaceMethodEntry_jp_activated_LongL() {
1081:                long obj = 1;
1082:
1083:                if (useProse)
1084:                    ProseSystem.getAspectManager().insert(aspect3);
1085:
1086:                startChronometer();
1087:                for (int i = 0; i < RUNS; i++)
1088:                    obInterface.interfaceMethodLongL(obj, obj);
1089:                stopChronometer();
1090:
1091:                if (useProse)
1092:                    ProseSystem.getAspectManager().withdraw(aspect3);
1093:
1094:                if (checkAssert)
1095:                    assertEquals("Hook notifications", RUNS, counter);
1096:            }
1097:
1098:            // 3) INVOKEINTERFACE - call to empty weaver because of on active, unlocked joinpoint
1099:            public void testInterfaceMethodExit_jp_activated_LongL() {
1100:                long obj = 1;
1101:
1102:                if (useProse)
1103:                    ProseSystem.getAspectManager().insert(aspect4);
1104:
1105:                startChronometer();
1106:                for (int i = 0; i < RUNS; i++)
1107:                    obInterface.interfaceMethodLongL(obj, obj);
1108:                stopChronometer();
1109:
1110:                if (useProse)
1111:                    ProseSystem.getAspectManager().withdraw(aspect4);
1112:
1113:                if (checkAssert)
1114:                    assertEquals("Hook notifications", RUNS, counter);
1115:            }
1116:
1117:            //=====================================================
1118:            /*    
1119:             // 1) INVOKESTATIC - no call to weaver because the joinpoint isn't activated
1120:             public void testStaticMethod_LongL() 
1121:             {
1122:             long obj = 1;
1123:             startChronometer();
1124:             for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodLongL(obj, obj);
1125:             stopChronometer();
1126:             }
1127:             */
1128:            // 3) INVOKESTATIC - call to empty weaver because of on active, unlocked joinpoint
1129:            public void testStaticMethodEntry_jp_activated_LongL() {
1130:                long obj = 1;
1131:
1132:                if (useProse)
1133:                    ProseSystem.getAspectManager().insert(aspect3);
1134:
1135:                startChronometer();
1136:                for (int i = 0; i < RUNS; i++)
1137:                    JoinPointTestClass.staticMethodLongL(obj, obj);
1138:                stopChronometer();
1139:
1140:                if (useProse)
1141:                    ProseSystem.getAspectManager().withdraw(aspect3);
1142:
1143:                if (checkAssert)
1144:                    assertEquals("Hook notifications", RUNS, counter);
1145:            }
1146:
1147:            // 3) INVOKESTATIC - call to empty weaver because of on active, unlocked joinpoint
1148:            public void testStaticMethodExit_jp_activated_LongL() {
1149:                long obj = 1;
1150:
1151:                if (useProse)
1152:                    ProseSystem.getAspectManager().insert(aspect4);
1153:
1154:                startChronometer();
1155:                for (int i = 0; i < RUNS; i++)
1156:                    JoinPointTestClass.staticMethodLongL(obj, obj);
1157:                stopChronometer();
1158:
1159:                if (useProse)
1160:                    ProseSystem.getAspectManager().withdraw(aspect4);
1161:
1162:                if (checkAssert)
1163:                    assertEquals("Hook notifications", RUNS, counter);
1164:            }
1165:
1166:            //=====================================================
1167:            /*    
1168:             // 1) INVOKESPECIAL - no call to weaver because the joinpoint isn't activated
1169:             public void testSpecialMethod_LongL() 
1170:             {
1171:             long obj = 1;
1172:             startChronometer();
1173:             for (int i = 0; i < RUNS; i++) privatelocalMethodLongL(obj, obj);
1174:             stopChronometer();
1175:             }
1176:             */
1177:            // 3) INVOKESPECIAL - call to empty weaver because of on active, unlocked joinpoint
1178:            public void testSpecialMethodEntry_jp_activated_LongL() {
1179:                long obj = 1;
1180:
1181:                if (useProse)
1182:                    ProseSystem.getAspectManager().insert(aspect1);
1183:
1184:                startChronometer();
1185:                for (int i = 0; i < RUNS; i++)
1186:                    privatelocalMethodLongL(obj, obj);
1187:                stopChronometer();
1188:
1189:                if (useProse)
1190:                    ProseSystem.getAspectManager().withdraw(aspect1);
1191:
1192:                if (checkAssert)
1193:                    assertEquals("Hook notifications", RUNS, counter);
1194:            }
1195:
1196:            // 3) INVOKESPECIAL - call to empty weaver because of on active, unlocked joinpoint
1197:            public void testSpecialMethodExit_jp_activated_LongL() {
1198:                long obj = 1;
1199:
1200:                if (useProse)
1201:                    ProseSystem.getAspectManager().insert(aspect2);
1202:
1203:                startChronometer();
1204:                for (int i = 0; i < RUNS; i++)
1205:                    privatelocalMethodLongL(obj, obj);
1206:                stopChronometer();
1207:
1208:                if (useProse)
1209:                    ProseSystem.getAspectManager().withdraw(aspect2);
1210:
1211:                if (checkAssert)
1212:                    assertEquals("Hook notifications", RUNS, counter);
1213:            }
1214:
1215:            //=====================================================
1216:            //=====================================================    
1217:
1218:            // Method arguments: (double, double)
1219:            //=====================================================
1220:            /*    
1221:             // 1) INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
1222:             public void testVirtualMethod_LongD() 
1223:             {
1224:             double obj = 10.1;
1225:             startChronometer();
1226:             for (int i = 0; i < RUNS; i++) localMethodLongD(obj, obj);
1227:             stopChronometer();
1228:             }
1229:             */
1230:            // 3) INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
1231:            public void testVirtualMethodEntry_jp_activated_LongD() {
1232:                double obj = 10.1;
1233:
1234:                if (useProse)
1235:                    ProseSystem.getAspectManager().insert(aspect1);
1236:
1237:                startChronometer();
1238:                for (int i = 0; i < RUNS; i++)
1239:                    localMethodLongD(obj, obj);
1240:                stopChronometer();
1241:
1242:                if (useProse)
1243:                    ProseSystem.getAspectManager().withdraw(aspect1);
1244:
1245:                if (checkAssert)
1246:                    assertEquals("Hook notifications", RUNS, counter);
1247:            }
1248:
1249:            // 3) INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
1250:            public void testVirtualMethodExit_jp_activated_LongD() {
1251:                double obj = 10.1;
1252:
1253:                if (useProse)
1254:                    ProseSystem.getAspectManager().insert(aspect2);
1255:
1256:                startChronometer();
1257:                for (int i = 0; i < RUNS; i++)
1258:                    localMethodLongD(obj, obj);
1259:                stopChronometer();
1260:
1261:                if (useProse)
1262:                    ProseSystem.getAspectManager().withdraw(aspect2);
1263:
1264:                if (checkAssert)
1265:                    assertEquals("Hook notifications", RUNS, counter);
1266:            }
1267:
1268:            //=====================================================
1269:            /*    
1270:             // 1) SYNC INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
1271:             public void testSyncVirtualMethod_LongD() 
1272:             {
1273:             double obj = 10.1;
1274:             startChronometer();
1275:             for (int i = 0; i < RUNS; i++) obSync.syncMethodLongD(obj, obj);
1276:             stopChronometer();
1277:             }
1278:             */
1279:            // 3) SYNC INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
1280:            public void testSyncVirtualMethodEntry_jp_activated_LongD() {
1281:                double obj = 10.1;
1282:
1283:                if (useProse)
1284:                    ProseSystem.getAspectManager().insert(aspect3);
1285:
1286:                startChronometer();
1287:                for (int i = 0; i < RUNS; i++)
1288:                    obSync.syncMethodLongD(obj, obj);
1289:                stopChronometer();
1290:
1291:                if (useProse)
1292:                    ProseSystem.getAspectManager().withdraw(aspect3);
1293:
1294:                if (checkAssert)
1295:                    assertEquals("Hook notifications", RUNS, counter);
1296:            }
1297:
1298:            // 3) SYNC INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
1299:            public void testSyncVirtualMethodExit_jp_activated_LongD() {
1300:                double obj = 10.1;
1301:
1302:                if (useProse)
1303:                    ProseSystem.getAspectManager().insert(aspect4);
1304:
1305:                startChronometer();
1306:                for (int i = 0; i < RUNS; i++)
1307:                    obSync.syncMethodLongD(obj, obj);
1308:                stopChronometer();
1309:
1310:                if (useProse)
1311:                    ProseSystem.getAspectManager().withdraw(aspect4);
1312:
1313:                if (checkAssert)
1314:                    assertEquals("Hook notifications", RUNS, counter);
1315:            }
1316:
1317:            //=====================================================
1318:            /*    
1319:             // 1) INVOKEINTERFACE - no call to weaver because the joinpoint isn't activated
1320:             public void testInterfaceMethod_LongD() 
1321:             {
1322:             double obj = 10.1;
1323:             startChronometer();
1324:             for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodLongD(obj, obj);
1325:             stopChronometer();
1326:             }
1327:             */
1328:            // 3) INVOKEINTERFACE - call to empty weaver because of on active, unlocked joinpoint
1329:            public void testInterfaceMethodEntry_jp_activated_LongD() {
1330:                double obj = 10.1;
1331:
1332:                if (useProse)
1333:                    ProseSystem.getAspectManager().insert(aspect3);
1334:
1335:                startChronometer();
1336:                for (int i = 0; i < RUNS; i++)
1337:                    obInterface.interfaceMethodLongD(obj, obj);
1338:                stopChronometer();
1339:
1340:                if (useProse)
1341:                    ProseSystem.getAspectManager().withdraw(aspect3);
1342:
1343:                if (checkAssert)
1344:                    assertEquals("Hook notifications", RUNS, counter);
1345:            }
1346:
1347:            // 3) INVOKEINTERFACE - call to empty weaver because of on active, unlocked joinpoint
1348:            public void testInterfaceMethodExit_jp_activated_LongD() {
1349:                double obj = 10.1;
1350:
1351:                if (useProse)
1352:                    ProseSystem.getAspectManager().insert(aspect4);
1353:
1354:                startChronometer();
1355:                for (int i = 0; i < RUNS; i++)
1356:                    obInterface.interfaceMethodLongD(obj, obj);
1357:                stopChronometer();
1358:
1359:                if (useProse)
1360:                    ProseSystem.getAspectManager().withdraw(aspect4);
1361:
1362:                if (checkAssert)
1363:                    assertEquals("Hook notifications", RUNS, counter);
1364:            }
1365:
1366:            //=====================================================
1367:            /*    
1368:             // 1) INVOKESTATIC - no call to weaver because the joinpoint isn't activated
1369:             public void testStaticMethod_LongD() 
1370:             {
1371:             double obj = 10.1;
1372:             startChronometer();
1373:             for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodLongD(obj, obj);
1374:             stopChronometer();
1375:             }
1376:             */
1377:            // 3) INVOKESTATIC - call to empty weaver because of on active, unlocked joinpoint
1378:            public void testStaticMethodEntry_jp_activated_LongD() {
1379:                double obj = 10.1;
1380:
1381:                if (useProse)
1382:                    ProseSystem.getAspectManager().insert(aspect3);
1383:
1384:                startChronometer();
1385:                for (int i = 0; i < RUNS; i++)
1386:                    JoinPointTestClass.staticMethodLongD(obj, obj);
1387:                stopChronometer();
1388:
1389:                if (useProse)
1390:                    ProseSystem.getAspectManager().withdraw(aspect3);
1391:
1392:                if (checkAssert)
1393:                    assertEquals("Hook notifications", RUNS, counter);
1394:            }
1395:
1396:            // 3) INVOKESTATIC - call to empty weaver because of on active, unlocked joinpoint
1397:            public void testStaticMethodExit_jp_activated_LongD() {
1398:                double obj = 10.1;
1399:
1400:                if (useProse)
1401:                    ProseSystem.getAspectManager().insert(aspect4);
1402:
1403:                startChronometer();
1404:                for (int i = 0; i < RUNS; i++)
1405:                    JoinPointTestClass.staticMethodLongD(obj, obj);
1406:                stopChronometer();
1407:
1408:                if (useProse)
1409:                    ProseSystem.getAspectManager().withdraw(aspect4);
1410:
1411:                if (checkAssert)
1412:                    assertEquals("Hook notifications", RUNS, counter);
1413:            }
1414:
1415:            //=====================================================
1416:            /*    
1417:             // 1) INVOKESPECIAL - no call to weaver because the joinpoint isn't activated
1418:             public void testSpecialMethod_LongD() 
1419:             {
1420:             double obj = 10.1;
1421:             startChronometer();
1422:             for (int i = 0; i < RUNS; i++) privatelocalMethodLongD(obj, obj);
1423:             stopChronometer();
1424:             }
1425:             */
1426:            // 3) INVOKESPECIAL - call to empty weaver because of on active, unlocked joinpoint
1427:            public void testSpecialMethodEntry_jp_activated_LongD() {
1428:                double obj = 10.1;
1429:
1430:                if (useProse)
1431:                    ProseSystem.getAspectManager().insert(aspect1);
1432:
1433:                startChronometer();
1434:                for (int i = 0; i < RUNS; i++)
1435:                    privatelocalMethodLongD(obj, obj);
1436:                stopChronometer();
1437:
1438:                if (useProse)
1439:                    ProseSystem.getAspectManager().withdraw(aspect1);
1440:
1441:                if (checkAssert)
1442:                    assertEquals("Hook notifications", RUNS, counter);
1443:            }
1444:
1445:            // 3) INVOKESPECIAL - call to empty weaver because of on active, unlocked joinpoint
1446:            public void testSpecialMethodExit_jp_activated_LongD() {
1447:                double obj = 10.1;
1448:
1449:                if (useProse)
1450:                    ProseSystem.getAspectManager().insert(aspect2);
1451:
1452:                startChronometer();
1453:                for (int i = 0; i < RUNS; i++)
1454:                    privatelocalMethodLongD(obj, obj);
1455:                stopChronometer();
1456:
1457:                if (useProse)
1458:                    ProseSystem.getAspectManager().withdraw(aspect2);
1459:
1460:                if (checkAssert)
1461:                    assertEquals("Hook notifications", RUNS, counter);
1462:            }
1463:
1464:            //=====================================================
1465:            //=====================================================    
1466:
1467:            public static Test suite() {
1468:                return new PerformanceTestSuite(
1469:                        JoinPointMeasurements1_micro.class);
1470:            }
1471:
1472:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.