foil evil typo plot

This commit is contained in:
duck
2004-10-18 23:37:49 +00:00
committed by zzz
parent a95a968fa8
commit 81e0a145f1
17 changed files with 91 additions and 91 deletions

View File

@ -185,7 +185,7 @@ public class Router {
setupHandlers();
startupQueue();
_context.jobQueue().addJob(new CoallesceStatsJob());
_context.jobQueue().addJob(new CoalesceStatsJob());
_context.jobQueue().addJob(new UpdateRoutingKeyModifierJob());
warmupCrypto();
_sessionKeyPersistenceHelper.startup();
@ -261,18 +261,18 @@ public class Router {
}
/**
* coallesce the stats framework every minute
* coalesce the stats framework every minute
*
*/
private final class CoallesceStatsJob extends JobImpl {
public CoallesceStatsJob() {
private final class CoalesceStatsJob extends JobImpl {
public CoalesceStatsJob() {
super(Router.this._context);
Router.this._context.statManager().createRateStat("bw.receiveBps", "How fast we receive data", "Bandwidth", new long[] { 60*1000, 5*60*1000, 60*60*1000 });
Router.this._context.statManager().createRateStat("bw.sendBps", "How fast we send data", "Bandwidth", new long[] { 60*1000, 5*60*1000, 60*60*1000 });
}
public String getName() { return "Coallesce stats"; }
public String getName() { return "Coalesce stats"; }
public void runJob() {
Router.this._context.statManager().coallesceStats();
Router.this._context.statManager().coalesceStats();
RateStat receiveRate = _context.statManager().getRate("transport.receiveMessageSize");
if (receiveRate != null) {

View File

@ -52,7 +52,7 @@ class KBucketSet {
int oldSize = _buckets[bucket].getKeyCount();
int numInBucket = _buckets[bucket].add(peer);
if (numInBucket > BUCKET_SIZE) {
// perhaps queue up coallesce job? naaahh.. lets let 'er grow for now
// perhaps queue up coalesce job? naaahh.. lets let 'er grow for now
}
if (_log.shouldLog(Log.DEBUG))
_log.debug("Peer " + peer + " added to bucket " + bucket);

View File

@ -155,10 +155,10 @@ public class DBHistory {
public void setUnpromptedDbStoreNew(long num) { _unpromptedDbStoreNew = num; }
public void setUnpromptedDbStoreOld(long num) { _unpromptedDbStoreOld = num; }
public void coallesceStats() {
public void coalesceStats() {
_log.debug("Coallescing stats");
_failedLookupRate.coallesceStats();
_invalidReplyRate.coallesceStats();
_failedLookupRate.coalesceStats();
_invalidReplyRate.coalesceStats();
}
private final static String NL = System.getProperty("line.separator");

View File

@ -11,7 +11,7 @@ import net.i2p.util.Log;
/**
* Run across all of the profiles, coallescing the stats and reorganizing them
* into appropriate groups. The stat coallesce must be run at least once a minute,
* into appropriate groups. The stat coalesce must be run at least once a minute,
* so if the group reorg wants to get changed, this may want to be split into two
* jobs.
*
@ -34,14 +34,14 @@ class EvaluateProfilesJob extends JobImpl {
Hash peer = (Hash)iter.next();
PeerProfile profile = getContext().profileOrganizer().getProfile(peer);
if (profile != null)
profile.coallesceStats();
profile.coalesceStats();
}
long afterCoallesce = getContext().clock().now();
long afterCoalesce = getContext().clock().now();
getContext().profileOrganizer().reorganize();
long afterReorganize = getContext().clock().now();
if (_log.shouldLog(Log.DEBUG))
_log.debug("Profiles coallesced and reorganized. total: " + allPeers.size() + ", selectAll: " + (afterSelect-start) + "ms, coallesce: " + (afterCoallesce-afterSelect) + "ms, reorganize: " + (afterReorganize-afterSelect));
_log.debug("Profiles coalesced and reorganized. total: " + allPeers.size() + ", selectAll: " + (afterSelect-start) + "ms, coalesce: " + (afterCoalesce-afterSelect) + "ms, reorganize: " + (afterReorganize-afterSelect));
} catch (Throwable t) {
_log.log(Log.CRIT, "Error evaluating profiles", t);
} finally {

View File

@ -273,18 +273,18 @@ public class PeerProfile {
}
/** update the stats and rates (this should be called once a minute) */
public void coallesceStats() {
public void coalesceStats() {
if (!_expanded) return;
_commError.coallesceStats();
_dbIntroduction.coallesceStats();
_dbResponseTime.coallesceStats();
_receiveSize.coallesceStats();
_sendFailureSize.coallesceStats();
_sendSuccessSize.coallesceStats();
_tunnelCreateResponseTime.coallesceStats();
_tunnelTestResponseTime.coallesceStats();
_dbHistory.coallesceStats();
_tunnelHistory.coallesceStats();
_commError.coalesceStats();
_dbIntroduction.coalesceStats();
_dbResponseTime.coalesceStats();
_receiveSize.coalesceStats();
_sendFailureSize.coalesceStats();
_sendSuccessSize.coalesceStats();
_tunnelCreateResponseTime.coalesceStats();
_tunnelTestResponseTime.coalesceStats();
_dbHistory.coalesceStats();
_tunnelHistory.coalesceStats();
_speedValue = calculateSpeed();
_reliabilityValue = calculateReliability();
@ -293,7 +293,7 @@ public class PeerProfile {
_isFailing = calculateIsFailing();
if (_log.shouldLog(Log.DEBUG))
_log.debug("Coallesced: speed [" + _speedValue + "] reliability [" + _reliabilityValue + "] capacity [" + _capacityValue + "] integration [" + _integrationValue + "] failing? [" + _isFailing + "]");
_log.debug("Coalesced: speed [" + _speedValue + "] reliability [" + _reliabilityValue + "] capacity [" + _capacityValue + "] integration [" + _integrationValue + "] failing? [" + _isFailing + "]");
}
private double calculateSpeed() { return _context.speedCalculator().calc(this); }
@ -347,7 +347,7 @@ public class PeerProfile {
buf.append("Could not load profile ").append(args[i]).append('\n');
continue;
}
//profile.coallesceStats();
//profile.coalesceStats();
buf.append("Peer " + profile.getPeer().toBase64()
+ ":\t Speed:\t" + fmt.format(profile.calculateSpeed())
+ " Reliability:\t" + fmt.format(profile.calculateReliability())

View File

@ -129,7 +129,7 @@ public class ProfileOrganizer {
synchronized (_reorganizeLock) {
PeerProfile old = locked_getProfile(profile.getPeer());
profile.coallesceStats();
profile.coalesceStats();
locked_placeProfile(profile);
_strictCapacityOrder.add(profile);
return old;
@ -383,7 +383,7 @@ public class ProfileOrganizer {
/**
* Place peers into the correct tier, as well as expand/contract and even drop profiles
* according to whatever limits are in place. Peer profiles are not coallesced during
* according to whatever limits are in place. Peer profiles are not coalesced during
* this method, but the averages are recalculated.
*
*/

View File

@ -83,11 +83,11 @@ public class TunnelHistory {
public RateStat getRejectionRate() { return _rejectRate; }
public RateStat getFailedRate() { return _failRate; }
public void coallesceStats() {
public void coalesceStats() {
if (_log.shouldLog(Log.DEBUG))
_log.debug("Coallescing stats");
_rejectRate.coallesceStats();
_failRate.coallesceStats();
_rejectRate.coalesceStats();
_failRate.coalesceStats();
}
private final static String NL = System.getProperty("line.separator");

View File

@ -209,7 +209,7 @@ public class TCPConnection {
/** how many Bps we are sending data to the peer (or 2KBps if we don't know) */
public long getSendRate() {
if (_sendRate == null) return 2*1024;
_sendRate.coallesceStats();
_sendRate.coalesceStats();
Rate r = _sendRate.getRate(60*1000);
if (r == null) {
return 2*1024;