Class PerformanceTests

java.lang.Object
org.mariuszgromada.math.mxparser.regressiontesting.PerformanceTests

public class PerformanceTests extends Object
PerformanceTests - mXparser performance tests
Version:
4.3.0
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    main(String[] args)
    Performance test run with multithreading support.
    static int
    Starts mXparser performance tests - number of threads given by the mXparser.getThreadsNumber() List of performed tests: 00.
    static int
    start(int threadsNum)
    Starts mXparser performance tests.

    Methods inherited from class java.lang.Object

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

    • PerformanceTests

      public PerformanceTests()
  • Method Details

    • start

      public static int start(int threadsNum)
      Starts mXparser performance tests. List of performed tests:
      • 00. Simple calculations - addition. Expression created once. Iteration: repeatedly recalculated same expression.
      • 01. Simple calculations - multiplication. Expression created once. Iteration: repeatedly recalculated same expression.
      • 02. Simple calculations - division. Expression created once. Iteration: repeatedly recalculated same expression.
      • 03. Simple calculations - power. Expression created once. Iteration: repeatedly recalculated same expression.
      • 04. Simple calculations - sinus. Expression created once. Iteration: repeatedly recalculated same expression.
      • 05. Simple calculations - 2 additions. Expression created once. Iteration: repeatedly recalculated same expression.
      • 06. Simple calculations - 3 additions. Expression created once. Iteration: repeatedlyrecalculated same expression.
      • 07. Simple calculations - 3 additions + 1 parenthesis. Expression created once. Iteration: repeatedly recalculated same expression.
      • 08. Simple calculations - 3 additions + 2 brackets. Expression created once. Iteration: repeatedly recalculated same expression.
      • 09. Simple calculations - 3 additions + 2 brackets. Expression created once. Iteration: repeatedly recalculated same expression.
      • 10. Combination of different operations. Expression created once. Iteration: repeatedly recalculated same expression.
      • 11. Simple calculations - addition with argument. Expression created once, containing argument 'x'. Iteration: argument value is being modified (increased), then expression is recalculated
      • 12. User defined function f(x,y)=3x+4y. Expression Function created once, containing argument 'x'. Iteration: argument value is being modified (increased), then expression is recalculated
      • 13. Creating constants: Iteration: Constant c = new Constant("c", 5)
      • 14. Creating constants: Iteration: Constant c = new Constant("c=5")
      • 15. Creating arguments: Iteration: Argument x = new Argument("x", 5)
      • 16. Creating arguments: Iteration: Argument x = new Argument("x=5")
      • 17. Creating functions: Iteration: Function f = new Function("f", "x+y", "x", "y")
      • 18. Creating functions: Iteration: Function f = new Function("f(x,y)=x+y")
      • 19. Creating expressions: Iteration: Expression e = new Expression("sin(2+(3*4)^2)/10")
      • 20. Creating expressions + checking syntax: Iteration: Expression e = new Expression("sin(2+(3*4)^2)/10")
      Parameters:
      threadsNum - Number of threads
      Returns:
      Number of tests that were not performed.
    • start

      public static int start()
      Starts mXparser performance tests - number of threads given by the mXparser.getThreadsNumber() List of performed tests:
      • 00. Simple calculations - addition. Expression created once. Iteration: repeatedly recalculated same expression.
      • 01. Simple calculations - multiplication. Expression created once. Iteration: repeatedly recalculated same expression.
      • 02. Simple calculations - division. Expression created once. Iteration: repeatedly recalculated same expression.
      • 03. Simple calculations - power. Expression created once. Iteration: repeatedly recalculated same expression.
      • 04. Simple calculations - sinus. Expression created once. Iteration: repeatedly recalculated same expression.
      • 05. Simple calculations - 2 additions. Expression created once. Iteration: repeatedly recalculated same expression.
      • 06. Simple calculations - 3 additions. Expression created once. Iteration: repeatedlyrecalculated same expression.
      • 07. Simple calculations - 3 additions + 1 parenthesis. Expression created once. Iteration: repeatedly recalculated same expression.
      • 08. Simple calculations - 3 additions + 2 brackets. Expression created once. Iteration: repeatedly recalculated same expression.
      • 09. Simple calculations - 3 additions + 2 brackets. Expression created once. Iteration: repeatedly recalculated same expression.
      • 10. Combination of different operations. Expression created once. Iteration: repeatedly recalculated same expression.
      • 11. Simple calculations - addition with argument. Expression created once, containing argument 'x'. Iteration: argument value is being modified (increased), then expression is recalculated
      • 12. User defined function f(x,y)=3x+4y. Expression Function created once, containing argument 'x'. Iteration: argument value is being modified (increased), then expression is recalculated
      • 13. Creating constants: Iteration: Constant c = new Constant("c", 5)
      • 14. Creating constants: Iteration: Constant c = new Constant("c=5")
      • 15. Creating arguments: Iteration: Argument x = new Argument("x", 5)
      • 16. Creating arguments: Iteration: Argument x = new Argument("x=5")
      • 17. Creating functions: Iteration: Function f = new Function("f", "x+y", "x", "y")
      • 18. Creating functions: Iteration: Function f = new Function("f(x,y)=x+y")
      • 19. Creating expressions: Iteration: Expression e = new Expression("sin(2+(3*4)^2)/10")
      • 20. Creating expressions + checking syntax: Iteration: Expression e = new Expression("sin(2+(3*4)^2)/10")
      Returns:
      Number of tests that were not performed.
      See Also:
    • main

      public static void main(String[] args)
      Performance test run with multithreading support.
      Parameters:
      args - If parameters are given then only the first one is verified, and is considered as number of threads.