summaryrefslogtreecommitdiff
path: root/htroot
diff options
context:
space:
mode:
authorMichael Peter Christen <mc@yacy.net>2014-10-08 15:20:43 +0200
committerMichael Peter Christen <mc@yacy.net>2014-10-08 15:20:43 +0200
commit7817fc50c9db71296f0df3fb0ff163131bb4c5ec (patch)
treeec444fc2c5226d5fa52466555151536666c8f6e5 /htroot
parent5082feb103742d30f1caa179a80766cf4d0a00d8 (diff)
added a high cpu cycle monitor to PerformanceQueues
Diffstat (limited to 'htroot')
-rw-r--r--htroot/PerformanceQueues_p.html2
-rw-r--r--htroot/PerformanceQueues_p.java6
-rw-r--r--htroot/PerformanceQueues_p.xml1
3 files changed, 7 insertions, 2 deletions
diff --git a/htroot/PerformanceQueues_p.html b/htroot/PerformanceQueues_p.html
index 670ea3c55..379ca9f2a 100644
--- a/htroot/PerformanceQueues_p.html
+++ b/htroot/PerformanceQueues_p.html
@@ -23,6 +23,7 @@
<td>Idle<br />Cycles</td>
<td>Busy<br />Cycles</td>
<td>Short Mem<br />Cycles</td>
+ <td>High CPU<br />Cycles</td>
<td>Sleep Time<br />per Cycle<br />(millis)</td>
<td>Exec Time<br />per Busy-Cycle<br />(millis)</td>
<td>Memory Use<br />per Busy-Cycle<br />(kbytes)</td>
@@ -46,6 +47,7 @@
<td align="right">#[idlecycles]#</td>
<td align="right">#[busycycles]#</td>
<td align="right">#[memscycles]#</td>
+ <td align="right">#[highcpucycles]#</td>
<td align="right">#[sleeppercycle]#</td>
<td align="right">#[execpercycle]#</td>
<td align="right">#[memusepercycle]#</td>
diff --git a/htroot/PerformanceQueues_p.java b/htroot/PerformanceQueues_p.java
index 197e1441a..289bd3d5e 100644
--- a/htroot/PerformanceQueues_p.java
+++ b/htroot/PerformanceQueues_p.java
@@ -113,7 +113,7 @@ public class PerformanceQueues_p {
int queuesize;
threads = sb.threadNames();
int c = 0;
- long idleCycles, busyCycles, memshortageCycles;
+ long idleCycles, busyCycles, memshortageCycles, highCPUCycles;
// set profile?
final boolean setProfile = (post != null && post.containsKey("submitdefault"));
final boolean setDelay = (post != null) && (post.containsKey("submitdelay"));
@@ -148,16 +148,18 @@ public class PerformanceQueues_p {
idleCycles = thread.getIdleCycles();
busyCycles = thread.getBusyCycles();
memshortageCycles = thread.getOutOfMemoryCycles();
+ highCPUCycles = thread.getHighCPUCycles();
prop.putNum("table_" + c + "_blocktime", blocktime / 1000);
prop.putNum("table_" + c + "_blockpercent", 100 * blocktime / blocktime_total);
prop.putNum("table_" + c + "_sleeptime", sleeptime / 1000);
prop.putNum("table_" + c + "_sleeppercent", 100 * sleeptime / sleeptime_total);
prop.putNum("table_" + c + "_exectime", exectime / 1000);
prop.putNum("table_" + c + "_execpercent", 100 * exectime / exectime_total);
- prop.putNum("table_" + c + "_totalcycles", idleCycles + busyCycles + memshortageCycles);
+ prop.putNum("table_" + c + "_totalcycles", idleCycles + busyCycles + memshortageCycles + highCPUCycles);
prop.putNum("table_" + c + "_idlecycles", idleCycles);
prop.putNum("table_" + c + "_busycycles", busyCycles);
prop.putNum("table_" + c + "_memscycles", memshortageCycles);
+ prop.putNum("table_" + c + "_highcpucycles", highCPUCycles);
prop.putNum("table_" + c + "_sleeppercycle", ((idleCycles + busyCycles) == 0) ? -1 : sleeptime / (idleCycles + busyCycles));
prop.putNum("table_" + c + "_execpercycle", (busyCycles == 0) ? -1 : exectime / busyCycles);
prop.putNum("table_" + c + "_memusepercycle", (busyCycles == 0) ? -1 : memuse / busyCycles / 1024);
diff --git a/htroot/PerformanceQueues_p.xml b/htroot/PerformanceQueues_p.xml
index bef61d6d6..e603f347a 100644
--- a/htroot/PerformanceQueues_p.xml
+++ b/htroot/PerformanceQueues_p.xml
@@ -14,6 +14,7 @@
<idlecycles>#[idlecycles]#</idlecycles>
<busycycles>#[busycycles]#</busycycles>
<memscycles>#[memscycles]#</memscycles>
+ <highcpucycles>#[highcpucycles]#</highcpucycles>
<sleeppercycle>#[sleeppercycle]#</sleeppercycle>
<execpercycle>#[execpercycle]#</execpercycle>
<memusepercycle>#[memusepercycle]#</memusepercycle>