Class HelplineEvaluation
- java.lang.Object
-
- jadex.micro.examples.helplinemega.HelplineEvaluation
-
public class HelplineEvaluation extends java.lang.Object
Main class allowing to run different evaluation scenarios for helpline scalability.
-
-
Constructor Summary
Constructors Constructor Description HelplineEvaluation()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static IPlatformConfiguration
createConfig()
Create a new default config.protected static IExternalAccess[]
createHelplinePlatforms(IPlatformConfiguration config, int cnt, java.lang.String[] args)
Create a number of platforms (e.g.protected static void
createOutputFile()
Create the output file and return the file name.protected static long
createPersons(IExternalAccess[] platforms, int cnt, java.lang.String[] args)
Create a number of person-specific helpline components on the given platforms.protected static IExternalAccess[]
createPlatforms(IPlatformConfiguration config, int cnt, java.lang.String type, java.lang.String[] args)
Create a number of platforms (e.g.protected static void
createRelayAndSSPs(IPlatformConfiguration config, java.lang.String[] args)
Create a local relay and SSP platformsprotected static void
createSPs(IPlatformConfiguration config, int cnt, java.lang.String[] args)
Create a number of SP platforms.protected static IPlatformConfiguration
getConfig(java.lang.String[] args)
Parse args into config and extract settings into static fields.static double
getProcessCpuLoad()
static void
main(java.lang.String[] args)
protected static void
writeEntry(double creation, double search, int numfound)
Write an entry to the output file.
-
-
-
Method Detail
-
main
public static void main(java.lang.String[] args) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getConfig
protected static IPlatformConfiguration getConfig(java.lang.String[] args)
Parse args into config and extract settings into static fields.- Parameters:
args
- The program arguments.- Returns:
- The parsed platform configuration.
-
createRelayAndSSPs
protected static void createRelayAndSSPs(IPlatformConfiguration config, java.lang.String[] args)
Create a local relay and SSP platforms- Parameters:
config
- The platform config.
-
createSPs
protected static void createSPs(IPlatformConfiguration config, int cnt, java.lang.String[] args)
Create a number of SP platforms.- Parameters:
config
- The platform config.cnt
- The number of platforms
-
createHelplinePlatforms
protected static IExternalAccess[] createHelplinePlatforms(IPlatformConfiguration config, int cnt, java.lang.String[] args)
Create a number of platforms (e.g. SPs or helpline nodes).- Parameters:
config
- The platform config.cnt
- The number of platforms- Returns:
- The created platforms.
-
createPlatforms
protected static IExternalAccess[] createPlatforms(IPlatformConfiguration config, int cnt, java.lang.String type, java.lang.String[] args)
Create a number of platforms (e.g. SPs or helpline nodes).- Parameters:
config
- The platform config.cnt
- The number of platforms- Returns:
- The created platforms.
-
createPersons
protected static long createPersons(IExternalAccess[] platforms, int cnt, java.lang.String[] args) throws java.lang.Exception
Create a number of person-specific helpline components on the given platforms.- Parameters:
platforms
- The platforms to create new nodes on.cnt
- The number of components to create on each platform.- Returns:
- The time needed for creation of cnt services as preformatted string.
- Throws:
java.lang.Exception
-
createOutputFile
protected static void createOutputFile() throws java.io.IOException
Create the output file and return the file name.- Throws:
java.io.IOException
-
writeEntry
protected static void writeEntry(double creation, double search, int numfound) throws java.io.IOException
Write an entry to the output file.- Parameters:
creation
- Service creation time.search
- Service search time.numfound
- Number of services found by search.- Throws:
java.io.IOException
-
createConfig
protected static IPlatformConfiguration createConfig()
Create a new default config.
-
getProcessCpuLoad
public static double getProcessCpuLoad() throws java.lang.Exception
- Throws:
java.lang.Exception
-
-