Commit 24000405 authored by bttk's avatar bttk Committed by Commit Bot

metrics: Mark histograms in CachedMetrics as deprecated

Bug: 1046181
Change-Id: If643b47c35736a6ae50af6f4d072f8a54a5b9777
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2018169Reviewed-by: default avatarAlexei Svitkine <asvitkine@chromium.org>
Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Reviewed-by: default avatarEnder <ender@google.com>
Commit-Queue: Alexei Svitkine <asvitkine@chromium.org>
Cr-Commit-Position: refs/heads/master@{#735897}
parent dc717b2c
...@@ -97,7 +97,12 @@ public class CachedMetrics { ...@@ -97,7 +97,12 @@ public class CachedMetrics {
} }
} }
/** Caches a set of integer histogram samples. */ /**
* Caches a set of integer histogram samples.
*
* @deprecated Use {@link RecordHistogram} instead.
*/
@Deprecated
public static class SparseHistogramSample extends CachedMetric { public static class SparseHistogramSample extends CachedMetric {
@GuardedBy("CachedMetric.sMetrics") @GuardedBy("CachedMetric.sMetrics")
private final List<Integer> mSamples = new ArrayList<Integer>(); private final List<Integer> mSamples = new ArrayList<Integer>();
...@@ -131,7 +136,12 @@ public class CachedMetrics { ...@@ -131,7 +136,12 @@ public class CachedMetrics {
} }
} }
/** Caches a set of enumerated histogram samples. */ /**
* Caches a set of enumerated histogram samples.
*
* @deprecated Use {@link RecordHistogram} instead.
*/
@Deprecated
public static class EnumeratedHistogramSample extends CachedMetric { public static class EnumeratedHistogramSample extends CachedMetric {
private final List<Integer> mSamples = new ArrayList<Integer>(); private final List<Integer> mSamples = new ArrayList<Integer>();
private final int mMaxValue; private final int mMaxValue;
...@@ -166,7 +176,12 @@ public class CachedMetrics { ...@@ -166,7 +176,12 @@ public class CachedMetrics {
} }
} }
/** Caches a set of times histogram samples. */ /**
* Caches a set of times histogram samples.
*
* @deprecated Use {@link RecordHistogram} instead.
*/
@Deprecated
public static class TimesHistogramSample extends CachedMetric { public static class TimesHistogramSample extends CachedMetric {
@GuardedBy("CachedMetric.sMetrics") @GuardedBy("CachedMetric.sMetrics")
private final List<Long> mSamples = new ArrayList<Long>(); private final List<Long> mSamples = new ArrayList<Long>();
...@@ -203,7 +218,10 @@ public class CachedMetrics { ...@@ -203,7 +218,10 @@ public class CachedMetrics {
/** /**
* Caches a set of times histogram samples, calls * Caches a set of times histogram samples, calls
* {@link RecordHistogram#recordMediumTimesHistogram(String, long)}. * {@link RecordHistogram#recordMediumTimesHistogram(String, long)}.
*
* @deprecated Use {@link RecordHistogram} instead.
*/ */
@Deprecated
public static class MediumTimesHistogramSample extends TimesHistogramSample { public static class MediumTimesHistogramSample extends TimesHistogramSample {
public MediumTimesHistogramSample(String histogramName) { public MediumTimesHistogramSample(String histogramName) {
super(histogramName); super(histogramName);
...@@ -215,7 +233,12 @@ public class CachedMetrics { ...@@ -215,7 +233,12 @@ public class CachedMetrics {
} }
} }
/** Caches a set of boolean histogram samples. */ /**
* Caches a set of boolean histogram samples.
*
* @deprecated Use {@link RecordHistogram} instead.
*/
@Deprecated
public static class BooleanHistogramSample extends CachedMetric { public static class BooleanHistogramSample extends CachedMetric {
@GuardedBy("CachedMetric.sMetrics") @GuardedBy("CachedMetric.sMetrics")
private final List<Boolean> mSamples = new ArrayList<Boolean>(); private final List<Boolean> mSamples = new ArrayList<Boolean>();
...@@ -252,7 +275,10 @@ public class CachedMetrics { ...@@ -252,7 +275,10 @@ public class CachedMetrics {
/** /**
* Caches a set of custom count histogram samples. * Caches a set of custom count histogram samples.
* Corresponds to UMA_HISTOGRAM_CUSTOM_COUNTS C++ macro. * Corresponds to UMA_HISTOGRAM_CUSTOM_COUNTS C++ macro.
*
* @deprecated Use {@link RecordHistogram} instead.
*/ */
@Deprecated
public static class CustomCountHistogramSample extends CachedMetric { public static class CustomCountHistogramSample extends CachedMetric {
@GuardedBy("CachedMetric.sMetrics") @GuardedBy("CachedMetric.sMetrics")
private final List<Integer> mSamples = new ArrayList<Integer>(); private final List<Integer> mSamples = new ArrayList<Integer>();
...@@ -295,7 +321,10 @@ public class CachedMetrics { ...@@ -295,7 +321,10 @@ public class CachedMetrics {
/** /**
* Caches a set of count histogram samples in range [1, 100). * Caches a set of count histogram samples in range [1, 100).
* Corresponds to UMA_HISTOGRAM_COUNTS_100 C++ macro. * Corresponds to UMA_HISTOGRAM_COUNTS_100 C++ macro.
*
* @deprecated Use {@link RecordHistogram} instead.
*/ */
@Deprecated
public static class Count100HistogramSample extends CustomCountHistogramSample { public static class Count100HistogramSample extends CustomCountHistogramSample {
public Count100HistogramSample(String histogramName) { public Count100HistogramSample(String histogramName) {
super(histogramName, 1, 100, 50); super(histogramName, 1, 100, 50);
...@@ -305,7 +334,10 @@ public class CachedMetrics { ...@@ -305,7 +334,10 @@ public class CachedMetrics {
/** /**
* Caches a set of count histogram samples in range [1, 1000). * Caches a set of count histogram samples in range [1, 1000).
* Corresponds to UMA_HISTOGRAM_COUNTS_1000 C++ macro. * Corresponds to UMA_HISTOGRAM_COUNTS_1000 C++ macro.
*
* @deprecated Use {@link RecordHistogram} instead.
*/ */
@Deprecated
public static class Count1000HistogramSample extends CustomCountHistogramSample { public static class Count1000HistogramSample extends CustomCountHistogramSample {
public Count1000HistogramSample(String histogramName) { public Count1000HistogramSample(String histogramName) {
super(histogramName, 1, 1000, 50); super(histogramName, 1, 1000, 50);
...@@ -315,7 +347,10 @@ public class CachedMetrics { ...@@ -315,7 +347,10 @@ public class CachedMetrics {
/** /**
* Caches a set of count histogram samples in range [1, 1000000). * Caches a set of count histogram samples in range [1, 1000000).
* Corresponds to UMA_HISTOGRAM_COUNTS_1M C++ macro. * Corresponds to UMA_HISTOGRAM_COUNTS_1M C++ macro.
*
* @deprecated Use {@link RecordHistogram} instead.
*/ */
@Deprecated
public static class Count1MHistogramSample extends CustomCountHistogramSample { public static class Count1MHistogramSample extends CustomCountHistogramSample {
public Count1MHistogramSample(String histogramName) { public Count1MHistogramSample(String histogramName) {
super(histogramName, 1, 1000000, 50); super(histogramName, 1, 1000000, 50);
...@@ -324,7 +359,10 @@ public class CachedMetrics { ...@@ -324,7 +359,10 @@ public class CachedMetrics {
/** /**
* Caches a set of linear count histogram samples. * Caches a set of linear count histogram samples.
*
* @deprecated Use {@link RecordHistogram} instead.
*/ */
@Deprecated
public static class LinearCountHistogramSample extends CustomCountHistogramSample { public static class LinearCountHistogramSample extends CustomCountHistogramSample {
public LinearCountHistogramSample(String histogramName, int min, int max, int numBuckets) { public LinearCountHistogramSample(String histogramName, int min, int max, int numBuckets) {
super(histogramName, min, max, numBuckets); super(histogramName, min, max, numBuckets);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment