Skip to content
This repository was archived by the owner on Dec 23, 2023. It is now read-only.

Commit fe3c4fe

Browse files
author
Dino Oliva
committed
Moves CensusRunner example to a different package to verify visibility/usage.
1 parent f6f1f30 commit fe3c4fe

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ java_library(
2323
java_binary(
2424
name = "CensusRunner",
2525
srcs = ["examples/java/com/google/census/CensusRunner.java"],
26-
main_class = "com.google.census.CensusRunner",
26+
main_class = "com.google.census.examples.CensusRunner",
2727
deps = [
2828
":census-core",
2929
":census-core_native",

examples/java/com/google/census/CensusRunner.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,15 @@
2929
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3030
*/
3131

32-
package com.google.census;
32+
package com.google.census.examples;
33+
34+
import com.google.census.Census;
35+
import com.google.census.CensusContext;
36+
import com.google.census.CensusScope;
37+
import com.google.census.MetricMap;
38+
import com.google.census.MetricName;
39+
import com.google.census.TagKey;
40+
import com.google.census.TagValue;
3341

3442
public class CensusRunner {
3543
private static final TagKey K1 = new TagKey("k1");
@@ -53,7 +61,6 @@ public static void main(String args[]) {
5361
CensusContext context1 = Census.getDefault().with(K1, V1, K2, V2);
5462
System.out.println(" Current Tags: " + Census.getCurrent());
5563
System.out.println(" Current == Default + tags1: " + Census.getCurrent().equals(context1));
56-
TagMap tags2 = TagMap.of();
5764
try (CensusScope scope2 = CensusScope.of(K3, V3, K4, V4)) {
5865
CensusContext context2 = context1.with(K3, V3, K4, V4);
5966
System.out.println(" Current Tags: " + Census.getCurrent());

0 commit comments

Comments
 (0)