From 6b859073516ece93d715d7d09150380093f7fb78 Mon Sep 17 00:00:00 2001 From: JiaShuo Date: Mon, 8 Jun 2020 19:00:22 +0800 Subject: [PATCH] refactor --- pom.xml | 28 ++++++++++++++++++- .../pegasus/metrics/PrometheusCollector.java | 4 +-- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index e37ee80d..83c9feed 100644 --- a/pom.xml +++ b/pom.xml @@ -4,8 +4,24 @@ com.xiaomi.infra pegasus-client jar - 1.12-thrift-0.11.0-inlined-SNAPSHOT + 1.12-thrift-for-perf-0.11.0-inlined-SNAPSHOT Pegasus Java Client + + + + archiva.internal + Internal Release Repository + http://nexus.d.xiaomi.net/nexus/content/repositories/releases/ + + + + archiva.snapshots + Internal Snapshot Repository + http://nexus.d.xiaomi.net/nexus/content/repositories/snapshots/ + + + + org.junit.jupiter @@ -80,6 +96,16 @@ javax.annotation-api 1.3.2 + + io.prometheus + simpleclient + 0.4.0 + + + io.prometheus + simpleclient_httpserver + 0.4.0 + diff --git a/src/main/java/com/xiaomi/infra/pegasus/metrics/PrometheusCollector.java b/src/main/java/com/xiaomi/infra/pegasus/metrics/PrometheusCollector.java index 48ed967f..a2beafab 100644 --- a/src/main/java/com/xiaomi/infra/pegasus/metrics/PrometheusCollector.java +++ b/src/main/java/com/xiaomi/infra/pegasus/metrics/PrometheusCollector.java @@ -67,9 +67,9 @@ private void updateLatencyMetric( Map labels = getLabel(getTableTag(name, defaultTags)); Snapshot snapshot = meter.getValue().getSnapshot(); updateLatencyMetric( - formatLatencyMetricName(name, "_p99"), snapshot.get99thPercentile(), labels, builder); + formatLatencyMetricName(name, "p99"), snapshot.get99thPercentile(), labels, builder); updateLatencyMetric( - formatLatencyMetricName(name, "_p999"), snapshot.get999thPercentile(), labels, builder); + formatLatencyMetricName(name, "p999"), snapshot.get999thPercentile(), labels, builder); } private void updateLatencyMetric(