|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpeersim.rangesim.RangeSimulator
public class RangeSimulator
This class is the main class for the Range Simulator. A range is a collection of values S to be assigned to a variable v. The Range Simulator invokes the standard Peersim simulator once for each distinct value. If multiple ranges S1, S2, ..., Sn are specified, the standard Peersim simulator is invoked for each element in S1 * S2 * ... * Sn.
Ranges are specified with the following syntax:
range.[id] [var];[range]where:
id
is an identifier; since they are not referred anywhere else,
consecutive numbers are a good choice for range identifiers;var
is a variable parameter range
describes the collection of values to be associated
to var
, whose syntax and semantics is defined in
StringListParser
. range.0 SIZE;2^10:2^18|*2 range.1 K;20:30 range.2 CHURN;0.05,0.10,0.20With this specification, the collection of values associated to
SIZE
is {2^10,2^11,...,2^18}; K
contains
{20,21,22,...,30}, while CHURN
contains just the
specified values.
Values can be specified as constant expressions (like 2^10, (5+10), etc.) but variables cannot be used.
A separate Java virtual machine is invoked to run each of the experiments. An attempt is done to run the same JVM version as the one running the Range Simulator; if this is not possible (for example due to path problems), the command shell mechanism is used to run the first JVM version found in the path.
It is possible to specify options for the forked JVM using the "jvm.options" parameter on the command line. For example, a command line like this:java peersim.rangesim.RangeSimulator config.file jvm.options=-Xmx256mcan be used to run the forked JVM with a maximum heap of 256MB.
The new JVM inherits the same classpath as the JVM running the RangeSimulator. The "jvm.options" parameter can be used to specify additional classpath specification.
Parameter Summary | |
---|---|
range
This is the prefix of the config properties whose value vary during a set of experiments. |
|
jvm.options
This config property can be used to set options in the JVMs that are forked to execute experiments with different configuration parameters. |
Constructor Summary | |
---|---|
RangeSimulator(java.lang.String[] args)
|
Method Summary | |
---|---|
void |
doStop()
Stop the process executing the external java virtual machine. |
void |
join()
Wait until the java virtual machine has terminated; it won't be used in this class, but you never know. |
static void |
main(java.lang.String[] args)
Main method of the system. |
void |
run()
Main method to be executed |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Parameter Detail |
---|
range
jvm.options
Constructor Detail |
---|
public RangeSimulator(java.lang.String[] args)
Method Detail |
---|
public static void main(java.lang.String[] args)
public void run()
public void doStop()
doStop
in interface ProcessHandler
public void join() throws java.lang.InterruptedException
join
in interface ProcessHandler
java.lang.InterruptedException
- thrown if the wait is interrupted
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |