aboutsummaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorMayur Kale <mayurkale@google.com>2018-11-06 17:44:42 -0800
committerGitHub <noreply@github.com>2018-11-06 17:44:42 -0800
commita549400480890496a3600fb9cc9c1d27724e660c (patch)
tree014c9ef42a8f13a6d1087cbbd7e8ee16496b669a /api
parenta11f47b0b3418f5a51c9ebc21abe82670aef77d7 (diff)
downloadplatform_external_opencensus-java-a549400480890496a3600fb9cc9c1d27724e660c.tar.gz
platform_external_opencensus-java-a549400480890496a3600fb9cc9c1d27724e660c.tar.bz2
platform_external_opencensus-java-a549400480890496a3600fb9cc9c1d27724e660c.zip
Add @return and remove already done TODO (#1564)
Diffstat (limited to 'api')
-rw-r--r--api/src/main/java/io/opencensus/metrics/MetricRegistry.java4
-rw-r--r--api/src/test/java/io/opencensus/metrics/DerivedDoubleGaugeTest.java1
-rw-r--r--api/src/test/java/io/opencensus/metrics/DerivedLongGaugeTest.java1
-rw-r--r--api/src/test/java/io/opencensus/metrics/DoubleGaugeTest.java2
-rw-r--r--api/src/test/java/io/opencensus/metrics/LongGaugeTest.java2
5 files changed, 4 insertions, 6 deletions
diff --git a/api/src/main/java/io/opencensus/metrics/MetricRegistry.java b/api/src/main/java/io/opencensus/metrics/MetricRegistry.java
index b215778b..c4426c62 100644
--- a/api/src/main/java/io/opencensus/metrics/MetricRegistry.java
+++ b/api/src/main/java/io/opencensus/metrics/MetricRegistry.java
@@ -39,6 +39,7 @@ public abstract class MetricRegistry {
* @param description the description of the metric.
* @param unit the unit of the metric.
* @param labelKeys the list of the label keys.
+ * @return a {@code LongGauge}.
* @throws NullPointerException if {@code labelKeys} is null OR any element of {@code labelKeys}
* is null OR {@code name}, {@code description}, {@code unit} is null.
* @throws IllegalArgumentException if different metric with the same name already registered.
@@ -56,6 +57,7 @@ public abstract class MetricRegistry {
* @param description the description of the metric.
* @param unit the unit of the metric.
* @param labelKeys the list of the label keys.
+ * @return a {@code DoubleGauge}.
* @throws NullPointerException if {@code labelKeys} is null OR any element of {@code labelKeys}
* is null OR {@code name}, {@code description}, {@code unit} is null.
* @throws IllegalArgumentException if different metric with the same name already registered.
@@ -73,6 +75,7 @@ public abstract class MetricRegistry {
* @param description the description of the metric.
* @param unit the unit of the metric.
* @param labelKeys the list of the label keys.
+ * @return a {@code DerivedLongGauge}.
* @throws NullPointerException if {@code labelKeys} is null OR any element of {@code labelKeys}
* is null OR {@code name}, {@code description}, {@code unit} is null.
* @throws IllegalArgumentException if different metric with the same name already registered.
@@ -90,6 +93,7 @@ public abstract class MetricRegistry {
* @param description the description of the metric.
* @param unit the unit of the metric.
* @param labelKeys the list of the label keys.
+ * @return a {@code DerivedDoubleGauge}.
* @throws NullPointerException if {@code labelKeys} is null OR any element of {@code labelKeys}
* is null OR {@code name}, {@code description}, {@code unit} is null.
* @throws IllegalArgumentException if different metric with the same name already registered.
diff --git a/api/src/test/java/io/opencensus/metrics/DerivedDoubleGaugeTest.java b/api/src/test/java/io/opencensus/metrics/DerivedDoubleGaugeTest.java
index 0077dccf..a49f76c1 100644
--- a/api/src/test/java/io/opencensus/metrics/DerivedDoubleGaugeTest.java
+++ b/api/src/test/java/io/opencensus/metrics/DerivedDoubleGaugeTest.java
@@ -27,7 +27,6 @@ import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
/** Unit tests for {@link DerivedDoubleGauge}. */
-// TODO(mayurkale): Add more tests, once DerivedDoubleGauge plugs-in into the registry.
@RunWith(JUnit4.class)
public class DerivedDoubleGaugeTest {
@Rule public ExpectedException thrown = ExpectedException.none();
diff --git a/api/src/test/java/io/opencensus/metrics/DerivedLongGaugeTest.java b/api/src/test/java/io/opencensus/metrics/DerivedLongGaugeTest.java
index d257eeb2..c7a674a9 100644
--- a/api/src/test/java/io/opencensus/metrics/DerivedLongGaugeTest.java
+++ b/api/src/test/java/io/opencensus/metrics/DerivedLongGaugeTest.java
@@ -27,7 +27,6 @@ import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
/** Unit tests for {@link DerivedLongGauge}. */
-// TODO(mayurkale): Add more tests, once DerivedLongGauge plugs-in into the registry.
@RunWith(JUnit4.class)
public class DerivedLongGaugeTest {
@Rule public ExpectedException thrown = ExpectedException.none();
diff --git a/api/src/test/java/io/opencensus/metrics/DoubleGaugeTest.java b/api/src/test/java/io/opencensus/metrics/DoubleGaugeTest.java
index d97af5ba..72436c05 100644
--- a/api/src/test/java/io/opencensus/metrics/DoubleGaugeTest.java
+++ b/api/src/test/java/io/opencensus/metrics/DoubleGaugeTest.java
@@ -42,8 +42,6 @@ public class DoubleGaugeTest {
private static final List<LabelKey> EMPTY_LABEL_KEYS = new ArrayList<LabelKey>();
private static final List<LabelValue> EMPTY_LABEL_VALUES = new ArrayList<LabelValue>();
- // TODO(mayurkale): Add more tests, once DoubleGauge plugs-in into the registry.
-
@Test
public void noopGetOrCreateTimeSeries_WithNullLabelValues() {
DoubleGauge doubleGauge =
diff --git a/api/src/test/java/io/opencensus/metrics/LongGaugeTest.java b/api/src/test/java/io/opencensus/metrics/LongGaugeTest.java
index c0954090..353534ac 100644
--- a/api/src/test/java/io/opencensus/metrics/LongGaugeTest.java
+++ b/api/src/test/java/io/opencensus/metrics/LongGaugeTest.java
@@ -42,8 +42,6 @@ public class LongGaugeTest {
private static final List<LabelKey> EMPTY_LABEL_KEYS = new ArrayList<LabelKey>();
private static final List<LabelValue> EMPTY_LABEL_VALUES = new ArrayList<LabelValue>();
- // TODO(mayurkale): Add more tests, once LongGauge plugs-in into the registry.
-
@Test
public void noopGetOrCreateTimeSeries_WithNullLabelValues() {
LongGauge longGauge = LongGauge.newNoopLongGauge(NAME, DESCRIPTION, UNIT, EMPTY_LABEL_KEYS);