eclipse / microprofile-metrics

microprofile-metrics
Apache License 2.0
100 stars 66 forks source link

Need to clarify what units are used for each method in Timer / SimpleTimer class in javadoc #520

Open donbourne opened 4 years ago

donbourne commented 4 years ago

calling Timer's getSnapshot returns a Snapshot with lots of values, but it's not obvious from the javadoc which time unit is used for those values.

Emily-Jiang commented 4 years ago

ChronoUnit (Java 8) should be used insted of TimeUnit (Java 5). We discussed in the past on the mailinglist and settled on the new java.time.ChronoUnit, which was better designed. Here is another nice article about why ChronoUnit is better than TimeUnit. In other specs such as Fault Tolerance, Config briefly, etc, we used ChronoUnit.