forked from I2P_Developers/i2p.i2p
set firstHeardAbout; tweak dump order
This commit is contained in:
@@ -18,7 +18,7 @@ public class RouterVersion {
|
||||
/** deprecated */
|
||||
public final static String ID = "Monotone";
|
||||
public final static String VERSION = CoreVersion.VERSION;
|
||||
public final static long BUILD = 6;
|
||||
public final static long BUILD = 7;
|
||||
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "";
|
||||
|
@@ -62,6 +62,10 @@ public class PeerProfile {
|
||||
public PeerProfile(RouterContext context, Hash peer) {
|
||||
this(context, peer, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param expand must be true (see below)
|
||||
*/
|
||||
public PeerProfile(RouterContext context, Hash peer, boolean expand) {
|
||||
_context = context;
|
||||
_log = context.logManager().getLog(PeerProfile.class);
|
||||
@@ -125,7 +129,10 @@ public class PeerProfile {
|
||||
}
|
||||
|
||||
|
||||
/** when did we first hear about this peer? */
|
||||
/**
|
||||
* When did we first hear about this peer?
|
||||
* Currently unused, candidate for removal.
|
||||
*/
|
||||
public long getFirstHeardAbout() { return _firstHeardAbout; }
|
||||
public void setFirstHeardAbout(long when) { _firstHeardAbout = when; }
|
||||
|
||||
|
@@ -341,6 +341,7 @@ public class ProfileManagerImpl implements ProfileManager {
|
||||
PeerProfile prof = _context.profileOrganizer().getProfile(peer);
|
||||
if (prof == null) {
|
||||
prof = new PeerProfile(_context, peer);
|
||||
prof.setFirstHeardAbout(_context.clock().now());
|
||||
_context.profileOrganizer().addProfile(prof);
|
||||
}
|
||||
return prof;
|
||||
|
@@ -119,14 +119,14 @@ class ProfilePersistenceHelper {
|
||||
buf.append("#").append(NL);
|
||||
buf.append("########################################################################").append(NL);
|
||||
buf.append("##").append(NL);
|
||||
add(buf, "speedBonus", profile.getSpeedBonus(), "Manual adjustment to the speed score");
|
||||
add(buf, "capacityBonus", profile.getCapacityBonus(), "Manual adjustment to the capacity score");
|
||||
add(buf, "integrationBonus", profile.getIntegrationBonus(), "Manual adjustment to the integration score");
|
||||
add(buf, "speedBonus", profile.getSpeedBonus(), "Manual adjustment to the speed score");
|
||||
addDate(buf, "lastHeardAbout", profile.getLastHeardAbout(), "When did we last get a reference to this peer?");
|
||||
addDate(buf, "firstHeardAbout", profile.getFirstHeardAbout(), "When did we first get a reference to this peer?");
|
||||
addDate(buf, "lastHeardAbout", profile.getLastHeardAbout(), "When did we last get a reference to this peer?");
|
||||
addDate(buf, "lastHeardFrom", profile.getLastHeardFrom(), "When did we last get a message from the peer?");
|
||||
addDate(buf, "lastSentToSuccessfully", profile.getLastSendSuccessful(), "When did we last send the peer a message successfully?");
|
||||
addDate(buf, "lastFailedSend", profile.getLastSendFailed(), "When did we last fail to send a message to the peer?");
|
||||
addDate(buf, "lastHeardFrom", profile.getLastHeardFrom(), "When did we last get a message from the peer?");
|
||||
add(buf, "tunnelTestTimeAverage", profile.getTunnelTestTimeAverage(), "Moving average as to how fast the peer replies");
|
||||
add(buf, "tunnelPeakThroughput", profile.getPeakThroughputKBps(), "KBytes/sec");
|
||||
add(buf, "tunnelPeakTunnelThroughput", profile.getPeakTunnelThroughputKBps(), "KBytes/sec");
|
||||
|
Reference in New Issue
Block a user