| java.lang.Object org.jgroups.tests.SpeedTest_NIO
SpeedTest_NIO | public class SpeedTest_NIO (Code) | | Same test as SpeedTest, but using NIO ByteBuffer rather than serialization. For 10000 messages, this took
25% of SpeedTest !
Test time taken for multicasting n local messages (messages sent to self). Uses simple MulticastSocket.
Note that packets might get dropped if Util.sleep(1) is commented out (on certain systems this has
to be increased even further). If running with -jg option and Util.sleep() is commented out, there will
probably be packet loss, which will be repaired (by means of retransmission) by JGroups. To see the
retransmit messages, enable tracing (trace=true) in jgroups.properties and add the following lines:
trace0=NAKACK.retransmit DEBUG STDOUT
trace1=UNICAST.retransmit DEBUG STDOUT
author: Bela Ban |
Inner Class :static class Receiver implements Runnable | |
Method Summary | |
static void | help() | public static void | main(String[] args) | static void | printMatrix(int[][] m) | static void | sleep(long msecs, boolean busy_sleep) On most UNIX systems, the minimum sleep time is 10-20ms. |
startstop | static long startstop(Code) | | |
printMatrix | static void printMatrix(int[][] m)(Code) | | |
sleep | static void sleep(long msecs, boolean busy_sleep)(Code) | | On most UNIX systems, the minimum sleep time is 10-20ms. Even if we specify sleep(1), the thread will
sleep for at least 10-20ms. On Windows, sleep() seems to be implemented as a busy sleep, that is the
thread never relinquishes control and therefore the sleep(x) is exactly x ms long.
|
|
|