Class PerformanceTests
java.lang.Object
org.mariuszgromada.math.mxparser.regressiontesting.PerformanceTests
PerformanceTests - mXparser performance tests
- Version:
- 4.3.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Performance test run with multithreading support.static int
start()
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.
-
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
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.
-