*) fixed PPM calculation for multiple indexer-threads

*) fixed totalPPM calculation and added total PPM to Network.html

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2418 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
auron_x 19 years ago
parent cfb51fdef1
commit 4eca0f8830

@ -167,6 +167,7 @@ YaCy Cluster Indexing Speed: #[gppm]# Pages Per Minute (Accumulated PPM over Act
<td class="small">Received<br>Words</td>
<td class="small">Received<br>URLs</td>
<td class="small">PPM</td>
<td class="small">total PPM</td>
<td class="small">#Seeds</td>
<td class="small">#Connects<br>per hour</td>
</tr>
@ -183,6 +184,7 @@ YaCy Cluster Indexing Speed: #[gppm]# Pages Per Minute (Accumulated PPM over Act
<td class="small" align="right">#[my-rI]#</td>
<td class="small" align="right">#[my-rU]#</td>
<td class="small" align="right">#[my-ppm]#</td>
<td class="small" align="right">#[my-totalppm]#</td>
<td class="small" align="right">#[my-seeds]#</td>
<td class="small" align="right">#[my-connects]#</td>
</tr>

@ -139,6 +139,7 @@ public class Network {
prop.put("table_my-rI", groupDigits(seed.get(yacySeed.INDEX_IN, "0")));
prop.put("table_my-rU", groupDigits(seed.get(yacySeed.URL_IN, "0")));
prop.put("table_my-ppm", myppm);
prop.put("table_my-totalppm", sb.getConfig("totalPPM","0"));
prop.put("table_my-seeds", seed.get(yacySeed.SCOUNT, "-"));
prop.put("table_my-connects", groupDigits(seed.get(yacySeed.CCOUNT, "0")));
}

@ -108,7 +108,11 @@ public class yacyPeerActions {
}
long uptime = ((System.currentTimeMillis() - Long.parseLong(sb.getConfig("startupTime", "0"))) / 1000) / 60;
long uptimediff = uptime - Long.parseLong(sb.getConfig("lastseedcheckUptime", "0")); //TODO: Do not use the switchboard?
long indexedc = sb.getThread("80_indexing").getBusyCycles();
int indexing_cluster = Integer.parseInt(sb.getConfig("80_indexing_cluster", "1"));
if (indexing_cluster < 1) indexing_cluster = 1;
long indexedc = 0;
for(int i=0;i<indexing_cluster;++i)
indexedc += sb.getThread((80+i)+"_indexing").getBusyCycles();
long indexedcdiff = indexedc - Long.parseLong(sb.getConfig("lastseedcheckIndexedc", "0"));
if( uptimediff > 5 || ((String)sb.getConfig("lastseedcheckUptime", "-1")).equals("-1") ){
sb.setConfig("lastseedcheckUptime", uptime);
@ -123,9 +127,12 @@ public class yacyPeerActions {
seedDB.mySeed.put(yacySeed.ISPEED, Long.toString(0));
}else{
//set the PPM
seedDB.mySeed.put(yacySeed.ISPEED, Long.toString(indexedcdiff / uptimediff));
seedDB.mySeed.put(yacySeed.ISPEED, Long.toString(indexedcdiff / uptimediff));
}
sb.setConfig("totalPPM", Long.toString(indexedc / (uptime + 1)));
if(uptime > 0)
sb.setConfig("totalPPM", Long.toString(indexedc / uptime));
else
sb.setConfig("totalPPM", Long.toString(indexedc / 1)); //no division by zero
seedDB.mySeed.put(yacySeed.UPTIME, Long.toString(uptime)); // the number of minutes that the peer is up in minutes/day (moving average MA30)
seedDB.mySeed.put(yacySeed.LCOUNT, Integer.toString(sb.urlPool.loadedURL.size())); // the number of links that the peer has stored (LURL's)

Loading…
Cancel
Save