Class PerformanceTests

java.lang.Object
test.de.iip_ecosphere.platform.support.TestWithPlugin
test.de.iip_ecosphere.platform.support.aas.TestWithPlugin
de.iip_ecosphere.platform.deviceMgt.PerformanceTests

public class PerformanceTests extends test.de.iip_ecosphere.platform.support.aas.TestWithPlugin
Performance tests.
Author:
Dennis Pidun, University of Hildesheim
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static de.iip_ecosphere.platform.support.aas.Aas
     
    private static de.iip_ecosphere.platform.support.Server
     
    private static de.iip_ecosphere.platform.support.Server
     

    Fields inherited from class test.de.iip_ecosphere.platform.support.TestWithPlugin

    PROP_AAS_PLUGIN
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private long
    add(List<String> ids, de.iip_ecosphere.platform.deviceMgt.registry.DeviceRegistryClient deviceRegistryClient)
    Adds devices based on their ids.
    void
    Tests mass addition of devices.
    void
    Tests adding a single device.
    private void
    Creates devices for the given ids.
    private List<String>
    generateIds(int count)
    Creates a sequence of ids.
    private long
    remove(List<String> ids, de.iip_ecosphere.platform.deviceMgt.registry.DeviceRegistryClient deviceRegistryClient)
    Removes devices based on their ids.
    void
    Tests mass removal of devices.
    void
    Tests the removal of a device.
    static void
    Initializes the test.

    Methods inherited from class test.de.iip_ecosphere.platform.support.aas.TestWithPlugin

    setAasPluginId, setup, setupAASPlugins

    Methods inherited from class test.de.iip_ecosphere.platform.support.TestWithPlugin

    addPluginLocation, addRunAfterLoading, clear, enableLocalPlugins, loadPlugins, setInstallDir

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • aas

      private static de.iip_ecosphere.platform.support.aas.Aas aas
    • implServer

      private static de.iip_ecosphere.platform.support.Server implServer
    • aasServer

      private static de.iip_ecosphere.platform.support.Server aasServer
  • Constructor Details

    • PerformanceTests

      public PerformanceTests()
  • Method Details

    • startup

      public static void startup() throws IOException
      Initializes the test.
      Throws:
      IOException - shall not occur
    • addDevice_single

      public void addDevice_single() throws IOException
      Tests adding a single device.
      Throws:
      IOException - in case of IO problems, shall not occur
    • addDevice_mass

      public void addDevice_mass() throws IOException
      Tests mass addition of devices.
      Throws:
      IOException - in case of IO problems, shall not occur
    • removeDevice_single

      public void removeDevice_single() throws IOException
      Tests the removal of a device.
      Throws:
      IOException - in case of IO problems, shall not occur
    • removeDevice_mass

      public void removeDevice_mass() throws IOException, InterruptedException
      Tests mass removal of devices.
      Throws:
      IOException - in case of IO problems, shall not occur
      InterruptedException - in case of timeouts, shall not occur
    • add

      private long add(List<String> ids, de.iip_ecosphere.platform.deviceMgt.registry.DeviceRegistryClient deviceRegistryClient)
      Adds devices based on their ids.
      Parameters:
      ids - the ids
      deviceRegistryClient - the device registry client to test
      Returns:
      the elapsed wall time [ms]
    • remove

      private long remove(List<String> ids, de.iip_ecosphere.platform.deviceMgt.registry.DeviceRegistryClient deviceRegistryClient)
      Removes devices based on their ids.
      Parameters:
      ids - the ids
      deviceRegistryClient - the device registry client to test
      Returns:
      the elapsed wall time [ms]
    • generateIds

      private List<String> generateIds(int count)
      Creates a sequence of ids.
      Parameters:
      count - the number of ids to create
      Returns:
      the created ids
    • createDevices

      private void createDevices(List<String> ids) throws IOException
      Creates devices for the given ids.
      Parameters:
      ids - the device identifiers
      Throws:
      IOException - if creation fails