added global ppm computation

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@407 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 20 years ago
parent 9c72b4cdec
commit 0f663bcebf

@ -126,6 +126,9 @@
</tr>
</table>
</p>
<p>
YaCy Cluster Indexing Speed: #[gppm]# Pages Per Minute (Accumulated PPM over Active Peers).
</p>
<p>Your Peer:<br>
<table border="0" cellpadding="2" cellspacing="1">
<tr class="TableHeader">

@ -77,6 +77,8 @@ public class Network {
int potCount = yacyCore.seedDB.sizePotential();
boolean complete = ((post == null) ? false : post.get("links", "false").equals("true"));
long otherppm = yacyCore.seedDB.countActivePPM();
long myppm = 0;
// create own peer info
yacySeed seed = yacyCore.seedDB.mySeed;
@ -103,6 +105,7 @@ public class Network {
accActLinks += links;
accActWords += words;
}
try {myppm = Long.parseLong(seed.get("ISpeed", "0"));} catch (NumberFormatException e) {}
prop.put("table_my-version", seed.get("Version", "-"));
prop.put("table_my-uptime", serverDate.intervalToString(60000 * Long.parseLong(seed.get("Uptime", ""))));
prop.put("table_my-links", groupDigits(links));
@ -113,7 +116,7 @@ public class Network {
prop.put("table_my-sU", seed.get("sU", "-"));
prop.put("table_my-rI", seed.get("rI", "-"));
prop.put("table_my-rU", seed.get("rU", "-"));
prop.put("table_my-ppm", seed.get("ISpeed", "-"));
prop.put("table_my-ppm", myppm);
prop.put("table_my-seeds", seed.get("SCount", "-"));
prop.put("table_my-connects", seed.get("CCount", "-"));
}
@ -133,6 +136,8 @@ public class Network {
prop.put("table_all-links", groupDigits(accActLinks + accPassLinks + accPotLinks));
prop.put("table_all-words", groupDigits(accActWords + accPassWords + accPotWords));
prop.put("table_gppm", otherppm + ((iAmActive) ? myppm : 0));
String comment = "";
prop.put("table_comment", 0);
if (conCount == 0) {

@ -106,7 +106,7 @@ public class kelondroMap {
}
if (accfields != null) for (int i = 0; i < accfields.length; i++) {
value = (String) map.get(sortfields[i]);
value = (String) map.get(accfields[i]);
if (value != null) try {
valuel = Long.parseLong(value);
accumulator[i] = new Long(accumulator[i].longValue() + valuel);

@ -75,7 +75,7 @@ public class yacySeedDB {
// these hashes all shall be generated by base64.enhancedCoder
public static final String[] sortFields = new String[] {"LCount", "ICount", "Uptime", "Version", "LastSeen"};
public static final String[] accFields = new String[] {"LCount", "ICount"};
public static final String[] accFields = new String[] {"LCount", "ICount", "ISpeed"};
// class objects
private File seedActiveDBFile, seedPassiveDBFile, seedPotentialDBFile;
@ -332,6 +332,7 @@ public class yacySeedDB {
public long countActiveURL() { return seedActiveDB.getAcc("LCount"); }
public long countActiveRWI() { return seedActiveDB.getAcc("ICount"); }
public long countActivePPM() { return seedActiveDB.getAcc("ISpeed"); }
public long countPassiveURL() { return seedPassiveDB.getAcc("LCount"); }
public long countPassiveRWI() { return seedPassiveDB.getAcc("ICount"); }
public long countPotentialURL() { return seedPotentialDB.getAcc("LCount"); }

Loading…
Cancel
Save