Skip to content

Commit 749066c

Browse files
committed
some cleanups
1 parent e7b7ebd commit 749066c

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

checkstyle.xml

-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ page at http://checkstyle.sourceforge.net/config.html -->
8686
<property name="allowMissingReturnTag" value="true"/>
8787
<property name="allowMissingThrowsTags" value="true"/>
8888
<property name="allowThrowsTagsForSubclasses" value="true"/>
89-
<property name="allowUndeclaredRTE" value="true"/>
9089
</module>
9190

9291
<module name="JavadocType">

gradlew

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
#
4-
# Copyright © 2015-2021 the original authors.
4+
# Copyright © 2015-2021 the original authors.
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
77
# you may not use this file except in compliance with the License.
@@ -32,10 +32,10 @@
3232
# Busybox and similar reduced shells will NOT work, because this script
3333
# requires all of these POSIX shell features:
3434
# * functions;
35-
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
36-
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
37-
# * compound commands having a testable exit status, especially «case»;
38-
# * various built-in commands including «command», «set», and «ulimit».
35+
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
36+
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
37+
# * compound commands having a testable exit status, especially «case»;
38+
# * various built-in commands including «command», «set», and «ulimit».
3939
#
4040
# Important for patching:
4141
#

src/main/java/org/compuscene/metrics/prometheus/PrometheusMetricsCollector.java

+6-5
Original file line numberDiff line numberDiff line change
@@ -861,11 +861,12 @@ private void updateOsMetrics(OsStats os) {
861861
}
862862

863863
if (os.getMem() != null) {
864-
catalog.setNodeGauge("os_mem_free_bytes", os.getMem().getFree().getBytes());
865-
catalog.setNodeGauge("os_mem_free_percent", os.getMem().getFreePercent());
866-
catalog.setNodeGauge("os_mem_used_bytes", os.getMem().getUsed().getBytes());
867-
catalog.setNodeGauge("os_mem_used_percent", os.getMem().getUsedPercent());
868-
catalog.setNodeGauge("os_mem_total_bytes", os.getMem().getTotal().getBytes());
864+
final var mem = os.getMem();
865+
catalog.setNodeGauge("os_mem_free_bytes", mem.getFree().getBytes());
866+
catalog.setNodeGauge("os_mem_free_percent", mem.getFreePercent());
867+
catalog.setNodeGauge("os_mem_used_bytes", mem.getUsed().getBytes());
868+
catalog.setNodeGauge("os_mem_used_percent", mem.getUsedPercent());
869+
catalog.setNodeGauge("os_mem_total_bytes", mem.getTotal().getBytes());
869870
}
870871

871872
if (os.getSwap() != null) {

0 commit comments

Comments
 (0)