org.ow2.clif.scenario.isac.egui.loadprofile
Class LoadProfile

java.lang.Object
  extended by org.ow2.clif.scenario.isac.egui.loadprofile.LoadProfile

public class LoadProfile
extends java.lang.Object

A load profile set for a specific behavior.

Author:
Joan Chaumont, Bruno Dillenseger

Constructor Summary
LoadProfile(java.lang.String id, java.util.List<ProfilePoint> profPoints, boolean force)
          Constructor
 
Method Summary
 void addPoint(ProfilePoint point)
          Add a new point in this profile
 boolean containsTime(int time)
          Check if profile have already a point at this time
 boolean enoughPoints()
          Check if there is enough point
 int getAdditionalPoints()
          If the profile have some crenel_xx points we need to add some additional points.
 boolean getForceStop()
           
 java.lang.String getId()
           
 int getMaxPopulation()
           
 int getMaxTime()
           
 java.util.List<ProfilePoint> getProfilesPoints()
           
 boolean isCorrect()
          Check if the profile is correct
 void removePoint(ProfilePoint point)
          Remove a point
 void removeTime(int time)
          Remove point at this time
 void setForceStop(boolean force)
          Sets the force stop flag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoadProfile

public LoadProfile(java.lang.String id,
                   java.util.List<ProfilePoint> profPoints,
                   boolean force)
Constructor

Parameters:
id -
profPoints -
force -
Method Detail

getId

public java.lang.String getId()
Returns:
String id

getProfilesPoints

public java.util.List<ProfilePoint> getProfilesPoints()
Returns:
ArrayList the list of profilespoints

getForceStop

public boolean getForceStop()
Returns:
boolean forceStop

setForceStop

public void setForceStop(boolean force)
Sets the force stop flag

Parameters:
force - if true, means running vUsers may be terminated before full behavior completion, according to the load profile. If false, running vUsers will complete their behavior.

getAdditionalPoints

public int getAdditionalPoints()
If the profile have some crenel_xx points we need to add some additional points.

Returns:
int the number of additional points

getMaxTime

public int getMaxTime()
Returns:
int the max value of time for these points

getMaxPopulation

public int getMaxPopulation()
Returns:
int the max value of population for these points

addPoint

public void addPoint(ProfilePoint point)
Add a new point in this profile

Parameters:
point - the new point

removePoint

public void removePoint(ProfilePoint point)
Remove a point

Parameters:
point - the point to remove

containsTime

public boolean containsTime(int time)
Check if profile have already a point at this time

Parameters:
time -
Returns:
true if a point already exists

removeTime

public void removeTime(int time)
Remove point at this time

Parameters:
time -

isCorrect

public boolean isCorrect()
Check if the profile is correct

Returns:
true if there isn't two points at the same time

enoughPoints

public boolean enoughPoints()
Check if there is enough point

Returns:
true if there is more than 1 point other than time = 0