Vehicle infotainment system performance testing method, system, device and storage medium
By running load simulation tools in the vehicle and machine system and performing multiple test processes to collect and display the performance data of the vehicle and machine system, the problem of insufficient comprehensive testing methods is solved, and the performance evaluation of the vehicle and machine system in different scenarios is achieved.
Patent Information
- Application Number
- CN202211013866.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-23
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2042-08-23
AI Technical Summary
The existing performance testing methods for vehicle-machine system are not comprehensive enough to be able to perform performance testing for vehicle-machine system in various usage scenarios.
By obtaining the vehicle system and load simulation tools, the load simulation tools are run in the vehicle system to achieve the target load rate, perform test processes such as process exit, context switching, scheduling, interrupts and off-interruptions, collect corresponding time data, and display the performance of the vehicle system through visual graphics.
A comprehensive test of vehicle system performance is realized, and process processing performance can be evaluated under different load scenarios, providing more accurate performance data and display.
Smart Images

Figure CN115408274B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of system testing, and particularly to a method, a system, a device and a storage medium for testing the performance of a vehicle-mounted system. Background Art
[0002] In recent years, with the continuous development of vehicle intelligence, higher requirements have been put forward for aspects such as the real-time performance, stability and security of the operating system. Among them, as the basic unit for the operating system to allocate resources, the performance of process scheduling will become the core link affecting the performance of the operating system. However, the existing testing methods are not comprehensive enough for the performance testing of the vehicle-mounted system, and at the same time, the performance testing is not carried out for various usage scenarios where the vehicle-mounted system is located. Summary of the Invention
[0003] In view of the above-mentioned disadvantages of the prior art, the present invention provides a method, a system, a device and a storage medium for testing the performance of a vehicle-mounted system to solve the above technical problems.
[0004] The method for testing the performance of a vehicle-mounted system provided by the present invention includes:
[0005] Obtain a vehicle-mounted system and a load simulation tool;
[0006] Run the load simulation tool in the vehicle-mounted system so that the load rate of the vehicle-mounted system is the target load rate;
[0007] Execute a process exit test process in the vehicle-mounted system at the target load rate to obtain process exit time data; execute a process context switch test process in the vehicle-mounted system at the target load rate to obtain process context switch time data; execute a process scheduling test process in the vehicle-mounted system at the target load rate to obtain process scheduling delay data; execute a process interruption test process in the vehicle-mounted system at the target load rate to obtain process interruption delay data; execute a process disable interrupt test process in the vehicle-mounted system at the target load rate to obtain process disable interrupt time data; execute a process disable preemption test process in the vehicle-mounted system at the target load rate to obtain process disable preemption time data;
[0008] Based on the process exit time data, the process context switch time data, the process scheduling delay data, the process interruption delay data, the process disable interrupt time data, and the process disable preemption time data, establish a visualization graph and display the performance of the vehicle-mounted system with the visualization graph.
[0009] In an embodiment of the present invention, executing a process exit test process in the vehicle-mounted system at the target load rate to obtain process exit time data includes:
[0010] Create n first processes in the in-vehicle system at the target load rate, and obtain the creation time point t of the i-th first process among them 1i ;
[0011] Exit the first process while the first process is being created, and record the actual exit time point t of the first process ’ 1i ;
[0012] According to the creation time point t 1i , the exit time point t ’ 1i Obtain the actual exit time Δt of the first process 1i , the actual exit time Δt of the first process 1i = t ’ 1i - t 1i ;
[0013] Statistically analyze the actual exit times of multiple first processes to obtain the maximum exit time Δt 1imax ; And perform an average operation on the actual exit times of n first processes to obtain the average exit time Δt 1ip , the average exit time
[0014] In an embodiment of the present invention, execute a process context switching test process in the in-vehicle system at the target load rate to obtain process context switching time data, including:
[0015] Create multiple second processes in the in-vehicle system at the target load rate;
[0016] Pass a pre-generated token through the multiple second processes. When the i-th second process receives the token, record the time point t when the i-th second process receives the token 2i , and pass the token to the (i + 1)-th second process, and record the time point t when the (i + 1)-th second process receives the token 2(i+1) ;
[0017] According to the time point t 2i , the time point t 2(i+1) Calculate the context switching time Δt between the i-th second process and the (i + 1)-th second process 2i , the context switching time Δt 2i = t 2(i+1) - t 2i ;
[0018] Repeat the token passing n times to obtain n context switching times, and statistically analyze the n context switching times to obtain the maximum context switching time Δt 2imax ; and perform an averaging operation on the n context switching times to obtain the average context switching time Δt 2ip , the average context switching time
[0019] In an embodiment of the present invention, execute a process scheduling test process in the in-vehicle system at the target load rate to obtain process scheduling delay data, including:
[0020] Create a third process in the in-vehicle system at the target load rate, and record the creation time point t of the third process 31 , the third process is a real-time process;
[0021] According to the preset cycle time t 32 Periodically wake up the third process, and record the wake-up time point t of the third process 33 ;
[0022] According to the creation time point t of the third process 31 , the cycle time t 32 , the wake-up time t of the third process 33 Calculate the scheduling delay data Δt3, where the scheduling delay data Δt3 = t 33 -t 32 -t 31 .
[0023] In an embodiment of the present invention, execute a process interruption test process in the in-vehicle system at the target load rate to obtain process interruption delay data, including:
[0024] Create a fourth process in the in-vehicle system at the target load rate, and the fourth process is a real-time process;
[0025] Create a first interrupt task, and trigger a pre-set first interrupt program according to the first interrupt task. The first interrupt program is used to interrupt the fourth process, and at the same time record the creation time point t of the first interrupt task 41 ;
[0026] Exit the first interrupt program when the first interrupt program is triggered, and record the actual exit time point t of the first interrupt program 42 ;
[0027] According to the creation time point t of the first interrupt task 41 , the actual exit time point t of the interrupt program 42Obtain the process interruption delay data Δt4, where the process interruption delay data Δt4 = t 42 -t 41 .
[0028] In an embodiment of the present invention, execute a process disable interrupt test process in the in-vehicle system at the target load rate to obtain process disable interrupt time data, including
[0029] Create a fifth process in the in-vehicle system at the target load rate, where the fifth process is a real-time process;
[0030] Regularly create multiple second interrupt tasks, and trigger a pre-set second interrupt program according to the second interrupt tasks. The second interrupt program is used to interrupt the fifth process, and record the creation time points t of multiple second interrupt tasks 51 and the trigger time points t of multiple second interrupt programs 52 ;
[0031] According to the creation time points t of multiple second interrupt tasks 51 and the trigger time points t of multiple second interrupt programs 52 calculate multiple process disable interrupt times Δt5, where the process disable interrupt time Δt5 = t 52 -t 51 ;
[0032] Statistically analyze the multiple process disable interrupt times Δt5 to obtain the maximum process disable interrupt time Δt 5max .
[0033] In an embodiment of the present invention, execute a process disable preemption test process in the in-vehicle system at the target load rate to obtain process disable preemption time data, including:
[0034] Create a sixth process in the in-vehicle system at the target load rate, where the sixth process is a real-time process
[0035] Regularly create multiple third interrupt tasks, and trigger a pre-set third interrupt program according to the third interrupt tasks. The third interrupt program is used to interrupt the sixth process;
[0036] Exit the third interrupt program when the third interrupt program is triggered, and record the actual exit time point t of the third interrupt program 61 ;
[0037] After exiting the third interrupt program, determine whether process preemption occurs in the in-vehicle system, and record the judgment time point t when the judgment result is obtained 62 ;
[0038] According to the actual exit time points t of multiple third interrupt programs61 Multiple said judgment time points t 62 Calculate the preemption time Δt6 of multiple processes turning off;
[0039] Statistically analyze the preemption time Δt6 of multiple processes turning off to obtain the maximum preemption time Δt of processes turning off 6max .
[0040] In an embodiment of the present invention, based on the process exit time data, the context switching time data of the process, the process scheduling delay data, the process interrupt delay data, the process interrupt disable time data, and the process preemption disable time data, the performance test of the in-vehicle system is completed, including:
[0041] Taking the target load rate as the first dimension, and constructing a two-dimensional visualization graph with the process exit time data, the context switching time data of the process, the process scheduling delay data, the process interrupt delay data, and the process interrupt disable time data as the second dimension, and displaying the performance of the in-vehicle system with the visualization image.
[0042] The present invention also provides an in-vehicle system performance test system, and the system includes:
[0043] An acquisition module, used to obtain an in-vehicle system and a load simulation tool;
[0044] A load simulation module, used to run the load simulation tool in the in-vehicle system so that the load rate of the in-vehicle system is the target load rate;
[0045] A process execution module, used to execute a process exit test process in the in-vehicle system with the target load rate to obtain process exit time data; execute a process context switching test process in the in-vehicle system with the target load rate to obtain context switching time data of the process; execute a process scheduling test process in the in-vehicle system with the target load rate to obtain process scheduling delay data; execute a process interrupt test process in the in-vehicle system with the target load rate to obtain process interrupt delay data; execute a process interrupt disable test process in the in-vehicle system with the target load rate to obtain process interrupt disable time data; execute a process preemption disable test process in the in-vehicle system with the target load rate to obtain process preemption disable time data;
[0046] A test module, used to complete the performance test of the in-vehicle system based on the process exit time data, the context switching time data of the process, the process scheduling delay data, the process interrupt delay data, the process interrupt disable time data, and the process preemption disable time data.
[0047] The present invention also provides an electronic device, and the electronic device includes:
[0048] One or more processors;
[0049] A storage device for storing one or more programs, which, when executed by the one or more processors, cause the electronic device to implement the vehicle-mounted system performance testing method as described above.
[0050] The present invention also provides a computer-readable storage medium, characterized in that a computer program is stored thereon, which, when executed by a processor of a computer, causes the computer to execute the vehicle-mounted system performance testing method as described above.
[0051] Advantages of the present invention: In the vehicle-mounted system performance testing method, system, device and storage medium of the present invention, by running a load simulation tool in the vehicle-mounted system to make the load rate of the vehicle-mounted system the target load rate; executing a process exit test process, a process context switch test process, a process scheduling test process, a process interruption test process, a process interrupt disable test process, and a process preemption disable test process in the vehicle-mounted system at the target load rate; obtaining process exit time data, process context switch time data, process scheduling delay data, process interruption delay data, process interrupt disable time data, and process preemption disable time data; therefore, the test data of the present invention is comprehensive, and the processing performance of the vehicle-mounted system for processes under different loads in various scenarios is simulated.
[0052] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit this application. Description of the Drawings
[0053] The drawings herein are incorporated into the specification and form a part of this specification, showing embodiments consistent with this application, and are used together with the specification to explain the principles of this application. Obviously, the drawings in the following description are only some embodiments of this application, and those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts. In the drawings:
[0054] Figure 1 is an application scenario diagram of the vehicle-mounted system performance testing method shown in an exemplary embodiment of this application
[0055] Figure 2 is a flowchart of the vehicle-mounted system performance testing method shown in an exemplary embodiment of this application;
[0056] Figure 3 is a timing diagram of the process scheduling test process;
[0057] Figure 4It is a block diagram of a vehicle-mounted system performance testing system shown in an exemplary embodiment of the present application;
[0058] Figure 5 It shows a schematic structural diagram of a computer system of an electronic device suitable for implementing the embodiments of the present application. Detailed implementation manners
[0059] The following will describe the embodiments of the present invention with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific implementation manners. Various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for explaining the present invention, rather than for limiting the protection scope of the present invention.
[0060] It should be noted that the diagrams provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner. Therefore, only the components related to the present invention are shown in the diagrams, rather than being drawn according to the number, shape, and size of the components in actual implementation. The type, quantity, and ratio of each component in actual implementation can be arbitrarily changed, and the component layout type may also be more complex.
[0061] In the following description, a large number of details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.
[0062] Figure 1 It is an application scenario diagram of a vehicle-mounted system performance testing method shown in an exemplary embodiment of the present application. As Figure 1 shown, the vehicle-mounted system is installed in the terminal device. The terminal device obtains test tools and test data through the server, and then executes the test process.
[0063] Among them, Figure 1 The terminal device 110 shown can be any terminal device such as a smart phone, in-vehicle computer, tablet computer, notebook computer, or wearable device that supports the installation of a vehicle-mounted system, but is not limited thereto. Figure 1The server 120 shown is a data server. For example, it can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. There is no limitation here either. The terminal device 110 can communicate with the server 120 through wireless networks such as 3G (the third-generation mobile information technology), 4G (the fourth-generation mobile information technology), 5G (the fifth-generation mobile information technology), etc. There is no limitation here either.
[0064] As Figure 2 shown, in an exemplary embodiment, the vehicle head unit system performance testing method at least includes steps S210 to S240, which are introduced in detail as follows:
[0065] S210. Obtain the vehicle head unit system and the load simulation tool;
[0066] In this embodiment, the vehicle head unit system is an intelligent operating system running on an automobile, such as an operating system based on Lunix. The load simulation tool is used to generate system loads in the vehicle head unit system, including one or more of the following: CPU load, memory load, and disk I / O load. The load simulation tool is a prior art, so it will not be elaborated here;
[0067] S220. Run the load simulation tool in the vehicle head unit system so that the load rate of the vehicle head unit system is the target load rate;
[0068] In step S220, the load simulation tool can dynamically adjust the load value. By adjusting the load value, the vehicle head unit system can work at the target load rate;
[0069] S230. Execute the process exit test process in the vehicle head unit system at the target load rate to obtain the process exit time data; execute the process context switch test process in the vehicle head unit system at the target load rate to obtain the process context switch time data; execute the process scheduling test process in the vehicle head unit system at the target load rate to obtain the process scheduling delay data; execute the process interruption test process in the vehicle head unit system at the target load rate to obtain the process interruption delay data; execute the process interrupt disable test process in the vehicle head unit system at the target load rate to obtain the process interrupt disable time data; execute the process preemption disable test process in the vehicle head unit system at the target load rate to obtain the process preemption disable time data;
[0070] In the in-vehicle system at the target load rate, execute the process exit test process, process context switching test process, process scheduling test process, process scheduling delay data, process interruption test process, process interrupt disable test process, and process preemption disable test process; obtain the process exit time data, process context switching time data, process scheduling delay data, process interruption delay data, process interrupt disable time data, and process preemption disable time data
[0071] In step S230, obtain the process exit time, context switching time, scheduling delay, interruption delay, interrupt disable time, and preemption disable time of the process through the above test processes;
[0072] S240. Complete the performance test of the in-vehicle system based on the process exit time data, process context switching time data, process scheduling delay data, process interruption delay data, process interrupt disable time data, and process preemption disable time data;
[0073] In step S240, reflect the performance of the in-vehicle system at the target load rate through the process exit time data, process context switching time data, process scheduling delay data, process interruption delay data, process interrupt disable time data, and process preemption disable time data.
[0074] In an embodiment of the present invention, the process of obtaining the process exit time data by executing the process exit test process in the in-vehicle system at the target load rate may include steps S310 to S340, which are introduced in detail as follows:
[0075] S310. Create n first processes in the in-vehicle system at the target load rate, and obtain the creation time point t of the i-th first process among them 1i ;
[0076] In this embodiment, the method of creating n first processes is: create a parent process, and the parent process calls the fork function to create n child processes, and the child processes are the first processes;
[0077] S320. Exit the first process while creating the first process, and record the actual exit time point t of the first process ’ 1i ;
[0078] In step S320, the child process calls the exit function to exit normally, and the parent process calls the wait function to obtain the normal exit status of the child process;
[0079] S330. According to the creation time point t 1i , exit time point t ’ 1i Obtain the actual exit time Δt of the first process 1i, the actual exit time Δt of the first process 1i = t ’ 1i - t 1i ;
[0080] In step S330, the actual exit time Δt of the first process 1i represents the actual exit time of one of the first processes;
[0081] S340. Statistically analyze the actual exit times of multiple first processes to obtain the maximum exit time Δt 1imax ; and perform an averaging operation on the actual exit times of n first processes to obtain the average exit time Δt 1ip , the average exit time
[0082] In step S340, the average value and the maximum value of the actual exit times of multiple first processes are obtained through calculation and statistics, so as to reflect the process exit performance of the in-vehicle system at the target load rate.
[0083] In an embodiment of the present invention, when executing the process context switching test process in the in-vehicle system at the target load rate, the process of obtaining the context switching time data of the process may include steps S410 to S440, which are introduced in detail as follows:
[0084] S410. Create multiple second processes in the in-vehicle system at the target load rate;
[0085] In this embodiment, similarly, the method of creating multiple second processes is: create a parent process, and the parent process calls the fork function to create multiple child processes, and the child processes are the first processes;
[0086] S420. Pass the pre-generated token through multiple second processes. When the i-th second process receives the token, record the time point i when the i-th second process receives the token 2i , and pass the token to the (i + 1)-th second process, and record the time point t when the (i + 1)-th second process receives the token 2(i+1) ;
[0087] In step S420, the tokens are sequentially passed between the child processes through a Unix pipe, and the reception time is recorded;
[0088] S430. Calculate the context switching time Δt between the i-th second process and the (i + 1)-th second process according to the time point t 2i , the time point t 2(i+1) Calculate the context switching time Δt between the i-th second process and the (i + 1)-th second process 2i , the context switching time Δt 2i = t 2(i+1)-t 2i ;
[0089] In step S430, the context switching time is the token receiving time of two adjacent sequential subprocesses;
[0090] S440. Repeat the token passing n times to obtain n context switching times, and perform statistics on the n context switching times to obtain the maximum context switching time Δt 2imax ; and perform an averaging operation on the n context switching times to obtain the average context switching time Δt 2ip , the average context switching time
[0091] In step S440, the average context switching time Δt is obtained through calculation and statistics 2ip , the average context switching time Thus, it reflects the context switching performance of the in-vehicle system at the target load rate.
[0092] Figure 3 is the timing diagram of the process scheduling test process. As Figure 3 shown, in an embodiment of the present invention, when performing the process scheduling test process in the in-vehicle system at the target load rate, the process of obtaining the process scheduling delay data may include steps S510 to S530, which are introduced in detail as follows:
[0093] S510. Create a third process in the in-vehicle system at the target load rate and record the creation time point t 31 of the third process; the third process is a real-time process
[0094] S520. Wake up the third process periodically according to the preset periodic time point t 32 and record the wake-up time t 33 of the third process; t 33
[0095] In step S520, a timer timer is set to wake up the third process periodically (call the wake_up_process() function to wake up);
[0096] S530. Calculate the scheduling delay data Δt3 according to the creation time point t 31 , the periodic time t 32 , and the wake-up time point t 33 of the third process. The scheduling delay data Δt3 = t 33 -t 32 -t 31 .
[0097] In step S530, the process scheduling performance of the in-vehicle system at the target load rate is reflected by the scheduling delay data Δt3.
[0098] In an embodiment of the present invention, the process of obtaining the process interruption delay data by executing the process interruption test process in the in-vehicle system at the target load rate includes steps S610 to S640, which are introduced in detail as follows:
[0099] S610. Create a fourth process in the in-vehicle system at the target load rate, and the fourth process is a real-time process;
[0100] S620. Create a first interrupt task, and trigger a pre-set first interrupt program according to the first interrupt task. The first interrupt program is used to interrupt the fourth process, and at the same time record the creation time point t of the first interrupt task 41 ;
[0101] In step S620, the first interrupt task simulates a peripheral interrupt gic-v3 in the fourth process, and triggers the peripheral interrupt through the first interrupt task. The operations of triggering the peripheral interrupt and recording the time point are set as atomic operations to avoid the CPU being preempted by other high-priority tasks after the simulation of triggering the interrupt operation, resulting in the recorded time being larger than the actual value and affecting the test results.
[0102] S630. Exit the first interrupt program when the first interrupt program is triggered, and record the actual exit time point t of the first interrupt program 42 ;
[0103] S640. Obtain the process interruption delay data Δt4 according to the creation time point t of the first interrupt task 41 , the actual exit time point t of the interrupt program 42 The process interruption delay data Δt4 = t 42 - t 41 .
[0104] In this embodiment, the process interruption performance of the in-vehicle system at the target load rate is reflected by the process interruption delay data Δt4.
[0105] In an embodiment of the present invention, the process of obtaining the process interrupt disable time data by executing the process interrupt disable test process in the in-vehicle system at the target load rate may include steps S710 to S740, which are introduced in detail as follows:
[0106] S710. Create a fifth process in the in-vehicle system at the target load rate, and the fifth process is a real-time process;
[0107] S720. Create multiple second interrupt tasks at regular intervals and trigger a preset second interrupt program according to the second interrupt tasks. The second interrupt program is used to interrupt the fifth process and record the creation time t of the second interrupt tasks among multiple ones. 51 and the trigger time t of multiple second interrupt programs. 52 ;
[0108] In this embodiment, similarly, the second interrupt task simulates a peripheral interrupt gic-v3 in the fifth process, and triggers the peripheral interrupt through the second interrupt task. The operations of triggering the peripheral interrupt and recording the time point are set as atomic operations to avoid the CPU being preempted by other high-priority tasks after the simulated interrupt trigger operation, resulting in the recorded time being larger than the actual value and affecting the test results.
[0109] S730. According to the creation time t of multiple second interrupt tasks 51 and the trigger time t of multiple second interrupt programs 52 calculate the interrupt disable time Δt5 of multiple processes. The interrupt disable time Δt5 of the process = t 52 -t 51 ;
[0110] S740. Statistically analyze the interrupt disable time Δt5 of multiple processes to obtain the maximum interrupt disable time Δt5max of the process.
[0111] In this embodiment, the interrupt disable related performance of the in-vehicle system at the target load rate is reflected by the interrupt disable time Δt5 of the process.
[0112] In an embodiment of the present invention, the process of obtaining the process interrupt preemption time data by executing the process interrupt preemption test process in the in-vehicle system at the target load rate includes steps S810 to S860, which are introduced in detail as follows:
[0113] S810. Create a sixth process in the in-vehicle system at the target load rate. The sixth process is a real-time process.
[0114] S820. Create multiple third interrupt tasks at regular intervals and trigger a preset third interrupt program according to the third interrupt tasks. The third interrupt program is used to interrupt the sixth process.
[0115] In this embodiment, similarly, the third interrupt task simulates a peripheral interrupt gic-v3 in the sixth process, and triggers the peripheral interrupt through the third interrupt task. The operations of triggering the peripheral interrupt and recording the time point are set as atomic operations to avoid the CPU being preempted by other high-priority tasks after the simulated interrupt trigger operation, resulting in the recorded time being larger than the actual value and affecting the test results.
[0116] Exit the third interrupt program when the third interrupt program is triggered, and record the actual exit time t of the third interrupt program 61 ;
[0117] In step S830, after exiting the third interrupt program, it takes some time to actually exit the interrupt program. Therefore, the actual exit time t 61 is later than the trigger time;
[0118] S840. Determine whether process preemption occurs in the in-vehicle system after exiting the third interrupt program, and record the judgment time t when the judgment result is obtained 62 ;
[0119] In step S840, after exiting the third interrupt program, it is necessary to query the sixth process in the system. If process preemption occurs, it means that the preemption prevention fails. If the sixth process continues to execute, it means that the preemption prevention is successful; whether it is successful or failed, record the judgment time t 62 ;
[0120] S850. Calculate the preemption prevention time Δt6 of multiple processes according to the actual exit times t of multiple third interrupt programs 61 , multiple judgment times t 62 ;
[0121] S860. Statistically analyze the preemption prevention times Δt6 of multiple processes to obtain the maximum preemption prevention time Δt 6max .
[0122] In this embodiment, the maximum preemption prevention time Δt 6max reflects the preemption prevention related performance of the in-vehicle system at the target load rate
[0123] In an embodiment of the present invention, the process of completing the performance test of the in-vehicle system based on process exit time data, process context switching time data, process scheduling delay data, process interrupt delay data, and process interrupt disable time data may include step S910, which is introduced in detail as follows:
[0124] S910. Construct a two-dimensional visualization graph with the target load rate as the first dimension and process exit time data, process context switching time data, process scheduling delay data, process interrupt delay data, process interrupt disable time data, and process preemption prevention time data as the second dimension, and display the performance of the in-vehicle system with the visualization image
[0125] In this embodiment, the two-dimensional image can be a line chart, a curve chart, etc. Since the target load rate is adjustable, in this embodiment, by setting multiple different target load rates, multiple sets of performance data (process exit time data, process context switching time data, process scheduling delay data, process interruption delay data, process interrupt disable time data, process preemption disable time data) are obtained, so as to visually display the performance of the in-vehicle system at different load rates.
[0126] In the method for testing the performance of the in-vehicle system in the present invention, by running a load simulation tool in the in-vehicle system, the load rate of the in-vehicle system is made the target load rate; in the in-vehicle system at the target load rate, a process exit test process, a process context switching test process, a process scheduling test process, a process interruption test process, a process interrupt disable test process, and a process preemption disable test process are executed; process exit time data, process context switching time data, process scheduling delay data, process interruption delay data, process interrupt disable time data, and process preemption disable time data are obtained; therefore, the test data of the present invention is comprehensive, and the processing performance of the in-vehicle system for processes at different loads in various scenarios is simulated.
[0127] As Figure 4 shown, the present invention also provides an in-vehicle system performance test system, and the system includes:
[0128] An acquisition module, configured to obtain an in-vehicle system and a load simulation tool;
[0129] A load simulation module, configured to run a load simulation tool in the in-vehicle system to make the load rate of the in-vehicle system the target load rate;
[0130] A process execution module, configured to execute a process exit test process in the in-vehicle system at the target load rate to obtain process exit time data; execute a process context switching test process in the in-vehicle system at the target load rate to obtain process context switching time data; execute a process scheduling test process in the in-vehicle system at the target load rate to obtain process scheduling delay data; execute a process interruption test process in the in-vehicle system at the target load rate to obtain process interruption delay data; execute a process interrupt disable test process in the in-vehicle system at the target load rate to obtain process interrupt disable time data; execute a process preemption disable test process in the in-vehicle system at the target load rate to obtain process preemption disable time data;
[0131] A test module, configured to complete the performance test of the in-vehicle system based on the process exit time data, the process context switching time data, the process scheduling delay data, the process interruption delay data, the process interrupt disable time data, and the process preemption disable time data.
[0132] In the in-vehicle infotainment system performance testing system of the present invention, a load simulation tool is run in the in-vehicle infotainment system to make the load rate of the in-vehicle infotainment system the target load rate; in the in-vehicle infotainment system at the target load rate, a process exit test process, a process context switch test process, a process scheduling test process, a process interruption test process, a process interrupt disable test process, and a process preemption disable test process are executed; process exit time data, process context switch time data, process scheduling delay data, process interruption delay data, process interrupt disable time data, and process preemption disable time data are obtained; therefore, the test data of the present invention is comprehensive, and the processing performance of the in-vehicle infotainment system for processes under different loads in various scenarios is simulated.
[0133] It should be noted that the application program data display system provided in the above embodiment and the application program data display method provided in the above embodiment belong to the same concept. The specific ways in which each module and unit perform operations have been described in detail in the method embodiment and will not be elaborated here. In actual application, the application program data display system provided in the above embodiment can, according to needs, allocate the above functions to different functional modules, that is, divide the internal structure of the device into different functional modules to complete all or part of the functions described above. This is not limited here either.
[0134] An embodiment of the present application also provides an electronic device, including: one or more processors; a storage device for storing one or more programs, which, when executed by the one or more processors, cause the electronic device to implement the application program data display method provided in each of the above embodiments.
[0135] Figure 5 The structural diagram of a computer system of an electronic device suitable for implementing the embodiments of the present application is shown. It should be noted that Figure 5 The computer system 500 of the electronic device shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present application.
[0136] Such as Figure 5As shown, computer system 500 includes a Central Processing Unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a Read-Only Memory (ROM) 502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503, such as executing the method described in the above embodiments. In the RAM 503, various programs and data required for system operation are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other via a bus 504. An Input / Output (I / O) interface 505 is also connected to the bus 504.
[0137] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including, for example, a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), etc. and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed so that a computer program read from it can be installed into the storage section 508 as needed.
[0138] Specifically, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 509, and / or installed from the removable medium 511. When the computer program is executed by a Central Processing Unit (CPU) 501, various functions defined in the system of the present application are executed.
[0139] It should be noted that the computer-readable medium shown in the embodiments of the present application may be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable computer program. Such a propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0140] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. Among them, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the above module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order from that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and the combination of blocks in the block diagram or flowchart, may be implemented by a dedicated hardware-based system for performing the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.
[0141] The units involved in the embodiments described in this application can be implemented in software or in hardware, and the described units can also be provided in a processor. Among them, the names of these units do not constitute a limitation to the units themselves in some cases.
[0142] Another aspect of this application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor of the computer, the computer is enabled to execute the application program data display method as described above. The computer-readable storage medium can be included in the electronic device described in the above embodiments, or can exist alone without being assembled into the electronic device.
[0143] Another aspect of this application also provides a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the application program data display methods provided in the above various embodiments.
[0144] The above embodiments are only used to exemplarily illustrate the principles and effects of the present invention, rather than to limit the present invention. Any person familiar with this technology can modify or change the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or changes completed by those with ordinary knowledge in the technical field without departing from the spirit and technical ideas disclosed by the present invention should still be covered by the claims of the present invention.
Claims
1. A method for testing the performance of a vehicle infotainment system, characterized in that, The method includes: Obtaining a vehicle head unit system and a load simulation tool; Running the load simulation tool in the vehicle head unit system to make the load rate of the vehicle head unit system the target load rate; Executing a process exit test process in the vehicle head unit system at the target load rate to obtain process exit time data; executing a process context switch test process in the vehicle head unit system at the target load rate to obtain process context switch time data; executing a process scheduling test process in the vehicle head unit system at the target load rate to obtain process scheduling delay data; executing a process interruption test process in the vehicle head unit system at the target load rate to obtain process interruption delay data; executing a process disable interrupt test process in the vehicle head unit system at the target load rate to obtain process disable interrupt time data; executing a process disable preemption test process in the vehicle head unit system at the target load rate to obtain process disable preemption time data; Based on the process exit time data, the process context switch time data, the process scheduling delay data, the process interruption delay data, the process disable interrupt time data, and the process disable preemption time data, a visualization graph is established, and the performance of the vehicle head unit system is displayed with the visualization graph.
2. The method for testing the performance of a vehicle infotainment system according to claim 1, characterized in that, Executing a process exit test process in the vehicle head unit system at the target load rate to obtain process exit time data, including: Create n first processes in the in-vehicle system at the target load rate, and obtain the creation time point t of the i-th first process among them 1i ; Exit the first process while creating the first process, and record the actual exit time point t' of the first process 1i ; According to the creation time point t 1i and the exit time point t' 1i the actual exit time Δt of the first process is obtained 1i , the actual exit time Δt of the first process 1i = t' 1i - t 1i ; Statistically analyze the actual exit times of multiple first processes to obtain the maximum exit time Δt 1imax ; and perform an averaging operation on the actual exit times of n first processes to obtain the average exit time Δt 1lp , the average exit time 3. The method for testing the performance of a vehicle infotainment system according to claim 1, characterized in that, Executing a process context switch test process in the vehicle head unit system at the target load rate to obtain process context switch time data, including: Creating multiple second processes in the vehicle head unit system at the target load rate; The pre-generated token is passed through the multiple second processes. When the i-th second process receives the token, the time point t at which the i-th second process receives the token is recorded 2i , and the token is passed to the (i + 1)-th second process, and the time point t at which the (i + 1)-th second process receives the token is recorded 2(i+1) ; According to the time point t 2i and the time point t 2(i+1) calculate the context switching time Δt between the i-th second process and the (i + 1)-th second process 2i , where the context switching time Δt 2i = t 2(i+1) - t 2i ; Repeat the token passing n times to obtain n context switching times, and perform statistics on the n context switching times to obtain the maximum context switching time Δt 2imax ; and perform an averaging operation on the n context switching times to obtain the average context switching time Δt 2ip , the average context switching time 4. The method for testing the performance of a vehicle infotainment system according to claim 1, characterized in that, Executing a process scheduling test process in the vehicle head unit system at the target load rate to obtain process scheduling delay data, including: Create a third process in the in-vehicle system at the target load rate, and record the creation time point t of the third process 31 , where the third process is a real-time process According to the preset cycle time t 32 Periodically wake up the third process and record the wake-up time point t of the third process 33 ; According to the creation time point t of the third process 31 , the cycle time t 32 , the wake-up time t of the third process 33 Calculate the scheduling delay data Δt3, where the scheduling delay data Δt3 = t 33 - t 32 - t 31 .
5. The method for testing the performance of a vehicle infotainment system according to claim 1, characterized in that, Executing a process interruption test process in the vehicle head unit system at the target load rate to obtain process interruption delay data, including: Creating a fourth process in the vehicle head unit system at the target load rate, and the fourth process is a real-time process; Create a first interrupt task, and trigger a preset first interrupt program according to the first interrupt task. The first interrupt program is used to interrupt the fourth process, and record the creation time point t of the first interrupt task 41 ; Exit the first interrupt program when the first interrupt program is triggered, and record the actual exit time point t of the first interrupt program 42 ; According to the creation time point t of the first interrupt task 41 and the actual exit time point t of the interrupt program 42 the process interrupt delay data Δt4 is obtained, and the process interrupt delay data Δt4 = t 42 - t 41 .
6. The method for testing the performance of a vehicle infotainment system according to claim 1, characterized in that, Executing a process disable interrupt test process in the vehicle head unit system at the target load rate to obtain process disable interrupt time data, including Creating a fifth process in the vehicle head unit system at the target load rate, and the fifth process is a real-time process; Create multiple second interrupt tasks at regular intervals, and trigger a preset second interrupt program according to the second interrupt tasks. The second interrupt program is used to interrupt the fifth process and record the creation time points t of the multiple second interrupt tasks 51 and the trigger time points t of the multiple second interrupt programs 52 ; According to the creation time point t of multiple said second interrupt tasks 51 , the trigger time point t of multiple said second interrupt programs 52 Calculate the interrupt disable time Δt5 of multiple processes, where the interrupt disable time Δt5 of the processes = t 52 -t 51 ; Statistically analyze the interrupt disable time Δt5 of the multiple processes to obtain the maximum interrupt disable time Δt of the processes 5max .
7. The method for testing the performance of a vehicle infotainment system according to claim 1, characterized in that, Executing a process disable preemption test process in the vehicle head unit system at the target load rate to obtain process disable preemption time data, including: Creating a sixth process in the vehicle head unit system at the target load rate, and the sixth process is a real-time process Regularly creating multiple third interrupt tasks, and triggering a pre-set third interrupt program according to the third interrupt tasks, and the third interrupt program is used to interrupt the sixth process; Exit the third interrupt program when the third interrupt program is triggered, and record the actual exit time point t of the third interrupt program 61 ; After exiting the third interrupt program, determine whether process preemption has occurred in the in-vehicle system, and record the judgment time point t when the judgment result is obtained 62 ; According to the actual exit time points t of multiple said third interruption programs 61 and multiple said judgment time points t 62 calculate the preemption time Δt6 of multiple processes Statistically analyze the preemption time Δt6 for the multiple processes to obtain the maximum preemption time Δt for processes 6max .
8. The vehicle-mounted system performance testing system is characterized in that, The system includes: An acquisition module for obtaining a vehicle head unit system and a load simulation tool; A load simulation module for running the load simulation tool in the vehicle head unit system to make the load rate of the vehicle head unit system the target load rate; A process execution module, configured to execute a process exit test process in a vehicle-mounted system at a target load rate to obtain process exit time data; execute a process context switch test process in the vehicle-mounted system at the target load rate to obtain process context switch time data; execute a process scheduling test process in the vehicle-mounted system at the target load rate to obtain process scheduling delay data; execute a process interruption test process in the vehicle-mounted system at the target load rate to obtain process interruption delay data; execute a process interrupt disable test process in the vehicle-mounted system at the target load rate to obtain process interrupt disable time data; execute a process preemption disable test process in the vehicle-mounted system at the target load rate to obtain process preemption disable time data; A test module, configured to complete the performance test of the vehicle-mounted system based on the process exit time data, the process context switch time data, the process scheduling delay data, the process interruption delay data, the process interrupt disable time data, and the process preemption disable time data.
9. An electronic device is characterized in that, The electronic device includes: One or more processors; A storage device, configured to store one or more programs, which when executed by the one or more processors, cause the electronic device to implement the vehicle-mounted system performance test method according to any one of claims 1 to 7.
10. A computer-readable storage medium is characterized in that, A computer program is stored thereon, which when executed by a processor of a computer, causes the computer to execute the vehicle-mounted system performance test method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Real-time performance test method of embedded system
CN106776272A
On-board process response method and system
CN109286662A