use of org.eclipse.microprofile.metrics.Histogram in project wildfly by wildfly.
the class MicroProfileMetricsHistogramResource method hello.
@GET
@Path("/hello/{n}")
public Response hello(@PathParam("n") String n) {
Metadata histogramMetadata = Metadata.builder().withName("helloHistogram").withType(MetricType.HISTOGRAM).build();
Histogram histogram = registry.histogram(histogramMetadata);
histogram.update(Long.valueOf(n));
return Response.ok("Hello World!").build();
}
Aggregations