mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
some customize on Memory-Performance-Graph
This commit is contained in:
parent
8f25070460
commit
3ef9f301ba
|
@ -33,7 +33,7 @@ public class MemoryTracker extends Thread {
|
||||||
private static MemoryTracker systemProfiler = null;
|
private static MemoryTracker systemProfiler = null;
|
||||||
|
|
||||||
public static void startSystemProfiling() {
|
public static void startSystemProfiling() {
|
||||||
systemProfiler = new MemoryTracker(1500);
|
systemProfiler = new MemoryTracker(3000);
|
||||||
systemProfiler.start();
|
systemProfiler.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ public class MemoryTracker extends Thread {
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
while (running) {
|
while (running) {
|
||||||
EventTracker.update(EventTracker.EClass.MEMORY, Long.valueOf(MemoryControl.used()), true);
|
EventTracker.update(EventTracker.EClass.MEMORY, Long.valueOf(MemoryControl.available()), true);
|
||||||
try {
|
try {
|
||||||
Thread.sleep(this.delaytime);
|
Thread.sleep(this.delaytime);
|
||||||
} catch (final InterruptedException e) {
|
} catch (final InterruptedException e) {
|
||||||
|
|
|
@ -121,8 +121,8 @@ public class ProfilingGraph {
|
||||||
bytes = ((Long) event.payload).longValue();
|
bytes = ((Long) event.payload).longValue();
|
||||||
x1 = (int) (time/1000);
|
x1 = (int) (time/1000);
|
||||||
y1 = (int) (bytes / 1024 / 1024);
|
y1 = (int) (bytes / 1024 / 1024);
|
||||||
chart.setColor("AAAAFF");
|
// chart.setColor("AAAAFF");
|
||||||
chart.chartDot(ChartPlotter.DIMENSION_BOTTOM, ChartPlotter.DIMENSION_RIGHT, x1, y1, 2, null, 0);
|
// chart.chartDot(ChartPlotter.DIMENSION_BOTTOM, ChartPlotter.DIMENSION_RIGHT, x1, y1, 2, null, 0);
|
||||||
chart.setColor("0000FF");
|
chart.setColor("0000FF");
|
||||||
if (x0 < 0) chart.chartLine(ChartPlotter.DIMENSION_BOTTOM, ChartPlotter.DIMENSION_RIGHT, x0, y0, x1, y1);
|
if (x0 < 0) chart.chartLine(ChartPlotter.DIMENSION_BOTTOM, ChartPlotter.DIMENSION_RIGHT, x0, y0, x1, y1);
|
||||||
x0 = x1; y0 = y1;
|
x0 = x1; y0 = y1;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user