Class EntityLoadTestModel<M extends is.codion.swing.framework.model.SwingEntityApplicationModel>

java.lang.Object
is.codion.swing.framework.model.tools.loadtest.EntityLoadTestModel<M>
Type Parameters:
M - the application model type used by this load test model

public abstract class EntityLoadTestModel<M extends is.codion.swing.framework.model.SwingEntityApplicationModel> extends Object
A class for running multiple EntityApplicationModel instances for load testing purposes.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final is.codion.common.property.PropertyValue<Integer>
    Specifies the initial client batch size
    Value type: Integer
    Default value: 10
    static final is.codion.common.property.PropertyValue<Integer>
    Specifies the number with which the max think time is multiplied when initializing the clients
    Value type: Integer
    Default value: 2
    static final is.codion.common.property.PropertyValue<String>
    Specifies the hostname of the remote load test server
    Value type: String
    Default value: localhost
    static final is.codion.common.property.PropertyValue<Integer>
    Specifies the initial think time setting for the load test client (max think time = thinktime, min think time = max think time / 2)
    Value type: Integer
    Default value: 2000
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    EntityLoadTestModel(is.codion.common.user.User user, Collection<? extends is.codion.swing.common.model.tools.loadtest.UsageScenario<M>> usageScenarios)
    Instantiates a new EntityLoadTestModel.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract M
    createApplication(is.codion.common.user.User user)
     
    final is.codion.swing.common.model.tools.loadtest.LoadTestModel<M>
     
    static void
    selectRandomItem(is.codion.swing.framework.model.component.EntityComboBoxModel comboBoxModel)
    Selects a random non-null visible item in the given combobox model, if one is available
    static void
    selectRandomRow(is.codion.framework.model.EntityTableModel<?> tableModel)
    Selects a random row in the given table model
    static void
    selectRandomRows(is.codion.framework.model.EntityTableModel<?> tableModel, double ratio)
    Selects random rows in the given table model
    static void
    selectRandomRows(is.codion.framework.model.EntityTableModel<?> tableModel, int count)
    Selects random rows in the given table model

    Methods inherited from class java.lang.Object

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

    • LOAD_TEST_REMOTE_HOSTNAME

      public static final is.codion.common.property.PropertyValue<String> LOAD_TEST_REMOTE_HOSTNAME
      Specifies the hostname of the remote load test server
      Value type: String
      Default value: localhost
    • LOAD_TEST_THINKTIME

      public static final is.codion.common.property.PropertyValue<Integer> LOAD_TEST_THINKTIME
      Specifies the initial think time setting for the load test client (max think time = thinktime, min think time = max think time / 2)
      Value type: Integer
      Default value: 2000
    • LOAD_TEST_BATCH_SIZE

      public static final is.codion.common.property.PropertyValue<Integer> LOAD_TEST_BATCH_SIZE
      Specifies the initial client batch size
      Value type: Integer
      Default value: 10
    • LOAD_TEST_LOGIN_DELAY

      public static final is.codion.common.property.PropertyValue<Integer> LOAD_TEST_LOGIN_DELAY
      Specifies the number with which the max think time is multiplied when initializing the clients
      Value type: Integer
      Default value: 2
  • Constructor Details

    • EntityLoadTestModel

      protected EntityLoadTestModel(is.codion.common.user.User user, Collection<? extends is.codion.swing.common.model.tools.loadtest.UsageScenario<M>> usageScenarios)
      Instantiates a new EntityLoadTestModel.
      Parameters:
      user - the default user
      usageScenarios - the usage scenarios
  • Method Details

    • loadTestModel

      public final is.codion.swing.common.model.tools.loadtest.LoadTestModel<M> loadTestModel()
    • selectRandomRow

      public static void selectRandomRow(is.codion.framework.model.EntityTableModel<?> tableModel)
      Selects a random row in the given table model
      Parameters:
      tableModel - the table model
    • selectRandomRows

      public static void selectRandomRows(is.codion.framework.model.EntityTableModel<?> tableModel, int count)
      Selects random rows in the given table model
      Parameters:
      tableModel - the table model
      count - the number of rows to select
    • selectRandomRows

      public static void selectRandomRows(is.codion.framework.model.EntityTableModel<?> tableModel, double ratio)
      Selects random rows in the given table model
      Parameters:
      tableModel - the table model
      ratio - the ratio of available rows to select
    • selectRandomItem

      public static void selectRandomItem(is.codion.swing.framework.model.component.EntityComboBoxModel comboBoxModel)
      Selects a random non-null visible item in the given combobox model, if one is available
      Parameters:
      comboBoxModel - the combobox model
    • createApplication

      protected abstract M createApplication(is.codion.common.user.User user)