Load performance test method, device, equipment and medium
By simulating the load operation process on the controller and collecting operating status parameters, the problem of being unable to simulate the entire vehicle load during single board testing is solved, the test efficiency and accuracy are improved, potential problems are discovered in advance, and subsequent troubleshooting costs are reduced.
Patent Information
- Application Number
- CN202410824572.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-25
- Publication Date
- 2024-10-01
AI Technical Summary
During the automobile research and development process, it is difficult to simulate the load status of the entire vehicle during single-board testing of the controller using existing technology, resulting in the inability to detect system reliability issues on the controller in a timely manner.
By installing the test application on the target controller, receiving the test start command, controlling the load to increase to the load limit value according to the preset change characteristics, and continuously simulating the load operation process to collect operating status parameters, and finally determine the load performance based on these parameters. .
It is possible to simulate the load status of the entire vehicle during the single board testing phase, which improves the testing efficiency and accuracy, reduces the probability of discovering problems during the vehicle testing phase or in market-side user usage scenarios, and reduces the time for subsequent troubleshooting and resolution. cost.
Smart Images

Figure CN118731543A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of controller testing, and in particular to a load performance testing method, device, equipment and medium. Background Art
[0002] With the improvement of automobile electronics level, more and more controllers in automobiles begin to use A core and UNIX-like operating systems such as Linux / QNX running on it, such as ECU (Electronic Control Unit).
[0003] During the development of automobiles, when a controller running the UNIX operating system is tested on a single board, its load is much lower than the load when the vehicle is running, and reliability issues of the system on the controller cannot be discovered in time. Therefore, how to test the load performance of the operating system on the controller is an urgent problem that needs to be solved. Summary of the invention
[0004] The embodiments of the present application provide a load performance testing method, device, equipment and medium to solve the technical problem in the prior art that the load state of the vehicle during operation cannot be simulated when performing a single-board test on the controller, thereby achieving the technical effect of performing a single-board test on the controller according to the load state of the vehicle during operation to determine the load performance of the controller.
[0005] In a first aspect, the present application provides a load performance testing method, the method comprising:
[0006] Installing a test application on a target controller to be tested; matching the test application with the target controller;
[0007] Receiving a test start instruction and driving a test application program to respond to the test start instruction, controlling the load of the target controller to increase to a load limit value according to a preset change characteristic, and controlling the target controller to remain at the load limit value state for a first preset time period to simulate a load operation process;
[0008] Obtaining the running status parameters collected by the test application from the load running process of the target controller;
[0009] The load performance of the target controller is determined according to the operating status parameters.
[0010] Furthermore, after the load simulation operation process, the method further includes:
[0011] When the target controller meets the test cycle conditions, the target controller is reset and the simulated load operation process is repeated until the target controller meets the test termination conditions; the cycle conditions include that the number of executions of the simulated load operation process is less than the first preset number; the termination conditions include that the number of executions of the simulated load operation process is greater than or equal to the first preset number.
[0012] Further, when the number of executions of the simulated load operation process is less than the first preset number, the loop condition further includes at least one of the following conditions:
[0013] The load of the target controller is greater than the load limit value and lasts for a preset limit time;
[0014] The target controller crashes and the crash duration reaches the preset crash duration.
[0015] Further, controlling the load of the target controller to increase to a load limit value according to a preset change characteristic includes at least one of the following methods:
[0016] The control target controller increases the load to the load limit value by using multi-threading or multi-process;
[0017] Controlling the target controller to perform intensive computing tasks to increase the load to a load limit value;
[0018] The control target controller simulates user operation to increase the load to a load limit value;
[0019] Controlling the target controller to increase the load to a load limit value according to a load change curve; the load change curve includes at least one of linear, sinusoidal and step-type;
[0020] The preset change characteristics include at least one of using multi-threading or multi-processing, executing intensive computing tasks, simulating user operations, and using a load change curve.
[0021] Further, controlling the load of the target controller to increase to a load limit value according to a preset change characteristic includes:
[0022] The load of the control target controller is increased to a load limit value in N stages, where N is a positive integer, and the average load of the next stage in two adjacent stages is higher than the average load of the corresponding previous stage;
[0023] For any adjacent previous stage and next stage in the N stages, the load of the control target controller is increased to the previous load preset value according to the previous preset sub-change feature in the previous stage, and the load of the control target controller is maintained at the load preset value in the previous stage;
[0024] When the target controller maintains a steady state in the previous stage and lasts for the previous preset time, the load of the target controller is controlled to enter the next stage of change, and the load of the target controller is controlled to increase to the next load preset value according to the next preset sub-change feature in the next stage.
[0025] Furthermore, the operating status parameter includes at least one of the following status parameters:
[0026] Actual load, actual load change characteristics, memory usage characteristics, system response time, logs, system crash status, number of system crashes, memory leak status, system status snapshot, temperature, application running status, trouble-free running time, and resource utilization.
[0027] Further, controlling the target controller to maintain a state of the load limit value for a first preset time period includes:
[0028] The target controller is controlled to fluctuate within a preset load range where the load limit value is located and lasts for a first preset time period.
[0029] In a second aspect, the present application provides a load performance testing device, the device comprising:
[0030] An installation module is used to install a test application on a target controller to be tested; the test application is matched with the target controller;
[0031] A load simulation module, configured to receive a test start instruction and drive a test application program to respond to the test start instruction, control the load of the target controller to increase to a load limit value according to a preset change characteristic, and control the target controller to remain at the load limit value for a first preset time period to simulate a load operation process;
[0032] A state parameter acquisition module is used to obtain the running state parameters collected by the test application from the load running process of the target controller;
[0033] The load performance evaluation module is used to determine the load performance of the target controller according to the operating state parameters.
[0034] Furthermore, the device also includes a circulation module, which is used to:
[0035] After the simulated load operation process, when the target controller meets the test cycle conditions, the target controller is reset and the simulated load operation process is repeated until the target controller meets the test termination conditions; the cycle conditions include that the number of executions of the simulated load operation process is less than the first preset number; the termination conditions include that the number of executions of the simulated load operation process is greater than or equal to the first preset number.
[0036] Further, when the number of executions of the simulated load operation process is less than the first preset number, the loop condition further includes at least one of the following conditions:
[0037] The load of the target controller is greater than the load limit value and lasts for a preset limit time;
[0038] The target controller crashes and the crash duration reaches the preset crash duration.
[0039] Furthermore, the load simulation module is used to perform at least one of the following methods:
[0040] The control target controller increases the load to the load limit value by using multi-threading or multi-process;
[0041] Controlling the target controller to perform intensive computing tasks to increase the load to a load limit value;
[0042] The control target controller simulates user operation to increase the load to a load limit value;
[0043] Controlling the target controller to increase the load to a load limit value according to a load change curve; the load change curve includes at least one of linear, sinusoidal and step-type;
[0044] The preset change characteristics include at least one of using multi-threading or multi-processing, executing intensive computing tasks, simulating user operations, and using a load change curve.
[0045] Furthermore, the load simulation module is used to:
[0046] The load of the control target controller is increased to a load limit value in N stages, where N is a positive integer, and the average load of the next stage in two adjacent stages is higher than the average load of the corresponding previous stage;
[0047] For any adjacent previous stage and next stage in the N stages, the load of the control target controller is increased to the previous load preset value according to the previous preset sub-change feature in the previous stage, and the load of the control target controller is maintained at the load preset value in the previous stage;
[0048] When the target controller maintains a steady state in the previous stage and lasts for the previous preset time, the load of the target controller is controlled to enter the next stage of change, and the load of the target controller is controlled to increase to the next load preset value according to the next preset sub-change feature in the next stage.
[0049] Furthermore, the operating status parameter includes at least one of the following status parameters:
[0050] Actual load, actual load change characteristics, memory usage characteristics, system response time, logs, system crash status, number of system crashes, memory leak status, system status snapshot, temperature, application running status, trouble-free running time, and resource utilization.
[0051] Furthermore, the load simulation module is used to:
[0052] The target controller is controlled to fluctuate within a preset load range where the load limit value is located and lasts for a first preset time period.
[0053] In a third aspect, the present application provides an electronic device, including:
[0054] processor;
[0055] a memory for storing processor-executable instructions;
[0056] The processor is configured to execute to implement a load performance testing method as provided in the first aspect.
[0057] In a fourth aspect, the present application provides a non-temporary computer-readable storage medium. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute a load performance testing method as provided in the first aspect.
[0058] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
[0059] This embodiment installs a test application on the target controller to be tested, and then responds to the test start instruction, controls the load of the target controller to increase to the load limit value according to the preset change characteristics, controls the target controller to remain in the state of the load limit value and lasts for a first preset time to simulate the load operation process; then obtains the operating state parameters collected by the test application from the load operation process of the target controller; finally, determines the load performance of the target controller according to the operating state parameters. It can be seen that this embodiment can improve the test efficiency and accuracy. By simulating the CPU load usage in the actual operation scenario, it can discover potential software and operating system problems of the target controller in the single-board test stage, which greatly reduces the probability of discovering problems in the whole vehicle test stage or the market side user use scenario, thereby improving the test efficiency and accuracy. Discovering problems in advance in the single-board test stage can reduce the cost of subsequent problem investigation and resolution in the whole vehicle test stage or the market stage. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0061] Figure 1 A flow chart of a load performance testing method provided in this embodiment;
[0062] Figure 2 A schematic diagram of the structure of a load performance testing device provided in this embodiment;
[0063] Figure 3 A schematic diagram of the structure of an electronic device provided in this embodiment. DETAILED DESCRIPTION
[0064] The embodiment of the present application solves the technical problem in the prior art that the load state of the vehicle during operation cannot be simulated when performing a single-board test on the controller by providing a load performance testing method.
[0065] The technical solution of the embodiment of the present application is to solve the above technical problems, and the overall idea is as follows:
[0066] This embodiment installs a test application on the target controller to be tested, and then responds to the test start instruction, controls the load of the target controller to increase to the load limit value according to the preset change characteristics, controls the target controller to remain in the state of the load limit value and lasts for a first preset time to simulate the load operation process; then obtains the operating state parameters collected by the test application from the load operation process of the target controller; finally, determines the load performance of the target controller according to the operating state parameters. It can be seen that this embodiment can improve the test efficiency and accuracy. By simulating the CPU load usage in the actual operation scenario, it can discover potential software and operating system problems of the target controller in the single-board test stage, which greatly reduces the probability of discovering problems in the whole vehicle test stage or the market side user use scenario, thereby improving the test efficiency and accuracy. Discovering problems in advance in the single-board test stage can reduce the cost of subsequent problem investigation and resolution in the whole vehicle test stage or the market stage.
[0067] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0068] First of all, the term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0069] With the improvement of automobile electronics, more and more controllers on automobiles are using A core and UNIX-like operating systems such as Linux / QNX running on it, such as ECU (Electronic Control Unit). However, compared with traditional RTOS operating systems, Linux / QNX operating systems are more complex in CPU (Central Processing Unit) load management and support multi-task concurrent execution, which makes Linux / QNX operating systems dynamic and uncertain in load. When the load is too high, it will occasionally cause system crashes, abnormal application operation, log loss and other problems, resulting in unstable load performance of the controller, and log loss makes it impossible to effectively analyze system problems. It can be seen that it is necessary to test the load performance of the controller during the vehicle development process.
[0070] In the related art, when the controller is tested for single-board software, the load test is usually performed in a way that the CPU load remains unchanged. The load during the test is much lower than the load during the operation of the entire vehicle. In this way, the reliability problems of the controller system (such as application software core dump, operating system core dump and other serious problems) cannot be discovered in time during the single-board software test. If a system reliability problem occurs during the vehicle testing process or after the vehicle leaves the factory, it will be difficult to troubleshoot the problem, the troubleshooting cost is high, and it will also lead to a poor user experience.
[0071] In order to solve the above problems, this embodiment provides Figure 1 A load performance testing method is shown, the method comprising steps S11 to S14.
[0072] Step S11, installing a test application on the target controller to be tested; matching the test application with the target controller;
[0073] Step S12, receiving a test start instruction and driving a test application program to respond to the test start instruction, controlling the load of the target controller to increase to a load limit value according to a preset change characteristic, and controlling the target controller to remain at the load limit value state for a first preset time period to simulate a load operation process;
[0074] Step S13, obtaining the running state parameters collected by the test application from the load running process of the target controller;
[0075] Step S14, determining the load performance of the target controller according to the operating state parameters.
[0076] The execution subject of the load performance testing method provided in this embodiment may be a test management system installed in a host computer, a mobile terminal, a load testing device, etc., and this embodiment does not impose any limitation on this.
[0077] Regarding step S11 , a test application is installed on the target controller to be tested; the test application is matched with the target controller.
[0078] The target controller can be any controller with a UNIX operating system installed. The test application is an independent QNX / L i nux application that can be independently and conveniently installed on the target controller. The test management system installs the test application on the target controller by software update, usually uploading the test application to the storage medium of the target controller and ensuring that the test application can run on the operating system of the target controller, that is, ensuring that the test application matches the target controller, without modifying the existing system. It is a flexible and efficient test program.
[0079] The test application is used to receive load test instructions and load test parameters sent by the test management system to simulate the load change process of the target controller during the actual use of the vehicle, to generate calculation load or simulate user operations, and then evaluate the performance of the ECU under high load conditions. Load test instructions include test start instructions, load adjustment instructions, operating status parameter collection instructions, test termination instructions, etc. Load test parameters include load limit value, test duration, load change characteristics, expected system response, number of tests, test scenarios, etc.
[0080] Load test parameters can be input into the test application through configuration files in formats such as JSON (JavaScript Object Notation), XML (Extensible Markup Language), YAML (YAML Object Markup Language), and INI (initialization). JSON is a lightweight data exchange format that is easy to read and write, and is also easy for machines to parse and generate. In actual implementation, JSON format can be preferred for making configuration files.
[0081] The test application can parse the configuration file containing the load test parameters and convert the parameters in the configuration file into instructions and data that can be recognized by the system of the target controller. Specifically, the text data in the configuration file is converted into data structures (such as variables, objects, etc.) that the program can understand and operate.
[0082] The test duration in the load test parameters depends on the test scenarios that need to be covered and the stability assessment required. It may be determined based on the expected system runtime, execution time of a specific task, or time constraints of the test budget.
[0083] The load change characteristics in the load test parameters may include the step size of the load growth, the frequency of the load change, etc. The step size and the change frequency can be pre-set according to the test requirements, and they define the amplitude and speed of the CPU load increase. Specifically, the determination of the step size and frequency is usually based on the performance indicators and test objectives of the system. The step size may be determined based on the minimum load increment that the system can handle stably, and the frequency may be determined based on the fastest rate at which the system responds to load changes. The step size may be a percentage of the CPU utilization, and the frequency may be the time interval of the load change. The step size and the change frequency can be determined by experimental design, system performance analysis, or historical data.
[0084] Furthermore, the granularity control of step size and change frequency will affect the efficiency and accuracy of the entire load testing process. In testing, granularity refers to the smallest unit in which test parameters can be adjusted. Smaller granularity can provide more detailed control and more accurate test results, but may require more computing resources and time.
[0085] A larger granularity may result in inaccurate test results, but it can reduce test time and resource consumption. A smaller granularity can provide more detailed performance data, but it may increase test time and computing burden. In actual operation, you can choose the appropriate test granularity based on the specific test objectives and resource conditions.
[0086] Typically, you can set 10% as the load change step, which means that each increase or decrease in CPU load is at least 10% of CPU usage. Users can adjust the granularity as needed. For example, in order to test the system response more finely, the granularity may be reduced to 1%.
[0087] The number of tests in the load test parameters refers to the total number of times the entire test process is repeated. Each test includes a series of predefined load changes and monitoring cycles. The number of tests can be determined based on statistical significance, resource availability, or test cycle requirements.
[0088] The test scenarios in the load test parameters include scenarios consisting of different working conditions and system states, such as different load levels, user behavior patterns, system configurations, etc. The selection of scenarios should cover normal scenarios, peak scenarios, and abnormal scenarios.
[0089] After installing the test application on the target controller, reset the target controller to trigger the reset mechanism of the target controller's hardware and software. After the target controller is reset, it will be powered on again, load its operating system and application, and enter a normal working state. When the target controller completes the startup process and enters a stable operating state, it can wait to receive a test startup instruction. After resetting the target controller, the load test process is performed to ensure that the target controller starts the load test from a known state, thereby improving the accuracy of the load performance test.
[0090] Regarding step S12, a test start instruction is received and a test application is driven to respond to the test start instruction, the load of the target controller is controlled to increase to the load limit value according to a preset change characteristic, and the target controller is controlled to remain in the state of the load limit value and last for a first preset time to simulate the load operation process.
[0091] The test management system receives the test start instruction generated by the user trigger, then drives the test application to respond to the test start instruction, and controls the load of the target controller to gradually increase to the load limit value according to the preset change characteristics (recorded as stage one), and then controls the target controller to remain in the state of the load limit value and continue for the first preset time (recorded as stage two). Stage one and stage two together constitute the process of simulated load operation.
[0092] After completing the first and second phases, that is, after the simulated load operation process, it is also possible to detect whether the target controller meets the test cycle conditions and the test termination conditions.
[0093] When the target controller meets the test cycle condition, the target controller is reset and the simulated load operation process is repeated until the target controller meets the test termination condition. That is, when the target controller meets the test cycle condition, the target controller is reset first, and then stage one and stage two are re-executed. When the test termination condition is met, stage one and stage two are stopped, that is, when the target controller meets the test termination condition, the load test process is exited. The preset change characteristics involved in the process of repeatedly executing stage one and stage two may be the same or different.
[0094] The cycle condition includes that the execution times of the simulated load operation process is less than the first preset times. That is, when the execution times of stage 1 and stage 2 are less than the first preset times, stage 1 and stage 2 need to be repeatedly executed again.
[0095] In addition, when the number of executions of the simulated load operation process is less than the first preset number of times, the loop condition also includes at least one of the following conditions: the load of the target controller is greater than the load limit value and lasts for a preset limit time; the target controller crashes and the crash duration reaches the preset crash duration. Among them, the crash of the target controller refers to the situation where the target controller cannot continue to run. For example, if the system of the target controller crashes and lasts for a certain period of time, it is considered that the target controller is crashed, or if the application of the target controller crashes and lasts for a certain period of time, it is considered that the target controller is crashed. In addition, possible abnormal states include but are not limited to system crashes, memory leaks, response timeouts, abnormal errors, etc., which can also be considered as crashes of the target controller.
[0096] The termination condition includes that the number of executions of the simulated load operation process is greater than or equal to the first preset number of times. When the number of executions of the simulated load operation process is less than the first preset number of times, the termination condition also includes at least one of the following conditions: the total duration of the simulated load operation process is greater than or equal to the preset test duration. The preset test duration is determined according to the user's test requirements for the target controller. For example, if the project requires that the load test of the target controller takes a maximum of 32 hours, then the preset test duration can be less than or equal to 32 hours.
[0097] The above-mentioned phase one and phase two are respectively described as follows.
[0098] [Phase 1] The load of the target controller is controlled to gradually increase to the load limit value according to the preset change characteristics. Phase 1 may include multiple implementation methods, and various implementation methods may be used alone or in combination.
[0099] Method A: The control target controller increases the load to the load limit value using multi-threading or multi-processing.
[0100] Method B: Control the target controller to perform intensive computing tasks to increase the load to the load limit value.
[0101] Method C: The control target controller simulates user operation to increase the load to the load limit value.
[0102] Mode D: Control the target controller to increase the load to the load limit value according to the load change curve; the load change curve includes at least one of linear, sinusoidal and step-type.
[0103] That is, for methods A, B, C, and D, the preset change characteristics may include at least one of using multi-threading or multi-processing, executing intensive computing tasks, simulating user operations, and using a load change curve.
[0104] Methods A, B, C, and D correspond to a method of increasing the load of the target controller respectively.
[0105] Regarding method A, multi-threading or multi-process technology is used to simulate different CPU loads on the four cores of the target controller's A core. The specific process is to write code to create multiple threads or processes, each of which performs independent tasks to simulate different workloads. These tasks may be computationally intensive, such as cyclic calculations, data processing, etc., with the purpose of consuming CPU resources and simulating high load conditions. The load simulation processes of the four cores can be independent of each other, for example, each core simulates a different load mode; the load simulation processes of the four cores can also be related, for example, there is some coordination or synchronization between the load simulations of the four cores.
[0106] Regarding mode B, the target controller is used to execute tasks with large computational load to achieve the purpose of increasing the load utilization rate. Each thread or each process in mode A can also execute intensive computational tasks respectively to further increase the load utilization rate.
[0107] Regarding method C, the user's operations in actual vehicle usage scenarios are simulated, such as simulating listening to music, navigation, games, automatic driving and other scene operations to increase the load utilization rate.
[0108] Regarding mode D, the load change curve can be set to multiple modes such as linear growth, sinusoidal growth, and step growth. These modes refer to the law of load change over time. For example, linear growth means that the load increases at a fixed rate, sinusoidal growth means that the load changes periodically, and step growth means that the load increases significantly at a specific time point. These modes can be selected according to the actual operation scenario of the ECU.
[0109] Method E: (including steps S1211 to S1213).
[0110] Step S1211, controlling the load of the target controller to increase to a load limit value in N stages, where N is a positive integer, and the average load of the next stage in two adjacent stages is higher than the average load of the corresponding previous stage;
[0111] Step S1212, for any adjacent previous stage and next stage in the N stages, the load of the control target controller is increased to the previous load preset value according to the previous preset sub-change feature in the previous stage, and the load of the control target controller is maintained at the load preset value in the previous stage;
[0112] Step S1213, when the target controller maintains a steady state in the previous stage and continues for the previous preset time, the load of the target controller is controlled to enter the next stage of change, and the load of the target controller is controlled to increase to the next load preset value according to the next preset sub-change feature in the next stage.
[0113] Divide the load utilization rate of the target controller into N intervals in order from small to large, and each interval corresponds to a load change stage. The load utilization rate of these N intervals can be evenly divided or unequally divided, which can be selected according to the actual usage. The larger the N, the more detailed load performance data can be provided, but it may increase the test time and calculation burden. The smaller the N, the less accurate the test results may be, but it can reduce the test time and resource consumption. It should be noted that the average load of the next stage in two adjacent stages is higher than the average load of the corresponding previous stage.
[0114] Each stage corresponds to a different load interval, the maximum load value of the adjacent previous stage may be the minimum load value of the next stage, and the preset sub-change characteristics corresponding to each stage may be the same or different, and may specifically be at least one change characteristic corresponding to methods A, B, C, and D. The preset load value corresponding to each stage is the maximum load value of the stage.
[0115] When the load of the target controller gradually increases to the corresponding maximum load value within the load range in the current stage, the target controller is kept at the current maximum load value state until the target controller maintains a steady state and reaches the corresponding preset time, and then continues to enter the next stage of load growth.
[0116] That is, the test application starts to gradually increase the CPU load according to the test parameters defined in the configuration file. When the load reaches a certain stage, the test application will wait for a preset period of time to observe the performance of the ECU under the current load level. This waiting time allows the system to reach a steady state so that accurate performance data can be collected. During the waiting period, the test application will monitor the performance indicators of the ECU, such as CPU usage, memory usage, system response time, etc.
[0117] [Phase 2] The target controller is controlled to remain at the load limit value for a first preset time period.
[0118] The target controller is controlled to fluctuate within a preset load range where the load limit value is located and lasts for a first preset time period.
[0119] When the CPU load increases to the preset limit, the test application will maintain the current load level according to the test plan, or continue to adjust the load according to the predefined load change curve (such as linear, sine wave, step, etc.). While maintaining or changing the load, the test application continues to monitor the performance of the ECU to ensure the stability and responsiveness of the system under high load conditions.
[0120] Regarding step S13, the operating status parameters collected by the test application from the load operation process of the target controller are obtained.
[0121] During the execution of step S12, step S13 is also executed at the same time, that is, during the entire load test process, if the ECU has abnormal conditions, such as system crashes, memory leaks, etc., the test application can capture these abnormalities and record relevant field data, such as error logs, system status snapshots, etc. In addition, all data will be collected during the test, including CPU load curves, memory usage, application running status, and system stability indicators, and will be transmitted to the test management system for in-depth analysis of these data to evaluate the performance and reliability of the ECU under different load conditions.
[0122] During the test process, the test application can provide feedback on the test progress according to the test duration (eg, 5 hours have passed and a total of 32 hours of testing are required) or the test stage (eg, 5% of the test tasks have been completed).
[0123] The operating status parameter includes at least one of the following status parameters:
[0124] Actual load, actual load change characteristics, memory usage characteristics, system response time, logs, system crash status, number of system crashes, memory leak status, system status snapshot, temperature, application running status (response time, error rate, number of crashes), trouble-free running time (total time, shortest time, longest time), and resource utilization.
[0125] Although the test application controls the target controller to perform load changes according to the preset change characteristics, the real-time load change is not exactly the same as the injected load change characteristics because the response of the ECU may be affected by other system activities or resource limitations.
[0126] The test application can detect anomalies during the load test and take appropriate measures, such as recording error logs, saving system status, restarting the test, etc. The test application can collect and save all relevant information during the test, including but not limited to CPU and memory usage, system logs, performance indicators, etc.
[0127] Regarding step S14, the load performance of the target controller is determined according to the operating state parameters.
[0128] The operating status parameters include the actual CPU load curve during the load operation, which is drawn by recording the CPU usage regularly (according to the predicted acquisition frequency) during the test.
[0129] The operating status parameters include memory usage, which can help evaluate the system's memory management capabilities under high load conditions and whether there are problems such as memory leaks.
[0130] The running status parameters include the running status of the application on the target controller, including the response time, error rate, number of crashes, etc. of the application.
[0131] The operating status parameters include system stability indicators, which include the system's trouble-free operating time (including the total time, the shortest time, the longest time), the number of system crashes, resource utilization, etc.).
[0132] Comprehensively analyze the operating status parameters in real time or in the future to evaluate the reliability and performance of the system. For example, if the system can still maintain stable operation under high load without performance bottlenecks or crashes, then the reliability and performance of the system can be considered good. On the contrary, if performance degradation or system instability is found, further optimization may be required.
[0133] The test management system receives all operating status parameters from the test application and performs in-depth analysis, such as calculating performance indicators, identifying performance bottlenecks, and evaluating system stability. The analysis results will be used to evaluate the performance and reliability of the ECU and provide a basis for further optimization. Specifically, a test report can be generated. The report will include all data and analysis results collected during the test, as well as a comprehensive evaluation of the ECU performance. Based on the operating status parameters during the simulated load operation, the performance of the ECU under various expected and extreme load conditions can be fully evaluated, potential problems can be discovered in a timely manner, and data support can be provided for system optimization and improvement.
[0134] In summary, this embodiment installs a test application on the target controller to be tested, and then responds to the test start instruction, controls the load of the target controller to increase to the load limit value according to the preset change characteristics, controls the target controller to remain in the state of the load limit value and lasts for a first preset time to simulate the load operation process; then obtains the operating state parameters collected by the test application from the load operation process of the target controller; finally, determines the load performance of the target controller according to the operating state parameters. It can be seen that this embodiment can improve the test efficiency and accuracy. By simulating the CPU load usage in the actual operation scenario, it can discover potential software and operating system problems of the target controller in the single-board test stage, which greatly reduces the probability of discovering problems in the whole vehicle test stage or the market side user usage scenario, thereby improving the test efficiency and accuracy. Discovering problems in advance in the single-board test stage can reduce the cost of subsequent problem investigation and resolution in the whole vehicle test stage or the market stage.
[0135] This embodiment can test the stability and reliability of the system by simulating sudden changes in CPU load in extreme scenarios, which helps to ensure that the system can maintain stable operation in various actual operation scenarios and improve the overall reliability and stability of the system.
[0136] This embodiment of the present invention uses a JSON file as a configuration file to support flexible test parameter configuration. At the same time, through modular design, it can be easily expanded to new test scenarios and different target controller types to meet different test requirements. Specifically, new test scenarios can be introduced by adding or modifying parameters in the configuration file to adapt to different test requirements. For the expansion of ECU types, an adapter or interface compatible with a specific ECU can be developed to enable the test system to interact with different hardware and software environments. The load testing method provided in this embodiment allows for adapting to new test requirements or ECU types by adding new modules or functions without changing the core system architecture of the target controller, thereby improving the adaptability of the system and future development potential.
[0137] The test application provided in this embodiment can be pushed to the QNX operating system separately without modifying or upgrading the original system, making the installation and use of the load performance testing method provided in this embodiment very simple and convenient.
[0138] In summary, the load performance testing method provided in this embodiment improves test efficiency and accuracy, reduces the cost of problem troubleshooting and solving, enhances system reliability and stability, and has flexibility and scalability, and is easy to install and use by simulating CPU load usage in actual operating scenarios.
[0139] Based on the same inventive concept, this embodiment provides Figure 2 A load performance testing device is shown, the device comprising:
[0140] An installation module 21 is used to install a test application on a target controller to be tested; the test application is matched with the target controller;
[0141] The load simulation module 22 is used to receive a test start instruction and drive the test application program to respond to the test start instruction, control the load of the target controller to increase to a load limit value according to a preset change characteristic, and control the target controller to remain in a state of the load limit value for a first preset time period to simulate a load operation process;
[0142] The state parameter acquisition module 23 is used to acquire the operation state parameters collected by the test application from the load operation process of the target controller;
[0143] The load performance evaluation module 24 is used to determine the load performance of the target controller according to the operating state parameters.
[0144] Furthermore, the device also includes a circulation module, which is used to:
[0145] After the simulated load operation process, when the target controller meets the test cycle conditions, the target controller is reset and the simulated load operation process is repeated until the target controller meets the test termination conditions; the cycle conditions include that the number of executions of the simulated load operation process is less than the first preset number; the termination conditions include that the number of executions of the simulated load operation process is greater than or equal to the first preset number.
[0146] Further, when the number of executions of the simulated load operation process is less than the first preset number, the loop condition further includes at least one of the following conditions:
[0147] The load of the target controller is greater than the load limit value and lasts for a preset limit time;
[0148] The target controller crashes and the crash duration reaches the preset crash duration.
[0149] Further, the load simulation module 22 is used to perform at least one of the following methods:
[0150] The control target controller increases the load to the load limit value by using multi-threading or multi-process;
[0151] Controlling the target controller to perform intensive computing tasks to increase the load to a load limit value;
[0152] The control target controller simulates user operation to increase the load to a load limit value;
[0153] Controlling the target controller to increase the load to a load limit value according to a load change curve; the load change curve includes at least one of linear, sinusoidal and step-type;
[0154] The preset change characteristics include at least one of using multi-threading or multi-processing, executing intensive computing tasks, simulating user operations, and using a load change curve.
[0155] Furthermore, the load simulation module 22 is used for:
[0156] The load of the control target controller is increased to a load limit value in N stages, where N is a positive integer, and the average load of the next stage in two adjacent stages is higher than the average load of the corresponding previous stage;
[0157] For any adjacent previous stage and next stage in the N stages, the load of the control target controller is increased to the previous load preset value according to the previous preset sub-change feature in the previous stage, and the load of the control target controller is maintained at the load preset value in the previous stage;
[0158] When the target controller maintains a steady state in the previous stage and lasts for the previous preset time, the load of the target controller is controlled to enter the next stage of change, and the load of the target controller is controlled to increase to the next load preset value according to the next preset sub-change feature in the next stage.
[0159] Furthermore, the operating status parameter includes at least one of the following status parameters:
[0160] Actual load, actual load change characteristics, memory usage characteristics, system response time, logs, system crash status, number of system crashes, memory leak status, system status snapshot, temperature, application running status, trouble-free running time, and resource utilization.
[0161] Furthermore, the load simulation module 22 is used for:
[0162] The target controller is controlled to fluctuate within a preset load range where the load limit value is located and lasts for a first preset time period.
[0163] Based on the same inventive concept, this embodiment provides Figure 3 An electronic device as shown includes:
[0164] processor;
[0165] A memory 32 for storing instructions executable by the processor 31;
[0166] The processor 31 is configured to execute to implement a load performance testing method as provided above.
[0167] Based on the same inventive concept, this embodiment provides a non-temporary computer-readable storage medium. When the instructions in the storage medium are executed by the processor 31 of the electronic device, the electronic device can execute a load performance testing method as provided above.
[0168] Since the electronic device introduced in this embodiment is an electronic device used to implement the information processing method in the embodiment of the present application, based on the information processing method introduced in the embodiment of the present application, a person skilled in the art can understand the specific implementation of the electronic device of the present embodiment and its various variations, so how the electronic device implements the method in the embodiment of the present application is not described in detail here. As long as a person skilled in the art implements the electronic device used by the information processing method in the embodiment of the present application, it belongs to the scope of protection of this application.
[0169] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0170] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0171] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0172] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0173] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0174] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A load performance testing method, characterized in that: The method comprises: Installing a test application on a target controller to be tested; the test application is matched with the target controller; receiving a test start instruction and driving the test application program to respond to the test start instruction, controlling the load of the target controller to increase to a load limit value according to a preset change characteristic, and controlling the target controller to remain at the load limit value for a first preset time period to simulate a load operation process; Acquire the running state parameters collected by the test application from the load running process of the target controller; The load performance of the target controller is determined according to the operating state parameter.
2. The method according to claim 1, characterized in that After simulating the load operation process, the method further includes: When the target controller meets the test cycle conditions, the target controller is reset and the load operation process is repeatedly simulated until the target controller meets the test termination conditions; the cycle conditions include that the number of executions of the simulated load operation process is less than a first preset number of times; the termination conditions include that the number of executions of the simulated load operation process is greater than or equal to the first preset number of times.
3. The method according to claim 2, characterized in that When the number of executions of the simulated load operation process is less than the first preset number, the cycle condition further includes at least one of the following conditions: The load of the target controller is greater than the load limit value and lasts for a preset limit time period; The target controller crashes and the crash duration reaches a preset crash duration.
4. The method according to claim 1, characterized in that The controlling the load of the target controller to increase to a load limit value according to a preset change characteristic includes at least one of the following methods: Controlling the target controller to increase the load to the load limit value by using multi-threading or multi-process; Controlling the target controller to execute intensive computing tasks to increase the load to the load limit value; Controlling the target controller to simulate a user operation to increase the load to the load limit value; Controlling the target controller to increase the load to the load limit value according to a load change curve; the load change curve includes at least one of linear, sinusoidal and step-type; The preset change characteristics include at least one of using multi-threading or multi-processing, executing intensive computing tasks, simulating user operations, and using a load change curve.
5. The method according to claim 1, characterized in that The step of controlling the load of the target controller to increase to a load limit value according to a preset change characteristic comprises: Controlling the load of the target controller to increase to the load limit value in N stages, where N is a positive integer, and the average load of the next stage in two adjacent stages is higher than the average load of the corresponding previous stage; For any adjacent previous stage and next stage in the N stages, control the load of the target controller to increase to a previous load preset value according to a previous preset sub-change feature in the previous stage, and control the load of the target controller to remain at the load preset value in the previous stage; When the target controller maintains a steady state in the previous stage and continues for a preset time period, the load of the target controller is controlled to enter the next stage of change, and the load of the target controller is controlled to increase to the next load preset value in the next stage according to the next preset sub-change feature.
6. The method according to claim 1, characterized in that The operating status parameter includes at least one of the following status parameters: Actual load, actual load change characteristics, memory usage characteristics, system response time, logs, system crash status, number of system crashes, memory leak status, system status snapshot, temperature, application running status, trouble-free running time, and resource utilization.
7. The method according to claim 1, characterized in that The controlling the target controller to maintain the state of the load limit value for a first preset time period includes: The target controller is controlled to fluctuate within a preset load range where the load limit value is located and last for the first preset time period.
8. A load performance testing device, characterized in that: The device comprises: An installation module, used for installing a test application on a target controller to be tested; the test application matches the target controller; A load simulation module, configured to receive a test start instruction and drive the test application program to respond to the test start instruction, control the load of the target controller to increase to a load limit value according to a preset change characteristic, and control the target controller to remain at the load limit value for a first preset time period to simulate a load operation process; A state parameter acquisition module, used to acquire the operation state parameters collected by the test application from the load operation process of the target controller; A load performance evaluation module is used to determine the load performance of the target controller according to the operating state parameters.
9. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute to implement a load performance testing method as described in any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to implement a load performance testing method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Program testing method and controller
CN103365768A
Load testing method, device and system, storage medium and pressure measurement server
CN107480015A
Automobile load simulation test method and system, computer and readable storage medium
CN114771431A
Test system and test method
CN116893368A
Performance test method and device, electronic equipment and storage medium
CN117421196A
Cited By
Load test method and system for aviation power supply system
CN119689317A
Processor test method, device, medium and program product
CN120670239A
Processor testing methods, apparatus, media, and program products
CN120670239B
Load optimization method of automobile controller and related equipment
CN121386728A
