case. Unit-level performance testing Performance testing is a problem that many companies ignore, or the direction of testing until the program has been developed. Performance test Results Table Name System has a serious
Solution 2: optimize the code
To do well, you must first sharpen your tools. To optimize the code, you must first find the bottleneck of the Code. The most common method is to add log or print, and delete the code after debugging is complete, which is troublesome. Python also provides many profile tools: profile, cProfile, hotshot, and pystats. However, these tools provide poor readability, the function or row takes the most time at a glance.
compare synchronization and Asynchrony. So on the performance of the different web framework comparison experiment, the reference to a Netizen's post experiment results.
reference article [1]: Lightweight Web server Tornado code Analysis
Some parts of this article are written in a nutshell, but let's make a bold assumption that the author uses a different Python web framework to implement the most basic He
Brief introductionMulti-mechanize is an open-source performance and load testing framework that concurrently runs multiple Python scripts to generate load on a Web site or service (a composite transaction). The test output report is saved as HTML or JMeter-compatible XML. Multi-mechanize is most commonly used for Web performa
Now there are a lot of performance testing tools, such as our familiar LoadRunner, JMeter, AB, Webbench, and so on, these tools if to a useless friend, learning is not easy, but if you can read the Python code, will write better, You can try today's protagonist Locust, a python-based
[This article is from the Sky Cloud-owned blog Park]Introduction of LocustLocust is a Python performance testing tool that allows you to load test Web interfaces by writing Python scripts.Installation of LocustFirst you have to install python2.6 or above, and there are pip tools. After that, open the command line and i
are some great articles that let you know the details of Python's run-time performance, and you'll find that you can write high-performance applications through these refined and interesting languages. And, when your boss questions Python's performance, don't forget to tell him that the world's second-largest search engine is written in
Python 3.6 Performance Testing Framework Locust installation and use, pythonlocust
Background
Build and use of Python3.6 Performance Testing Framework Locust
Basic
Python version: python3.6
Development Tool: pycharm
Installation a
#!/bin/env python#coding: UTF8‘‘‘awk prints the specified number of rowsSED prints the specified number of linesPython prints the specified position, a length stringAwk takes the longest, a long timeSed awk time HalfPython time-consuming basic negligibleWhen you use a script to monitor log files, the location of the last exit is loggedPython is the most efficient.‘‘‘Import OSFrom time Import timeFrom Os.path import GetSizetestfile= '/dev/shm/%s '% tim
#!/bin/env python#coding: UTF8‘‘‘awk prints the specified number of rowsSED prints the specified number of linesPython prints the specified position, a length stringAwk takes the longest, a long timeSed awk time HalfPython time-consuming basic negligibleWhen you use a script to monitor log files, the location of the last exit is loggedPython is the most efficient.‘‘‘Import OSFrom time Import timeFrom Os.path import GetSizetestfile= '/dev/shm/%s '% tim
3-4 threads can significantly improve the performance. It may increase by about 2-3 times, but increasing the number of threads is a side effect.
Multi-threaded system architecture:
There is no bottleneck in sending and receiving. The main bottleneck lies in the red line, decode, and encode sections. Changing multithreading to multi-process is relatively simple and requires little work. You only need to change the information that requires multi-pro
.
When the results of the load test * show that the system performance has not reached its expected goal, it is time to adjust the corresponding and database. At the same time, you must ensure that your code runs as efficiently as possible, and that the database is optimized under the given operating system and hardware configuration. Practitioners of test-driven development (TDD) will find this context framework very useful *, for example, you can
Performance Testing(Or multi-user concurrent performance testing ),
Load Testing,
Strength Test,
Capacity TestIt is a few aspects of performance testing, but the concept is easy to co
for white-box testing generally requires a certain programming Foundation, that is, the ability to write test code based on functional code. There are many commonly used automated testing tools for unit testing, all search online.4. Automated Testing: for functional testing
Reference: Http://www.oschina.net/news/18161/14-opensource-web-testing-tools
More open-source performance testing tools to learn more:
Http://www.oschina.net/project/tag/157/optimization?lang=0os=0sort=viewp=1
"157 performance testing and optimization of open source softwar
interface function while encapsulating some of the application logic. Server-side database servers primarily provide data storage capabilities, and also provide partial application logic through triggers and stored procedures.
C/S/S structure is the client/application server/Database server three-tier structure, the middle of the addition of application server, usually implement the application logic, is the connection between the client and the database server bridge. It responds to requests f
The three concepts of load testing, stress test, and performance test are often confusing and difficult to distinguish, this leads to incorrect understanding and incorrect use. There have been a lot of discussions before. The famous ones should be classified as two blogs of grig Gheorghiu's:
Performance vs. load vs. Stress
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.