I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit f7656b04 authored by zzz's avatar zzz
Browse files

* TunnelInfo: Change msg counter from long to int

parent 6635448b
No related branches found
No related tags found
No related merge requests found
...@@ -68,10 +68,11 @@ public interface TunnelInfo { ...@@ -68,10 +68,11 @@ public interface TunnelInfo {
*/ */
public void testSuccessful(int responseTime); public void testSuccessful(int responseTime);
public long getProcessedMessagesCount(); public int getProcessedMessagesCount();
/** we know for sure that this many bytes travelled through the tunnel in its lifetime */ /** we know for sure that this many bytes travelled through the tunnel in its lifetime */
public long getVerifiedBytesTransferred(); public long getVerifiedBytesTransferred();
/** we know for sure that the given number of bytes were sent down the tunnel fully */ /** we know for sure that the given number of bytes were sent down the tunnel fully */
public void incrementVerifiedBytesTransferred(int numBytes); public void incrementVerifiedBytesTransferred(int numBytes);
......
...@@ -29,7 +29,7 @@ public class TunnelCreatorConfig implements TunnelInfo { ...@@ -29,7 +29,7 @@ public class TunnelCreatorConfig implements TunnelInfo {
private List<Integer> _order; private List<Integer> _order;
private long _replyMessageId; private long _replyMessageId;
private final boolean _isInbound; private final boolean _isInbound;
private long _messagesProcessed; private int _messagesProcessed;
private volatile long _verifiedBytesTransferred; private volatile long _verifiedBytesTransferred;
private boolean _failed; private boolean _failed;
private int _failures; private int _failures;
...@@ -127,7 +127,7 @@ public class TunnelCreatorConfig implements TunnelInfo { ...@@ -127,7 +127,7 @@ public class TunnelCreatorConfig implements TunnelInfo {
/** take note of a message being pumped through this tunnel */ /** take note of a message being pumped through this tunnel */
public void incrementProcessedMessages() { _messagesProcessed++; } public void incrementProcessedMessages() { _messagesProcessed++; }
public long getProcessedMessagesCount() { return _messagesProcessed; } public int getProcessedMessagesCount() { return _messagesProcessed; }
public void incrementVerifiedBytesTransferred(int bytes) { public void incrementVerifiedBytesTransferred(int bytes) {
_verifiedBytesTransferred += bytes; _verifiedBytesTransferred += bytes;
...@@ -144,6 +144,7 @@ public class TunnelCreatorConfig implements TunnelInfo { ...@@ -144,6 +144,7 @@ public class TunnelCreatorConfig implements TunnelInfo {
_context.profileManager().tunnelDataPushed1m(_peers[i], (int)normalized); _context.profileManager().tunnelDataPushed1m(_peers[i], (int)normalized);
} }
} }
public long getVerifiedBytesTransferred() { return _verifiedBytesTransferred; } public long getVerifiedBytesTransferred() { return _verifiedBytesTransferred; }
private static final int THROUGHPUT_COUNT = 3; private static final int THROUGHPUT_COUNT = 3;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment