This commit is contained in:
zzz
2025-05-08 10:33:50 -04:00
parent e8ac0dc573
commit 9c1175fdc5
7 changed files with 13 additions and 13 deletions

View File

@ -1,7 +1,7 @@
package net.i2p.stat;
/**
* Receive the state of the rate when its coallesced
* Receive the state of the rate when it is coalesced
*/
public interface RateSummaryListener {
/**

View File

@ -81,7 +81,7 @@ public class PeerProfile {
/**
* fastest 1 minute throughput, in bytes per minute, ordered with fastest
* first. this is not synchronized, as we don't *need* perfection, and we only
* reorder/insert values on coallesce
* reorder/insert values on coalesce
*/
private final float _peakThroughput[] = new float[THROUGHPUT_COUNT];
private volatile long _peakThroughputCurrentTotal;

View File

@ -23,7 +23,7 @@ import net.i2p.util.Log;
* assigned QueuePreprocessor.</li>
* <li>that QueuePreprocessor may then take off any of the TunnelGateway.Pending
* messages or instruct the TunnelGateway to offer it the messages again in
* a short while (in an attempt to coallesce them).
* a short while (in an attempt to coalesce them).
* <li>when the QueueProcessor accepts a TunnelGateway.Pending, it preprocesses
* it into fragments, forwarding each preprocessed fragment group through
* the Sender.</li>
@ -84,7 +84,7 @@ class PumpedTunnelGateway extends TunnelGateway {
/**
* Add a message to be sent down the tunnel, either sending it now (perhaps
* coallesced with other pending messages) or after a brief pause (_flushFrequency).
* coalesced with other pending messages) or after a brief pause (_flushFrequency).
* If it is queued up past its expiration, it is silently dropped
*
* This is only for OBGWs. See TPTG override for IBGWs.

View File

@ -13,7 +13,7 @@ import net.i2p.util.SimpleByteCache;
/**
* Do the simplest thing possible for preprocessing - for each message available,
* turn it into the minimum number of fragmented preprocessed blocks, sending
* each of those out. This does not coallesce message fragments or delay for more
* each of those out. This does not coalesce message fragments or delay for more
* optimal throughput.
*
* See FragmentHandler Javadoc for tunnel message fragment format

View File

@ -40,7 +40,7 @@ public abstract class TunnelCreatorConfig implements TunnelInfo {
// Fastest 1 minute throughput, in bytes per minute, ordered with fastest first.
//private final double _peakThroughput[] = new double[THROUGHPUT_COUNT];
private long _peakThroughputCurrentTotal;
private long _peakThroughputLastCoallesce = System.currentTimeMillis();
private long _peakThroughputLastCoalesce = System.currentTimeMillis();
private Hash _blankHash;
private SessionKey[] _ChaReplyKeys;
private byte[][] _ChaReplyADs;
@ -176,11 +176,11 @@ public abstract class TunnelCreatorConfig implements TunnelInfo {
_verifiedBytesTransferred += bytes;
_peakThroughputCurrentTotal += bytes;
long now = System.currentTimeMillis();
long timeSince = now - _peakThroughputLastCoallesce;
long timeSince = now - _peakThroughputLastCoalesce;
if (timeSince >= 60*1000) {
long tot = _peakThroughputCurrentTotal;
int normalized = (int) (tot * 60d*1000d / timeSince);
_peakThroughputLastCoallesce = now;
_peakThroughputLastCoalesce = now;
_peakThroughputCurrentTotal = 0;
if (_context != null) {
// skip ourselves

View File

@ -20,7 +20,7 @@ import net.i2p.util.SimpleTimer2;
* assigned QueuePreprocessor.</li>
* <li>that QueuePreprocessor may then take off any of the TunnelGateway.Pending
* messages or instruct the TunnelGateway to offer it the messages again in
* a short while (in an attempt to coallesce them).
* a short while (in an attempt to coalesce them).
* <li>when the QueueProcessor accepts a TunnelGateway.Pending, it preprocesses
* it into fragments, forwarding each preprocessed fragment group through
* the Sender.</li>
@ -78,7 +78,7 @@ abstract class TunnelGateway {
/**
* Add a message to be sent down the tunnel, either sending it now (perhaps
* coallesced with other pending messages) or after a brief pause (_flushFrequency).
* coalesced with other pending messages) or after a brief pause (_flushFrequency).
* If it is queued up past its expiration, it is silently dropped
*
* UNUSED - see overrides

View File

@ -147,7 +147,7 @@ class TunnelParticipant {
/****
private int _periodMessagesTransferred;
private long _lastCoallesced = System.currentTimeMillis();
private long _lastCoalesced = System.currentTimeMillis();
****/
/**
@ -161,12 +161,12 @@ class TunnelParticipant {
private void incrementThroughput(Hash prev) {
if (true) return;
long now = System.currentTimeMillis();
long timeSince = now - _lastCoallesced;
long timeSince = now - _lastCoalesced;
if (timeSince >= 60*1000) {
int amount = 1024 * _periodMessagesTransferred;
int normalized = (int)((double)amount * 60d*1000d / (double)timeSince);
_periodMessagesTransferred = 0;
_lastCoallesced = now;
_lastCoalesced = now;
_context.profileManager().tunnelDataPushed1m(prev, normalized);
} else {
_periodMessagesTransferred++;