Class CalcStorm

java.lang.Object
org.astrogrid.samp.test.CalcStorm

public class CalcStorm extends Object
Runs a load of Calculator clients at once all sending messages to each other. Suitable for load testing or benchmarking a hub.
Since:
22 Jul 2008
Author:
Mark Taylor
  • Constructor Details

    • CalcStorm

      public CalcStorm(ClientProfile profile, Random random, int nClient, int nQuery, Calculator.SendMode sendMode)
      Constructor.
      Parameters:
      profile - hub connection factory
      random - random number generator
      nClient - number of clients to run
      nQuery - number of messages each client will send
      sendMode - delivery pattern for messages
  • Method Details

    • run

      public void run() throws IOException
      Runs a lot of calculators at once all talking to each other.
      Throws:
      TestException - if any tests fail
      IOException
    • runMain

      public static int runMain(String[] args) throws IOException
      Does the work for the main method. Use -help flag for documentation.
      Parameters:
      args - command-line arguments
      Returns:
      0 means success
      Throws:
      IOException
    • main

      public static void main(String[] args) throws IOException
      Main method. Use -help flag.
      Throws:
      IOException