|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.router.transport.BandwidthLimiterTest
Stress out the bandwidth limiter by running a series of push and pull tests through bandwidth limited streams. This includes pushing data through unthrottled streams, through streams throttled at 4KBps, 32KBps, and 256KBps, pulling data through those same rates, as well as doing so with 10 concurrent threads (and, in turn, 10 concurrent streams all using the same BandwidthLimiter). Note: this takes a long time to run (~1 hour) since the 4KBps push/pull of 1MB with 10 concurrent threads is, well, slow.
Constructor Summary | |
BandwidthLimiterTest()
|
Method Summary | |
static void |
main(java.lang.String[] args)
|
void |
prepareLimiter(int inKBps,
int outKBps,
int inBurst,
int outBurst)
|
void |
testInbound()
Run a series of tests on inbound throttling (pulling lots of data through pipes with various limits) and log the times. |
long |
testInboundThrottle(int numBytes,
int numBytesPerRead)
Using the configured limiter, determine how long it takes to read numBytes through a BandwidthLimitedInputStream (broken up into numBytesPerRead) chunks. |
void |
testOutbound()
Run a series of tests on outbound throttling (shoving lots of data through pipes with various limits) and log the times. |
void |
testOutboundContention()
|
long |
testOutboundThrottle(int numBytes,
int numBytesPerWrite)
Using the configured limiter, determine how long it takes to shove numBytes through a BandwidthLimitedOutputStream (broken up into numBytesPerWrite) chunks. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BandwidthLimiterTest()
Method Detail |
public void prepareLimiter(int inKBps, int outKBps, int inBurst, int outBurst)
public long testOutboundThrottle(int numBytes, int numBytesPerWrite)
public long testInboundThrottle(int numBytes, int numBytesPerRead)
public void testOutbound()
public void testInbound()
public void testOutboundContention()
public static void main(java.lang.String[] args)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |