O'Reilly logo

Hands-On Enterprise Java Microservices with Eclipse MicroProfile by Scott Stark, Antoine Sabot-Durand, Pavol Loffay, Jeff Mesnil, Heiko W. Rupp, Cesar Saavedra

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Meter

A meter measures the rate at which the decorated method is called over time. For a JAX-RS endpoint, this would be the number of requests per second. Meters can be declared via an annotation:

@GET@Path("/m")@Metered(absolute = true)public String getMetered() {  return "Metered called";}

When a client requests the data from the meter, the server supplies the mean rate, as well as one-, five-, and fifteen-minute moving averages. The latter may be familiar to some readers from the Unix/Linux uptime command.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required