Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load flow control #69

Open
3 tasks
timofeevmd opened this issue Jun 7, 2023 · 5 comments
Open
3 tasks

Load flow control #69

timofeevmd opened this issue Jun 7, 2023 · 5 comments
Assignees
Labels

Comments

@timofeevmd
Copy link

timofeevmd commented Jun 7, 2023

I want to be able

  • control the number of load threads
  • test duration
  • control the execution of the script depending on the status of the transaction code
    using command line arguments.

It must be passed parameters:

  • number of threads

  • delay (in seconds)

  • time for which the number of threads should be entered (ramp-up) (in seconds)

  • stage operation time (in seconds)

  • the time for which it is necessary to remove the flows from the work of this stage
    This set of parameters will describe only 1 stage of the overall load model. When adding a second stage, the parameters must be duplicated

    • the behavior of the thread when receiving an error
      • send the next request despite the received error
      • start the next iteration
      • stop the current thread
      • stop the test completely

use cases:

  1. The load model is stepped. (load model)
    1.1. at the beginning of the test, I put 10 threads into operation, which continue to work cyclically during the test
    1.2. In 10 minutes I want to enter 14 more threads within 20 seconds. They will work until the test time is 10 seconds. And I take these threads out of work within 10 seconds

  2. flow control depending on the event
    2.1. During the test, 1 thread receives the status code 200OK - the thread will not interrupt its work until an error message is received
    When an error is received, the script continues to work in accordance with the parameter passed on the command line

Tasks

Preview Give feedback
  1. iroha2
    pesterev timofeevmd
  2. iroha2
    pesterev timofeevmd
  3. iroha2
    pesterev timofeevmd
@pesterev
Copy link

pesterev commented Jun 7, 2023

Let's use the term Operation. This tool completely asynchronous and concurrent, so we don't need use threads directly to execute operations concurrently. My suggestion is to increase number of concurrently operations (not threads) based on your algorithm (flow control).

@timofeevmd
Copy link
Author

OK,
If I understood everything correctly, we will have 1 thread with asynchronous execution

use case
Load scenario - sequential execution of transactions, while the execution of the second transaction depends on the result of the first one.
I am running the first load step in 10 operations. 1 operation - 1 virtual user.
In the first thread, the first operation receives statusCode 500 in response
I want to interrupt the execution of this operation and start the loop again for this operation only

Question - will it be possible to interrupt only 1 operation without interrupting the work of the remaining 9?

@pesterev
Copy link

pesterev commented Jun 8, 2023

Question - will it be possible to interrupt only 1 operation without interrupting the work of the remaining 9?

Technically it's not hard to implement. The main problem is describing these sequential and/or not sequential operations. It will be like a scenario of how to execute these operations in some file, or you want to specify them in CLI parameters, how will it look like?

Do you have examples of the usage alternatives tools with the same or similar features?

@timofeevmd
Copy link
Author

as a rule, scenarios in the load are compiled identically to the user's work
scn_1{
transaction_0
assertByTransaction_0
transaction_n
assertByTransaction_n
transaction_n+1
assertByTransaction_n+1
}
but it is also possible to build on the basis of the most frequently used operations, provided that none of the operations in the scenario is interconnected

it is possible to pass arguments from outside to the script

source /path/to/jmeter/jmeter.sh // jmeter start
-n -t /mnt/jmeter/$(TEST).jmx // path to test.jmx scenario
-JVUSERS=$(VUSERS) //external arg
-JRAMP_UP=$(RAMP_UP)
-JTHINK_TIME=$(THINK_TIME)
-JTHINK_TIME_DEVIATION=$(THINK_TIME_DEVIATION)
-JDURATION=$(DURATION)
-JENVIRONMENT=$(ENV_URL)

@timofeevmd
Copy link
Author

timofeevmd commented Jun 9, 2023

to run load testing offers the implementation of a simpler operation control mechanism

Control mechanism depending on the status of the received operation

  • Ability to control the scenario depending on the result of the operation

    • Continue: send the next request despite the error received
    • Start next work cycle: start next iteration
    • Stop operation: stop the current operation
    • Stop test: completely stop the test
  • Test parameterization:

    • Number of operations
    • The time for which all transactions will be entered (in seconds)
  • As well as optional parameters:

    • Number of iterations
    • Test duration (in seconds)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants