@@ -107,7 +107,7 @@ public class NodeHealth { | |||
} | |||
public String getProcessCpuPercent() { | |||
return formatPercent(Long.valueOf(cpuPercent), 100L); | |||
return formatPercent(cpuPercent, 100L); | |||
} | |||
void setOpenFiles(long avgOpenFileDescriptors) { | |||
@@ -175,6 +175,10 @@ public class NodeHealth { | |||
// Uptime | |||
setJvmUptimeMillis(nodesStats.getJvm().getUptime().getMillis()); | |||
initPerformanceStats(nodesStats); | |||
} | |||
private void initPerformanceStats(NodeStats nodesStats) { | |||
// Performance Stat | |||
performanceStats = new ArrayList<Performance>(); | |||
@@ -249,13 +253,13 @@ public class NodeHealth { | |||
.setValue(filterCacheEviction)); | |||
} | |||
static public class Performance { | |||
public static class Performance { | |||
public static enum Status { | |||
OK, WARN, ERROR | |||
} | |||
final private String name; | |||
private final String name; | |||
private String message; | |||
private double value; | |||
private double warnThreshold; |
@@ -84,7 +84,7 @@ public class QualityGateProvider extends ProviderAdapter { | |||
private QualityGate fetch(String qualityGateSetting, ServerClient client, MetricFinder metricFinder) { | |||
String jsonText = null; | |||
try { | |||
long qGateId = Long.valueOf(qualityGateSetting); | |||
long qGateId = Long.parseLong(qualityGateSetting); | |||
jsonText = client.request(SHOW_URL + "?id=" + qGateId, false); | |||
} catch (NumberFormatException configIsNameInsteadOfId) { | |||
jsonText = client.request(SHOW_URL + "?name=" + qualityGateSetting, false); |
@@ -86,7 +86,7 @@ public class QualityGateConditionDto { | |||
private long metricId; | |||
private transient String metricKey; | |||
private String metricKey; | |||
private Integer period; | |||
@@ -62,12 +62,12 @@ class HtmlBlockquoteChannel extends Channel<MarkdownOutput> { | |||
private class QuotedLineElementChannel extends RegexChannel<MarkdownOutput> { | |||
protected QuotedLineElementChannel() { | |||
private QuotedLineElementChannel() { | |||
super(">\\s[^\r\n]*+"); | |||
} | |||
@Override | |||
protected void consume(CharSequence token, MarkdownOutput output) { | |||
public void consume(CharSequence token, MarkdownOutput output) { | |||
if (!pendingBlockConstruction) { | |||
output.append("<blockquote>"); | |||
pendingBlockConstruction = true; | |||
@@ -101,7 +101,7 @@ class HtmlBlockquoteChannel extends Channel<MarkdownOutput> { | |||
} | |||
@Override | |||
protected void consume(CharSequence token, MarkdownOutput output) { | |||
public void consume(CharSequence token, MarkdownOutput output) { | |||
output.append(token); | |||
} | |||
} |