aop benchmark
1、性能测试的aop或代理框架
(1)字节码框架
l aspectwerkz 1.0
l aspectwerkz 2.x
l aspectj 1.2
l jboss aop 1.0
(2)代理框架
l spring aop 1.1.1
l cglib proxy 2.0.2
l dynaop 1.0beta
(3)aspectwerkz可扩展aspect容器
l aspectj
l aop alliance
l spring aop
2、性能测试结果
awbench (ns/invocation) | aspect werkz2.x | awproxy | aspect werkz1.0 | aspectj | jboss | spring | dynaop | cglib | ext: aopalliance | ext: spring | ext: aspectj |
before, args() target() | 10 | 25 | 606 | 10 | 220 | 355 | 390 | 145 | - | 220 | - |
around x 2, args() target() | 80 | 85 | 651 | 50 | 290 | 436 | 455 | 155 | 465 | 476 | - |
before | 15 | 20 | 520 | 15 | 145 | 275 | 320 | 70 | - | 40 | 10 |
before, static info access | 30 | 30 | 501 | 25 | 175 | 275 | 330 | 70 | | 35 | |
before, rtti info access | 50 | 55 | 535 | 50 | 175 | 275 | 335 | 75 | | 35 | |
after returning | 10 | 20 | 541 | 10 | 135 | 285 | 315 | 85 | - | 45 | 15 |
after throwing | 3540 | 3870 | 6103 | 3009 | 5032 | | 6709 | 8127 | | - | 3460 |
before + after | 20 | 30 | 511 | 20 | 160 | 445 | 345 | 80 | - | 35 | 20 |
before, args() primitives | 10 | 20 | 555 |
扫描关注微信公众号 |
闽公网安备 35060202000074号