Skip to content

Commit

Permalink
Use comment suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
Channyboy committed Aug 18, 2022
1 parent 35b4e1b commit ef7dfda
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions api/src/main/java/org/eclipse/microprofile/metrics/Timer.java
Expand Up @@ -28,8 +28,6 @@

/**
* A timer metric which aggregates timing durations and provides duration statistics
*
* The timer measures duration in seconds.
*/
public interface Timer extends Metric, Sampling {
/**
Expand Down
Expand Up @@ -121,7 +121,7 @@
/**
* The unit of the timer.
*
* @return The unit of the timer. By default, the value is {@link MetricUnits#SECONDS}.
* @return The unit of the timer. By default, the value is {@link MetricUnits#NANOSECONDS}.
*
* @see org.eclipse.microprofile.metrics.Metadata
* @see org.eclipse.microprofile.metrics.MetricUnits
Expand Down
6 changes: 3 additions & 3 deletions spec/src/main/asciidoc/app-programming-model.adoc
Expand Up @@ -99,11 +99,11 @@ The following Annotations exist, see below for common fields:
|@Counted | M, C, T | Denotes a counter, which counts the invocations of the annotated object. | MetricUnits.NONE
|@Gauge | M | Denotes a gauge, which samples the value of the annotated object. | _no default_, must be supplied by the user
|@Metric | F, P | An annotation that contains the metadata information when requesting a metric to be injected. | MetricUnits.NONE
|@Timed | M, C, T | Denotes a timer, which tracks duration of the annotated object. | MetricUnits.SECONDS
|@Timed | M, C, T | Denotes a timer, which tracks duration of the annotated object. | MetricUnits.NANOSECONDS^1^
|===
(C=Constructor, F=Field, M=Method, P=Parameter, T=Type)

(C=Constructor, F=Field, M=Method, P=Parameter, T=Type)

^1^ Prometheus output will always display timer values in _seconds_. When using the `Timer` API to retrieve the `Snapshot`, the values returned from the `Snapshot` will be in nanoseconds.
[cols="1,3,2"]
|===
|Annotation | Description | Default
Expand Down

0 comments on commit ef7dfda

Please sign in to comment.