Revision: 576c64b182
Author: Paul Smith <psm...@apache.org>
Date: Sun Feb 20 18:18:39 2011
Log: Create a new Annotation for marking for Profiling instead of having
it...
http://code.google.com/p/parfait/source/detail?r=576c64b182
Revision: cbb0afa1b6
Author: Paul Smith <psm...@apache.org>
Date: Sun Feb 20 18:44:03 2011
Log: whoops forgot to commit this
http://code.google.com/p/parfait/source/detail?r=cbb0afa1b6
==============================================================================
Revision: 576c64b182
Author: Paul Smith <psm...@apache.org>
Date: Sun Feb 20 18:18:39 2011
Log: Create a new Annotation for marking for Profiling instead of having it
only Test scoped so we can use it in real life.
http://code.google.com/p/parfait/source/detail?r=576c64b182
Added:
/parfait-spring/src/main/java/com/custardsource/parfait/spring/Profiled.java
Deleted:
/parfait-spring/src/test/java/com/custardsource/parfait/spring/TestAnnotation.java
Modified:
/parfait-spring/src/test/resources/test.xml
=======================================
--- /dev/null
+++
/parfait-spring/src/main/java/com/custardsource/parfait/spring/Profiled.java
Sun Feb 20 18:18:39 2011
@@ -0,0 +1,9 @@
+package com.custardsource.parfait.spring;
+
+import java.lang.annotation.*;
+
+@Inherited
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ElementType.METHOD, ElementType.TYPE})
+public @interface Profiled {
+}
=======================================
---
/parfait-spring/src/test/java/com/custardsource/parfait/spring/TestAnnotation.java
Thu Sep 10 04:25:07 2009
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.custardsource.parfait.spring;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Inherited
-@Retention(RetentionPolicy.RUNTIME)
-@Target({ElementType.METHOD, ElementType.TYPE})
-public @interface TestAnnotation {
-
-}
=======================================
--- /parfait-spring/src/test/resources/test.xml Sat Feb 19 18:20:54 2011
+++ /parfait-spring/src/test/resources/test.xml Sun Feb 20 18:18:39 2011
@@ -30,7 +30,7 @@
<aop:config>
<aop:aspect ref="profiler">
<aop:pointcut id="profiledMethods"
-
expression="@within(com.custardsource.parfait.spring.TestAnnotation)
&& @annotation(com.custardsource.parfait.spring.TestAnnotation)"/>
+
expression="@within(com.custardsource.parfait.spring.Profiled) &&
@annotation(com.custardsource.parfait.spring.Profiled)"/>
<aop:around pointcut-ref="profiledMethods"
method="profileMethod"/>
</aop:aspect>
</aop:config>
==============================================================================
Revision: cbb0afa1b6
Author: Paul Smith <psm...@apache.org>
Date: Sun Feb 20 18:44:03 2011
Log: whoops forgot to commit this
http://code.google.com/p/parfait/source/detail?r=cbb0afa1b6
Modified:
/parfait-spring/src/test/java/com/custardsource/parfait/spring/DelayingBean.java
=======================================
---
/parfait-spring/src/test/java/com/custardsource/parfait/spring/DelayingBean.java
Thu Sep 10 04:25:07 2009
+++
/parfait-spring/src/test/java/com/custardsource/parfait/spring/DelayingBean.java
Sun Feb 20 18:44:03 2011
@@ -2,7 +2,7 @@
import java.util.Random;
-@TestAnnotation
+@Profiled
public class DelayingBean {
private final int delay;
@@ -10,7 +10,7 @@
this.delay = new Random().nextInt(100);
}
- @TestAnnotation
+ @Profiled
public void doThing() {
try {
Thread.sleep(delay);