Browse Source

Removing dropwizard resource timing

Jamie Furness 11 years ago
parent
commit
15185c9861

+ 0 - 2
dropwizard/src/main/java/com/example/helloworld/resources/FortuneResource.java

@@ -1,6 +1,5 @@
 package com.example.helloworld.resources;
 package com.example.helloworld.resources;
 
 
-import com.codahale.metrics.annotation.Timed;
 import com.example.helloworld.db.FortuneDAO;
 import com.example.helloworld.db.FortuneDAO;
 import com.example.helloworld.db.model.Fortune;
 import com.example.helloworld.db.model.Fortune;
 import com.example.helloworld.resources.views.FortuneView;
 import com.example.helloworld.resources.views.FortuneView;
@@ -25,7 +24,6 @@ public class FortuneResource {
     }
     }
 
 
     @GET
     @GET
-    @Timed
     @UnitOfWork
     @UnitOfWork
     public FortuneView dbTest() {
     public FortuneView dbTest() {
         final List<Fortune> fortunes = Lists.newArrayListWithExpectedSize(32);
         final List<Fortune> fortunes = Lists.newArrayListWithExpectedSize(32);

+ 0 - 2
dropwizard/src/main/java/com/example/helloworld/resources/JsonResource.java

@@ -1,6 +1,5 @@
 package com.example.helloworld.resources;
 package com.example.helloworld.resources;
 
 
-import com.codahale.metrics.annotation.Timed;
 import com.example.helloworld.resources.api.HelloMessage;
 import com.example.helloworld.resources.api.HelloMessage;
 
 
 import javax.ws.rs.GET;
 import javax.ws.rs.GET;
@@ -13,7 +12,6 @@ import javax.ws.rs.core.MediaType;
 public class JsonResource {
 public class JsonResource {
 
 
     @GET
     @GET
-    @Timed
     public HelloMessage sayHello() {
     public HelloMessage sayHello() {
         return new HelloMessage("Hello, World!");
         return new HelloMessage("Hello, World!");
     }
     }

+ 0 - 3
dropwizard/src/main/java/com/example/helloworld/resources/TextResource.java

@@ -1,7 +1,5 @@
 package com.example.helloworld.resources;
 package com.example.helloworld.resources;
 
 
-import com.codahale.metrics.annotation.Timed;
-
 import javax.ws.rs.GET;
 import javax.ws.rs.GET;
 import javax.ws.rs.Path;
 import javax.ws.rs.Path;
 import javax.ws.rs.Produces;
 import javax.ws.rs.Produces;
@@ -12,7 +10,6 @@ import javax.ws.rs.core.MediaType;
 public class TextResource {
 public class TextResource {
 
 
     @GET
     @GET
-    @Timed
     public String sayHello() {
     public String sayHello() {
         return "Hello, World!";
         return "Hello, World!";
     }
     }

+ 1 - 4
dropwizard/src/main/java/com/example/helloworld/resources/WorldResource.java

@@ -1,8 +1,7 @@
 package com.example.helloworld.resources;
 package com.example.helloworld.resources;
 
 
-import com.codahale.metrics.annotation.Timed;
-import com.example.helloworld.db.model.World;
 import com.example.helloworld.db.WorldDAO;
 import com.example.helloworld.db.WorldDAO;
+import com.example.helloworld.db.model.World;
 import com.google.common.base.Optional;
 import com.google.common.base.Optional;
 import io.dropwizard.hibernate.UnitOfWork;
 import io.dropwizard.hibernate.UnitOfWork;
 
 
@@ -26,7 +25,6 @@ public class WorldResource {
     }
     }
 
 
     @GET
     @GET
-    @Timed
     @UnitOfWork
     @UnitOfWork
     public World[] dbTest(@QueryParam("queries") Optional<Integer> queries) {
     public World[] dbTest(@QueryParam("queries") Optional<Integer> queries) {
         final int totalQueries = queries.or(1); // TODO: Should be bound [1,500]
         final int totalQueries = queries.or(1); // TODO: Should be bound [1,500]
@@ -42,7 +40,6 @@ public class WorldResource {
     }
     }
 
 
     @GET
     @GET
-    @Timed
     @Path("/update")
     @Path("/update")
     @UnitOfWork
     @UnitOfWork
     public World[] updateTest(@QueryParam("queries") Optional<Integer> queries) {
     public World[] updateTest(@QueryParam("queries") Optional<Integer> queries) {