From 4fd9661ebad40319729570b9914bd95f6dbc13c1 Mon Sep 17 00:00:00 2001 From: Andrei Ivanov Date: Thu, 25 May 2017 00:27:29 +0300 Subject: [PATCH] completely removed intern --- pom.xml | 2 +- src/main/java/net/iponweb/disthene/bean/Metric.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 34fcaeb..23de02a 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ net.iponweb.disthene disthene jar - 0.1.13.iow + 0.1.14.iow disthene http://maven.apache.org diff --git a/src/main/java/net/iponweb/disthene/bean/Metric.java b/src/main/java/net/iponweb/disthene/bean/Metric.java index 356826d..48ebb2c 100644 --- a/src/main/java/net/iponweb/disthene/bean/Metric.java +++ b/src/main/java/net/iponweb/disthene/bean/Metric.java @@ -14,9 +14,9 @@ public Metric(String input, Rollup rollup) { String[] splitInput = input.split("\\s"); // We were interning tenant and path here - we are going to store them all (or almost so) constantly anyhow in multiple places // In fact this also work for a moderate metrics stream. Once we start receiving 10s of millions different metrics, it tends to degrade quite a bit - // So, leaving this only for tenant + // So, removing all intern calls here this.key = new MetricKey( - splitInput.length >=4 ? splitInput[3].intern() : "NONE", + splitInput.length >=4 ? splitInput[3] : "NONE", splitInput[0], rollup.getRollup(), rollup.getPeriod(),