This repository was archived by the owner on May 24, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0db4d6f
commit db4ab8e
Showing
12 changed files
with
340 additions
and
9 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
//config | ||
var host = "http://localhost:9000"; | ||
|
||
loadGarbageUpdates(); | ||
//update garbage stats every 30 seconds | ||
setInterval(function() { | ||
loadGarbageUpdates(); | ||
}, 30000); | ||
|
||
function loadGarbageUpdates() { | ||
console.log("Downloading latest garbage collection stats..."); | ||
|
||
$.getJSON(host + "/gc", function(result) { | ||
console.log("Updating GC stats..."); | ||
$("#totalGCEvents").text(result.totalGCEvents); | ||
$("#maxHeapOccupancy").text(result.maxHeapOccupancy + "K"); | ||
$("#maxHeapSpace").text(result.maxHeapSpace + "K"); | ||
$("#maxPermMetaspaceOccupancy").text(result.maxPermMetaspaceOccupancy + "K"); | ||
$("#maxPermMetaspaceSpace").text(result.maxPermMetaspaceSpace + "K"); | ||
$("#GCThroughput").text(result.gcthroughput + "%"); | ||
$("#GCMaxPause").text(moment.duration(result.gcmaxPause).asSeconds() + " seconds"); | ||
$("#GCTotalPause").text(moment.duration(result.gctotalPause).asSeconds() + " seconds"); | ||
$("#stoppedTimeThroughput").text(result.stoppedTimeThroughput + "%"); | ||
$("#stoppedTimeMaxPause").text(moment.duration(result.stoppedTimeMaxPause).asSeconds() + " seconds"); | ||
$("#stoppedTimeTotal").text(moment.duration(result.stoppedTimeTotal).asSeconds() + " seconds"); | ||
$("#GCStoppedRatio").text(result.gcstoppedRatio + "%"); | ||
}).always(function(result) { | ||
//todo: anything? | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
119 changes: 119 additions & 0 deletions
119
src/main/java/com/codebrig/jvmmechanic/dashboard/GarbageCollectionReport.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
package com.codebrig.jvmmechanic.dashboard; | ||
|
||
/** | ||
* todo: this | ||
* | ||
* @author Brandon Fergerson <[email protected]> | ||
*/ | ||
public class GarbageCollectionReport { | ||
|
||
private int totalGCEvents; | ||
private int maxHeapOccupancy; | ||
private int maxHeapSpace; | ||
private int maxPermMetaspaceOccupancy; | ||
private int maxPermMetaspaceSpace; | ||
private double GCThroughput; | ||
private double GCMaxPause; | ||
private double GCTotalPause; | ||
private double stoppedTimeThroughput; | ||
private double stoppedTimeMaxPause; | ||
private double stoppedTimeTotal; | ||
private double GCStoppedRatio; | ||
|
||
public int getTotalGCEvents() { | ||
return totalGCEvents; | ||
} | ||
|
||
public void setTotalGCEvents(int totalGCEvents) { | ||
this.totalGCEvents = totalGCEvents; | ||
} | ||
|
||
public int getMaxHeapOccupancy() { | ||
return maxHeapOccupancy; | ||
} | ||
|
||
public void setMaxHeapOccupancy(int maxHeapOccupancy) { | ||
this.maxHeapOccupancy = maxHeapOccupancy; | ||
} | ||
|
||
public int getMaxHeapSpace() { | ||
return maxHeapSpace; | ||
} | ||
|
||
public void setMaxHeapSpace(int maxHeapSpace) { | ||
this.maxHeapSpace = maxHeapSpace; | ||
} | ||
|
||
public int getMaxPermMetaspaceOccupancy() { | ||
return maxPermMetaspaceOccupancy; | ||
} | ||
|
||
public void setMaxPermMetaspaceOccupancy(int maxPermMetaspaceOccupancy) { | ||
this.maxPermMetaspaceOccupancy = maxPermMetaspaceOccupancy; | ||
} | ||
|
||
public int getMaxPermMetaspaceSpace() { | ||
return maxPermMetaspaceSpace; | ||
} | ||
|
||
public void setMaxPermMetaspaceSpace(int maxPermMetaspaceSpace) { | ||
this.maxPermMetaspaceSpace = maxPermMetaspaceSpace; | ||
} | ||
|
||
public double getGCThroughput() { | ||
return GCThroughput; | ||
} | ||
|
||
public void setGCThroughput(double GCThroughput) { | ||
this.GCThroughput = GCThroughput; | ||
} | ||
|
||
public double getGCMaxPause() { | ||
return GCMaxPause; | ||
} | ||
|
||
public void setGCMaxPause(double GCMaxPause) { | ||
this.GCMaxPause = GCMaxPause; | ||
} | ||
|
||
public double getGCTotalPause() { | ||
return GCTotalPause; | ||
} | ||
|
||
public void setGCTotalPause(double GCTotalPause) { | ||
this.GCTotalPause = GCTotalPause; | ||
} | ||
|
||
public double getStoppedTimeThroughput() { | ||
return stoppedTimeThroughput; | ||
} | ||
|
||
public void setStoppedTimeThroughput(double stoppedTimeThroughput) { | ||
this.stoppedTimeThroughput = stoppedTimeThroughput; | ||
} | ||
|
||
public double getStoppedTimeMaxPause() { | ||
return stoppedTimeMaxPause; | ||
} | ||
|
||
public void setStoppedTimeMaxPause(double stoppedTimeMaxPause) { | ||
this.stoppedTimeMaxPause = stoppedTimeMaxPause; | ||
} | ||
|
||
public double getStoppedTimeTotal() { | ||
return stoppedTimeTotal; | ||
} | ||
|
||
public void setStoppedTimeTotal(double stoppedTimeTotal) { | ||
this.stoppedTimeTotal = stoppedTimeTotal; | ||
} | ||
|
||
public double getGCStoppedRatio() { | ||
return GCStoppedRatio; | ||
} | ||
|
||
public void setGCStoppedRatio(double GCStoppedRatio) { | ||
this.GCStoppedRatio = GCStoppedRatio; | ||
} | ||
|
||
} |
Oops, something went wrong.