Fangtian T-ONEThe underlying structure is very powerful, all modules can be installed andRoyal, so users can build their desired system like building blocks.ERPRelated modules, only useToneIts own underlying framework can also build systems suitable for various purposes.ToneyesTraditional ChineseArchitecture, the backend is based onC#.NETDevelopment, front-end based onHTML5andJavaScriptTechnology development, all functions and operation interfaces can be used on mobile phones, and interface adaptation is supported.
Purpose of the test
1) Test under the hardware environment, network environment and multiple concurrent users provided by XD CompanyToneThe response speed of the system.
2) Based on the test results, judgeToneWhether it can meet the performance requirements of XD company.
Test background
1) XD has 5 factories, 55 branches and 125 agencies across the country. There are about 1,200 employees in the branches, and it is expected that the number will reach 1,800 within three years.
2) In the hardware and network environment provided by XD Company, based onToneWhether the new system can meet the performance requirements of XD Company now and in the future.
Test Range
This test was conducted at XD's headquarters office, mainly testing the performance of the server (includingToneServer and SQL database server), does not test the network status, does not test the client status, and does not test the access status of various branches.
Test environment
【Client】
Lenovo laptop, i5 dual-core CPU, 8G memory, SSD hard drive.
【Toneserver】
XD company virtual machine, 12-core CPU, 16G memory
【ToneDatabase Server
XD company virtual machine, 12-core CPU, 16G memory
【Network environment】
XD company headquarters LAN, the network condition between client and server is excellent.
Testing requirements, content, tools and methods
Testing requirements
The test requirements are:
1) Test XD company has more than 700 system users (employees), and 200 users log in to the system at the same time during peak hours.ToneWhether the system's response speed can meet XD Company's requirements.
2) This test was conducted at XD's headquarters office, mainly testing the performance of system software and servers, without considering the problem of remote network latency.
Concurrency estimation
According to statistical laws, the estimation formula for the number of concurrent users of a software system (the number of users operating the system at the same time) is as follows:
(1) Average number of concurrent users: C = n * L/T
(2) Peak number of concurrent users: C' ≈ C + 3 * square root of C
In formula (1), C is the average number of concurrent users; n is the number of logged-in users (online users); L is the average online time of logged-in users, and T refers to the length of the time period under investigation.
Formula (2) gives the calculation method of the peak number of concurrent users, where C' refers to the peak number of concurrent users, and C is the average number of concurrent users obtained in formula (1). This formula assumes that user behavior conforms to the Poisson distribution law.
The user situation of XD company is as follows:
1) The total number of users is 800, and the measured peak number of online users is 200;
2) Most users (more than 500)yesWorkshop reporting staffThe system login time is short, with an average of less than 1 hour per day.Tube、planand FinanceThe staff log in for a long time, estimated to be 4 hours per day on average;
3) The average daily login time for all users is estimated to be 2 hours;
4) Users only use the system during working hours, so the inspection period is working hours, 8 hours.
The number of concurrent users of XD company is estimated as follows:
Average number of concurrent users C = n * L/T = 200 * 2/8 = 50
Peak number of concurrent users C' = C + 3 * square root of C = 50 + 3 * 7 = 71
User response time standards
The industry has a common standard for the user response time of software systems, namely the 2/5/10 principle. That is, if the system responds within 2 seconds to a user's operation, the user will consider it a "very attractive" user experience; if it responds within 5 seconds, it will be considered a "relatively good" user experience; if it responds within 10 seconds, it will be considered a "bad" user experience; if there is no response after more than 10 seconds, most users will consider the request to have failed.
Test content
This test tested five representative operations based on the business characteristics of XD Company:
1) Customer query: input keywords, query customers, and test system response time;
2) Create a new sales contract, enter customer, course and other information, click Save, and test the system response time;
3) Customer payment list, click the "Customer payment list" menu, the system will display a list of payment lists, and test the response time;
4) Open the payment order and randomly click a customer payment order in the list to test the system response time;
5) Review the payment order. Click the Review payment order button to test the system response time.
In order to analyze the changes in the system's response speed under different numbers of concurrent users, this test will test the response time of the above five operations under 1 concurrency, 50 concurrency, 100 concurrency, 150 concurrency, and 200 concurrency in turn.
In this test, the system imported more than 60,000 pieces of customer information of XD Company and created more than 20,000 simulated customer contracts.
Testing Tools
The main testing tool is JMeter testing software, which is a widely used Web system performance testing tool.
The auxiliary tools for this test includeGoogleBrowser, Excel spreadsheet.
JMeter can simulate multiple users sending requests to the server concurrently and record the server's response time for each request.ToneThe system uses a large number of Ajax connections, and each page will send multiple requests at the same time (depending on the complexity of the page, there may be as few as 2 requests and as many as 20 requests). The response time of a single request recorded by JMeter cannot reflect the response time of the entire page.
In order to obtain the response time of the entire page, JMeter is used to simulate concurrent user operations in the test, and then the system is accessed through the browser to record the response time of the entire page.
Test Method
The method and steps used in this test are as follows:
1) First use JMeter to record five actions: customer query, new sales contract, customer payment list, opening payment order, and payment order review;
2) Modify the recorded script, mainly replacing session_id with a variable;
3) Use JMeter to simulate multiple users performing the above operations simultaneously;
4) Use at the same timeGoogleManually operate the browser to query customers, create new sales contracts, list customer payment orders, open payment orders, and review payment orders to check the system response results and time;
5) Test the system response time under 1 user, 50 concurrent users, 100 concurrent users, 150 concurrent users, and 200 concurrent users in turn.
JMeter simulates a user sending a request to a server, intercepting the server's response data, response time and other parameters. JMeter can enable multi-threading to simulate the situation of multiple concurrent user operating systems. The JMeter test screenshot is as follows:
When the network is in good condition, the connection establishment time and the server response result transmission time are almost zero. The following figure shows the page response time when opening the sales contract under poor network conditions. This screenshot shows:
1) Open the sales contract page, and the system initiates 10 Ajax calls;
2) Each Ajax call includes connection establishment time (gray), server response time (purple), and result transmission time (green);
3) The interval between two Ajax calls is the local JavaScript execution time;
4) There are concurrent (simultaneous) Ajax calls on the same page;
5) Including all Ajax call time and local Java script execution time, the response time of the entire page is 1.49 seconds;
Test results and analysis
System performance test results
When the number of concurrent calls is 1, 50, 100, 150, and 200, the system response time for the five operations of customer query, new sales contract, customer payment order list, payment order opening, and payment order review is as follows:
System load
When the number of concurrent users gradually increases from 1 to 300,ToneThe CPU usage of the server gradually increased. The figure below shows the CPU usage of the server when the test tool JMeter started testing at 16:40 and added a concurrent test user every 3 seconds. At 16:55, the number of concurrent users reached 300.
As can be seen from the figure, when there are 300 concurrent users, the CPU usage is about 36%.
Test results analysis
1) From the test results, the system response speed is almost the same between 1 concurrent user and 50 concurrent users, and the response time of the five operations is around 2 seconds;
2) When there are 100 concurrent users, the system response speed decreases slightly, and the response speed is between 2 seconds and 2.5 seconds;
3) From 100 concurrent requests to 200 concurrent requests, the system response speed fluctuated slightly, but was always between 2 and 3 seconds;
4) With the current XD company's user base of 800, connected users of 200, an average concurrent user base of 50, and a peak concurrent user base of 71, the response time for common system operations is less than 2.5 seconds;
5) Considering future development, if the total number of employees doubles, the number of users is 1,600, the number of connected users is 400, the average number of concurrent users is 100, the peak number of concurrent users reaches 142, and the response time of common system operations is within 3 seconds;
6) When XD's branches access the system, considering the network latency in different locations, the system response time is normally within 4 seconds (taking into account the network latency of 1 second). According to the user response time standard, this response time is considered a "relatively good" user experience (within 5 seconds).