Skip to content

Commit

Permalink
[JENKINS-22791] removed unused parameter and redundant line
Browse files Browse the repository at this point in the history
  • Loading branch information
escoem committed Oct 23, 2017
1 parent 42fae57 commit 2563101
Showing 1 changed file with 4 additions and 5 deletions.
Expand Up @@ -58,21 +58,20 @@ public void addContents(@NonNull Container result) {
new Content("nodes/master/heap-histogram.txt") {
@Override
public void writeTo(OutputStream os) throws IOException {
os.write(getLiveHistogram(Jenkins.getInstance()).getBytes("UTF-8"));
os.write(getLiveHistogram().getBytes("UTF-8"));
}
}
);
}

private String getLiveHistogram(Node node) throws IOException {
private String getLiveHistogram() throws IOException {
final String raw = getRawLiveHistogram();
final String[] lines = raw.split("\n");
final int limit = MAX <= lines.length ? MAX : lines.length;

final StringBuilder bos = new StringBuilder();

bos.append("Master Heap Histogram");
for (int i=0; i<limit; i++) {
//starting in 1 because of an empty line
for (int i=1; i<limit; i++) {
bos.append(lines[i]).append('\n');
}

Expand Down

0 comments on commit 2563101

Please sign in to comment.