Class HelplineEvaluation


  • public class HelplineEvaluation
    extends java.lang.Object
    Main class allowing to run different evaluation scenarios for helpline scalability.
    • Constructor Detail

      • HelplineEvaluation

        public HelplineEvaluation()
    • 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
      • getProcessCpuLoad

        public static double getProcessCpuLoad()
                                        throws java.lang.Exception
        Throws:
        java.lang.Exception