adaptive network peer counter table

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6901 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 15 years ago
parent 6950d8a33d
commit 2fd795207c

@ -141,19 +141,26 @@ To see a list of all APIs, please visit the <a href="http://www.yacy-websuche.de
<div class="left">
<table border="0" cellpadding="2" cellspacing="1">
<tr class="TableHeader">
<td colspan=4>Online Peers</td>
<td rowspan=2>Number<br/>of Documents</td>
<td rowspan=5 class="TableHeader">Network</td>
<td colspan=#(active-switch)#2::3::4::5#(/active-switch)#>Online Peers</td>
<td rowspan=2>Number of<br/>Documents</td>
<td rowspan=2>Indexing Speed:<br/>Pages Per Minute (PPM)</td>
<td rowspan=2>Query Frequency:<br/>Queries Per Hour (QPH)</td>
</tr>
<tr class="TableHeader">
<td>Last Week</td>
<td>Today</td>
#(active-switch)#::
<td>Today</td>::
<td>Last Week</td><td>Today</td>::
<td>Last Month</td><td>Last Week</td><td>Today</td>
#(/active-switch)#
<td colspan=2>Now</td>
</tr>
<tr class="TableCellDark">
<td align="right" rowspan=3>#[active-last-week]#</td>
<td align="right" rowspan=3>#[active-last-day]#</td>
#(active-switch)#::
<td align="right" rowspan=3>#[last-day]#</td>::
<td align="right" rowspan=3>#[last-week]#</td><td align="right" rowspan=3>#[last-day]#</td>::
<td align="right" rowspan=3>#[last-month]#</td><td align="right" rowspan=3>#[last-week]#</td><td align="right" rowspan=3>#[last-day]#</td>
#(/active-switch)#
<td align="left">Active</td>
<td align="right">#[active-count]#</td>
<td align="right">#[active-links]#</td>
@ -171,7 +178,7 @@ To see a list of all APIs, please visit the <a href="http://www.yacy-websuche.de
<td align="right">#[potential-links]#</td>
</tr>
<tr class="TableCellSummary">
<td align="left" colspan="4">This Peer</td>
<td align="left" colspan="#(active-switch)#3::4::5::6#(/active-switch)#">This Peer</td>
<td align="right">#[my-LCount]#</td>
<td align="right">#[my-ppm]#</td>
<td align="right">#[my-qph]#</td>

@ -153,8 +153,17 @@ public class Network {
// overall results: Network statistics
if (iAmActive) conCount++; else if (mySeedType.equals(yacySeed.PEERTYPE_JUNIOR)) potCount++;
prop.putNum("table_active-last-week", sb.peers.sizeActiveSince(7 * 1440));
prop.putNum("table_active-last-day", sb.peers.sizeActiveSince(1440));
int activeLastMonth = sb.peers.sizeActiveSince(30 * 1440);
int activeLastWeek = sb.peers.sizeActiveSince(7 * 1440);
int activeLastDay = sb.peers.sizeActiveSince(1440);
int activeSwitch =
(activeLastDay <= conCount) ? 0 :
(activeLastWeek <= activeLastDay) ? 1 :
(activeLastMonth <= activeLastWeek) ? 2 : 3;
prop.putNum("table_active-switch", activeSwitch);
prop.putNum("table_active-switch_last-month", activeLastMonth);
prop.putNum("table_active-switch_last-week", activeLastWeek);
prop.putNum("table_active-switch_last-day", activeLastDay);
prop.putNum("table_active-count", conCount);
prop.putNum("table_active-links", accActLinks);
prop.putNum("table_active-words", accActWords);

@ -35,6 +35,13 @@
</peer>
#{/list}#
::
<history>
#(active-switch)#::
<month>0</month><week>0</week><day>#[last-day]#</day>::
<month>0</month><week>#[last-week]#</week><day>#[last-day]#</day>::
<month>#[last-month]#</month><week>#[last-week]#</week><day>#[last-day]#</day>
#(/active-switch)#
</history>
<active>
<count>#[active-count]#</count>
<links>#[active-links]#</links>

Loading…
Cancel
Save