You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using dropwizard with spring boot actuator the timers are in milliseconds. For timings that are less than 1 ms the values are always 0 since the output is an integer and the value is truncated. Please change the output to a floating point value.
Test code:
@RestController
public class DWController {
private MetricRegistry registry;
@Autowired
public DWController(MetricRegistry registry) {
this.registry = registry;
}
@RequestMapping("/foo/{count}")
public String foo(@PathVariable("count") int count) {
Timer timer = registry.timer("fooTimer");
Timer.Context ctx = timer.time();
// do something that will take < 1 millisecond
for (int i = 0; i < count; ++i) {
double d = Math.pow(i, 10);
}
long t = ctx.stop();
return "" + t;
}
}
When using dropwizard with spring boot actuator the timers are in milliseconds. For timings that are less than 1 ms the values are always 0 since the output is an integer and the value is truncated. Please change the output to a floating point value.
Test code:
Exercising the code:
several times results in:
The text was updated successfully, but these errors were encountered: