Package org.jgroups.tests.perf
Class UPerf
java.lang.Object
org.jgroups.tests.perf.UPerf
- All Implemented Interfaces:
Receiver
Tests the UNICAST by invoking unicast RPCs between a sender and a receiver. Mimicks the DIST mode in Infinispan
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final shortprotected intprotected static final Fieldprivate byte[]private JChannelprivate RpcDispatcherprotected static final Stringprivate static final shortprivate static final short(package private) static final Stringprivate Addressprotected booleanprivate static final Method[]protected intprotected static final Fieldprotected final LongAdderprotected intprotected static final Fieldprotected final LongAdderprotected booleanprotected static final Fieldprotected booleanprotected static final Fieldprotected booleanprotected static final Fieldprivate static final shortprivate static final shortprotected doubleprotected static final Fieldprotected final ResponseCollector<PerfUtil.Results> protected longprotected static final Fieldprivate static final shortprivate static final shortprotected ThreadFactoryprotected intprotected static final Fieldprotected View -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidacceptResults(Address sender, PerfUtil.Results results) Called by worker when done; response tostartTest()protected voidapplyConfig(PerfUtil.Config config) protected voidchangeFieldAcrossCluster(Field field, Object value) voidbyte[]get(long key) (package private) int(package private) static doubleprivate AddressPicks the next member in the view(package private) static voidhelp()voidinit(String props, String name, AddressGenerator generator, int bind_port, boolean use_virtual_threads, boolean async_rsp_handling) static voidprotected static Stringprint(AverageMinMax avg, boolean details) protected StringprintAverage(long start_time) protected voidvoidput(long key, byte[] val) voidquitAll()protected voidsendResults(Address dest, PerfUtil.Results results) voidsize(int s) protected voidKicks off the benchmark on all cluster nodesprotected PerfUtil.Resultsvoid(package private) voidstop()protected voidthreads(int t) time(int t) voidviewAccepted(View new_view) Called when a change in membership has occurred.
-
Field Details
-
channel
-
local_addr
-
disp
-
groupname
- See Also:
-
members
-
view
-
looping
protected volatile boolean looping -
num_reads
-
num_writes
-
thread_factory
-
results_coll
-
oob
protected boolean oob -
num_threads
protected int num_threads -
time
protected int time -
msg_size
protected int msg_size -
anycast_count
protected int anycast_count -
read_percentage
protected double read_percentage -
print_invokers
protected boolean print_invokers -
print_details
protected boolean print_details -
rpc_timeout
protected long rpc_timeout -
METHODS
-
START_TEST
private static final short START_TEST- See Also:
-
GET
private static final short GET- See Also:
-
PUT
private static final short PUT- See Also:
-
GET_CONFIG
private static final short GET_CONFIG- See Also:
-
SET
private static final short SET- See Also:
-
QUIT_ALL
private static final short QUIT_ALL- See Also:
-
ACCEPT_RESULTS
private static final short ACCEPT_RESULTS- See Also:
-
OOB
-
NUM_THREADS
-
TIME
-
RPC_TIMEOUT
-
MSG_SIZE
-
ANYCAST_COUNT
-
READ_PERCENTAGE
-
PRINT_INVOKERS
-
PRINT_DETAILS
-
BUFFER
private byte[] BUFFER -
format
- See Also:
-
-
Constructor Details
-
UPerf
public UPerf()
-
-
Method Details
-
time
-
size
-
threads
-
init
public void init(String props, String name, AddressGenerator generator, int bind_port, boolean use_virtual_threads, boolean async_rsp_handling) throws Throwable - Throws:
Throwable
-
stop
void stop() -
stopEventLoop
protected void stopEventLoop() -
viewAccepted
Description copied from interface:ReceiverCalled when a change in membership has occurred. No long running actions, sending of messages or anything that could block should be done in this callback. If some long running action needs to be performed, it should be done in a separate thread.Note that on reception of the first view (a new member just joined), the channel will not yet be in the connected state. This only happens when
JChannel.connect(String)returns.- Specified by:
viewAcceptedin interfaceReceiver
-
startTest
- Throws:
Throwable
-
acceptResults
Called by worker when done; response tostartTest() -
quitAll
public void quitAll() -
printAverage
-
set
-
get
public byte[] get(long key) -
put
public void put(long key, byte[] val) -
getConfig
-
startTest
- Throws:
Throwable
-
sendResults
-
applyConfig
-
eventLoop
public void eventLoop() -
startBenchmark
protected void startBenchmark()Kicks off the benchmark on all cluster nodes -
getReadPercentage
- Throws:
Exception
-
getAnycastCount
- Throws:
Exception
-
changeFieldAcrossCluster
- Throws:
Exception
-
printView
protected void printView() -
print
-
getSites
-
getReceiver
Picks the next member in the view -
main
- Throws:
IOExceptionClassNotFoundException
-
help
static void help()
-