In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
Main points of notes:
Concept
Scene design
Scene execution
Scene monitoring
I. concept
1. Creating a new scene includes two scenario methods: manual scenarios (more flexible and closer to real user actions) and target-oriented scenarios.
Second, scene design
It mainly includes parameter settings of Schedule, ViewScript and Generator. Manual is consistent with the last two parameters of the target-oriented scenario. Only the Schedule parameter is different.
1. Configuration of manual scene Schedule
Schedule mainly sets the way users behave. This includes scheduling by scenario and by user group.
(1) scene name
The scene name should reflect the scene action.
(2) Plan by scenario
1) Initialize setting, which sets how to initialize each Vuser before the script runs.
Method:
Initialize all Vuser simultaneously
Initialize a certain number of Vuser at regular intervals
Initialize all Vuser before the script runs (this is generally used)
2) Start Vusers setting: setting the process of Vuser loading
Start Vuser: the total number of Vuser.
Method:
Load all Vuser at the same time
Load a certain number of Vuser at regular intervals (this method is generally used)
3) Duration setting, which sets the running time of the scene execution.
Method:
Run until all Vuser runs are finished, ending the execution of the entire scenario.
When setting the running time of the scene, you only need to test 15-30min when carrying out the pressure test, and you need to run continuously for 24 hours or 72 hours if you want to test the stability and reliability of the system.
4) Stop Vusers setting, which sets the policy on how Vuser will be released after the execution of the scene. This item is available only when the Duration is run at a specified time.
Stop Vusers: refers to the number of Vuser released. Default is all. You can also customize the number of Vuser released.
Method:
When the scene is finished, release all Vuser at the same time
A certain amount of Vuser is stopped at regular intervals, and generally Vuser loads and stops in the same way.
(3) according to user group plan (Schedule by Group)
This method is more flexible and can create the constraint relationship between script and script in practical application. For example, the data generated by one group of users is recorded as the input of another group of users. When you use scene groups to set scene policies, LR defines each script as a group by default.
According to the settings in the user group plan: Start Group\ Start Vusers\ Duration\ Stop Vusers, the last three items are all consistent with the scenario plan.
1) Start Group setting
Method:
Start running the script immediately when the scene is running
The script starts running after the scene has been executed for a period of time.
The script does not start running until a specific user group has finished running, that is, after a script has finished running.
(4) scene start time (Scenario Start Time)
Method:
After clicking Start Scenario, the scene starts immediately
After clicking Start Scenario, postpone the specified time to start running
After clicking Start Scenario, it starts running at the specified time.
(5) percentage model
The total number of Vuser is set in advance, and then all Vuser are allocated as a percentage. This scenario is suitable for specific performance tests of the business model.
two。 Target-oriented scenario Schedule configuration
First define the goals that the test needs to achieve, and then create the scenario based on the goals.
There are five target types in goal-oriented scenarios.
Eg .hits per Second type
(1) Scenario Settings option
Contains two options, as shown in the figure above
Setting the value in Run Time means that when the goal is reached, the scene will continue to run for a period of time before it ends.
The goal did not reach the processing method.
(2) Load Behavior option
(3) Target type
3. Configure ViewScript
After the user script is loaded, when you need to modify it, right-click the script to select to view the script, modify it, and reload it after modification.
4. Configure Load Generator load generator
Load Generator is responsible for contacting other loaders and forcing loaders to execute. A Controller can control multiple loaders through Load Generator.
A loader can be added
After adding, right-click the connection to check the connection between the loader and the controller.
When using a loader to simulate a multi-user test system, note:
1) calculate how many loaders are needed
When each Vuser is run as a process, each additional Vuser adds a process while the scene is running, and each process consumes memory and CPU resources.
Generally speaking, the resource consumption of each box of Vuser is related to OS, the protocol selected during recording, and the version of LR.
If you run as a process and add a process to each Vuser, you need to observe the resource consumption of each process during the test.
For example, under Windows7, each Vuser consumes about 7000k of memory. If it runs 600m Vuser, it needs about 4101m of memory. If the memory of each test machine is 1G, at least 4 such test machines are needed.
2) how does the controller control the operation of the loader
Principle: the controller controls the operation of the loader through the agent (the name of the agent is: LR Agent process), so you first need to start the agent in the controller and the client.
Manual login is generally used.
After starting the agent, when the scene is initialized, the controller sends a binary file to the loader, which contains all the script information to be run. After initialization, the load generates Vuser to simulate the test.
III. Scene execution
The operation of the scene includes three objects: scene Vuser group Vuser
1. Scene control
Divided into: scene group control information and data graph
As shown in the figure above, the operation of the user group on the left and the control operations of the scene on the right, including starting the scene, stopping the scene, resetting the scene Vuser group, and running / stopping Vuser
There are three ways to stop a scene:
The Vuser group is as follows:
You can do the following for a single Vuser:
two。 View the scene when the scene is executed
1) Vuser operational status
2) transaction details
You can click through the number of transactions or failed transactions, the display snapshot, view the transaction dialog box.
3) View the "output" window
When the scene runs, the Vuser and load generators send error, notification, warning, debug, and batch messages to Controller, which can be found in the output window.
When analyzing the output information, note:
Whether the error is due to performance testing or scripting.
Find the log information of the error. (the error message comes from which loader and which Vuser. After determining, you can find the log information when the scene is running. Otherwise, if you run a large number of Vuse, if you click to view the log information of Vuser, the efficiency will be affected. This method can directly find the specific location of the log file.)
IV. Scene monitoring
To get more data through monitoring to help analyze server performance bottlenecks, you need to know how to add monitors and analyze monitoring graphs.
1. Associated on-line monitoring
The whole monitoring process is performed by the controller and relevant data is collected during the monitoring process. The information collected by the control during the run of the scene includes the following:
1) data during the execution of the loader
The controller needs to analyze some related data, such as click rate, throughput, transaction response time, etc., and the data of each Vuser operation is obtained by the loader, so the controller needs to monitor the loader.
Principle: when Vuser is running, the loader collects the relevant data at run time, then sends the data to the controller, and the controller saves the data in DB. Finally, the analyzer reorganizes the data and draws a graph.
2) related data when the server is running
Including: Web servers (MIcrosoft IIS, WebSphere, WebLogic, Tomcat, Apache)
DB server (Mysql, SQL\ Oracle)
The relevant data for the server include: one is the use of server resources\ 'and the other is some characteristics of each server (other tools need to be used).
The main monitors provided by LR include: operation diagram, transaction diagram, Web resource diagram, system resource diagram, network diagram, firewall diagram, Web server resource diagram, Web application server diagram, DB server resource diagram, ERP/CRM server resource diagram, application component diagram, application deployment solution, middleware performance diagram, infrastructure resource diagram.
-the following is to sort out all kinds of monitoring content, marked * as the main concern.
two。 Monitor and measurement
3. On-line monitor
Summary of notes:
Controller mainly includes two parts: scene setting (manual mode and target mode) and scene monitoring (mainly monitoring the performance of the server during the operation of the scene).
Main monitoring contents:
Error output information
Click rate chart
Throughput chart
Transaction response time
Add counter
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.