In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces how to build a nGrinder performance testing platform, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
1. Introduction of nGrinder components
1. Ngrinder includes three parts: Controller, agent and monitor.
2 、 Controller
Web interface that provides performance testing
Coordinate the testing process
Adjust and display statistical results of the test
Let users create and modify scripts
3 、 Agent
Load running test processes and threads on the proxy server
Multiple sets can be deployed to improve the pressure testing capability.
It is best to deploy on a separate server, or on the same server as Controller if there are no conditions.
But it cannot be deployed on the server under test.
4 、 Monitor
Used to monitor the system performance of the server under test (e.g. CPU/MEMORY)
Must be deployed on the server under test
2. Setting up nGrinder environment
$java-XX:MaxPermSize=512m-jar ngrinder-controller-3.4.war-- port 80
After downloading ngrinder, you can run it directly through the above command
You can also run the war package in a tomcat container in the following ways
1. Install JDK and configure environment variables
2. Install Tomcat
3. Download nGrinder: https://github.com/naver/ngrinder/releases
4. Put the downloaded package in the webApps folder of Tomcat
5. Start Tomcat and access nGrinder
NGrinder home page: http://localhost:8080/ngrinder-controller-3.4/ sees the following picture to show that the construction is successful.
If you want to access it directly through http://localhost:8080/, change the file name to ROOT.war.
6. Install Agent
Log in to the nGrinder console, and the default account and password are admin. Click on the upper right corner and select Download Agent (if you are logging in with an admin account, the configuration in the downloaded agents package can be shared with all users. If you log in with a non-admin account, the download link will become "Download Private Agent" and the configuration in the downloaded agent package can only be used by the current user)
Extract the ngrinder-agent package to the server used as Agent and run run_agent.sh
7. Install Monitor (need to be installed on the server under test)
Download the Monitor installation package in a way similar to Agent
Extract the ngrinder-monitor package to the server under test and run run_monitor.sh.
Supplementary note:
Ngrinder can be used out of the box without additional configuration. The system configuration is automatically generated when the system is started for the first time.
H2 database is used by default, and schema automatically creates
When the version is updated, the database schema updates automatically
Agent and monitor modules are downloaded from controller without configuration
When the version is updated, just update controller,agent and monitor will update automatically
Modify the system configuration online, and multiple data modifications do not need to be restarted
Even with cluster mode, the configuration is simple.
III. Quick use
1. Enter the test URL, select the script language, and click start Test, which will automatically generate the test script and enter the configuration page, or enter the script management page by clicking the script or script button at the top of the management, and create the script with the same effect.
When creating scripts, you can choose to use Groovy or Jython, but due to the difference in performance between the two languages, it is recommended to use Groovy with better performance to write stress test scripts (official verification: groovy supports about 2 times the number of concurrency than jython in the same case)
2. Basic stress test configuration
Agent: refers to the number of server required for stress testing
Virtual users have two metrics:
Number of processes: how many processes to run from each server
Number of threads: the number of new threads per process
Concurrency = number of agents x processes x threads
Ramp-Up: set incremental tests and gradually increase to the maximum concurrency. Only when this box is checked, the values of initial number, increment, initial wait time, and process growth interval are valid.
Test time: indicates the time that the pressure test needs to be run continuously
Number of tests: the number of times the script is executed. Choose one of the two at the same test time.
3. Run the test
Click Save and run in the upper right corner of the configuration page to start the test.
4. Monitor the test and view the results
When the test is started, the current TPS, virtual users, number of successful tests, and other information are displayed on the page. When the test is complete, the test results are displayed.
Thank you for reading this article carefully. I hope the article "how to build a nGrinder performance testing platform" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
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.