@@ -45,6 +45,33 @@ public abstract class AbstractTimer extends AbstractMeter implements Timer {
4545 @ Nullable
4646 private IntervalEstimator intervalEstimator = null ;
4747
48+ /**
49+ * Creates a new timer.
50+ *
51+ * @param id The timer's name and tags.
52+ * @param clock The clock used to measure latency.
53+ * @param distributionStatisticConfig Configuration determining which distribution statistics are sent.
54+ * @param pauseDetector Compensation for coordinated omission.
55+ * @param baseTimeUnit The time scale of this timer.
56+ * @deprecated Timer implementations should now declare at construction time whether they support aggregable percentiles or not.
57+ * By declaring it up front, Micrometer can memory optimize the histogram structure used to store distribution statistics.
58+ */
59+ @ Deprecated
60+ protected AbstractTimer (Id id , Clock clock , DistributionStatisticConfig distributionStatisticConfig , PauseDetector pauseDetector ,
61+ TimeUnit baseTimeUnit ) {
62+ this (id , clock , distributionStatisticConfig , pauseDetector , baseTimeUnit , false );
63+ }
64+
65+ /**
66+ * Creates a new timer.
67+ *
68+ * @param id The timer's name and tags.
69+ * @param clock The clock used to measure latency.
70+ * @param distributionStatisticConfig Configuration determining which distribution statistics are sent.
71+ * @param pauseDetector Compensation for coordinated omission.
72+ * @param baseTimeUnit The time scale of this timer.
73+ * @param supportsAggregablePercentiles Indicates whether the registry supports percentile approximations from histograms.
74+ */
4875 protected AbstractTimer (Id id , Clock clock , DistributionStatisticConfig distributionStatisticConfig ,
4976 PauseDetector pauseDetector , TimeUnit baseTimeUnit , boolean supportsAggregablePercentiles ) {
5077 super (id );
0 commit comments