Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Analysis of java concurrent testing process

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "java concurrent testing process analysis". In daily operation, I believe many people have doubts about java concurrent testing process analysis. The editor consulted all kinds of data and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "java concurrent testing process analysis". Next, please follow the editor to study!

I started testing with postman and found that it was just serial execution, not concurrent execution.

If you test with jmeter one by one, the installation method will not be written much. Note that this software needs to be supported by the java environment and needs to be installed with jdk.

Double-click jmeter.bat to the installation directory bin to open the software smoothly.

First create a thread group.

Here are three parameters that need to be filled in manually. The first is the number of threads to be concurrent. The second is the startup time, for example, if you write for 5 seconds, you will start 100 threads per second, and the third is the number of times, or you can check forever.

Then continue to create http requests (requests can create multiple simulations at the same time, such as login of app + get basic information, etc.)

It is divided into protocol, domain name, port, address, request method, etc. You can fill in according to your own needs.

Continue to create monitors, the following are commonly used, others can be familiar with themselves

The preparatory work is complete and ready to start the test.

There are two ways to run, the red circle on the left is a single one, and the one on the right is all you set.

You can check the request / response and other parameters in view results tree

The start, stop, clear and other buttons on the menu are self-filling.

You also need to configure nginx before testing. Such as worker number, number of connections, various logs, etc.

Worker_processes auto

Worker_connections 10240

The following content nginx log is the number of connections is small, nginx can not eat these request values reported incorrectly. Just change it.

2019-07-15 14:16:28 [alert] 11961500: 1024 worker_connections are not enough2019/07/15 14:16:28 [alert] 11961500: 1024 worker_connections are not enough2019/07/15 14:16:28 [alert] 11961500: * 55836 1024 worker_connections are not enough while connecting to upstream, client: 124.202.230.89, server: localhost, request: "POST / bastion.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000" Host: "39.100.93.37VR 8001"

Then it is to see where the pain point of each api is and why it hurts. According to the demand, it should be cached and cached, indexed and indexed, and the configuration should be improved and the distribution will be distributed.

At this point, the study on "java concurrent testing process Analysis" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

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.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report