Kernel version positioning method, device, system, equipment, medium and program product
By using blind step measurement in kernel version positioning for performance testing and filtering target version intervals, the problem of poor kernel version positioning accuracy in the existing technology is solved, and higher positioning accuracy and efficiency are achieved.
Patent Information
- Application Number
- CN202510046127.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-13
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2045-01-13
AI Technical Summary
The existing kernel version positioning method has poor accuracy through binary positioning, especially when the kernel performance change trend is uncertain.
Different blind measurement steps are used to blindly measure performance of multiple versions within the initial version interval, and the target version interval for kernel performance degradation is determined through the performance blind measurement results, and the performance degraded version is determined through binary positioning and other methods within this interval.
Improve the accuracy of kernel performance degraded version positioning, and filter out the target version intervals with degraded kernel performance, reducing kernel performance volatility, thereby improving positioning accuracy.
Smart Images

Figure CN119440561B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a kernel version positioning method, device, system, equipment, medium and program product. Background Art
[0002] The kernel is the core component of the operating system, which can be used to manage the resources of the operating system and provide basic operating functions. With the development of the operating system, the kernel version is also constantly updated. However, the kernel may also experience performance degradation after the update (such as reduced response speed, reduced resource utilization efficiency, etc.). Therefore, in order to ensure the stability of the kernel performance, it is necessary to locate the kernel performance degradation version.
[0003] Currently, the performance-degraded versions are mainly located from multiple versions of the kernel through binary positioning. The premise of binary positioning is that the performance change trend of the kernel remains unchanged. The unchanged performance change trend can mean that the performance of the kernel after each update is worse than the performance of the kernel before the update (or the performance of the kernel after each update is better than the performance of the kernel before the update). However, the performance of the kernel is determined by complex and multifaceted factors. The performance of the kernel after the update may be better or worse than the performance of the kernel before the update.
[0004] Therefore, the existing method of positioning the performance-degraded version through binary positioning will result in poor accuracy in positioning the performance-degraded version. Summary of the invention
[0005] The present application provides a kernel version positioning method, apparatus, system, equipment, medium and program product, which can improve the accuracy of kernel performance degradation version positioning.
[0006] In a first aspect, the present application provides a kernel version positioning method, wherein the kernel is a kernel of a target operating system, and the method comprises:
[0007] Based on the test dependency information of the kernel, using different blind test step sizes, a plurality of versions within an initial version interval are subjected to a performance blind test to obtain a performance blind test result; the blind test step size is to sample the versions within the initial version interval to determine the sampling step size of the plurality of versions; the initial version interval includes: versions of the kernel arranged according to release time;
[0008] Determining a target version interval where kernel performance degrades from the initial version interval based on the blind performance test result;
[0009] Based on the test dependency information, a performance-degraded version of the kernel is determined from within the target version range.
[0010] Optionally, the test dependency information of the kernel is based on the test, and different blind test step sizes are used to perform blind performance tests on multiple versions within the initial version interval to obtain blind performance test results, including:
[0011] Determining the blind test step length based on the number of versions in the initial version interval;
[0012] Based on the blind test step length, sampling versions within the initial version interval to determine the multiple versions;
[0013] Based on the test dependency information of the kernel, a blind performance test is performed on the multiple versions to obtain the blind performance test results.
[0014] Optionally, the blind test step is positively correlated with the target number; the target number is: the number of versions existing between the version within the blind test step and the target version; the target version is later than the version within the initial version interval.
[0015] Optionally, determining the blind test step length based on the number of versions in the initial version interval includes:
[0016] Determine a step coefficient based on the number of versions in the initial version interval; the step coefficient is positively correlated with the number of versions in the initial version interval;
[0017] The blind test step length is determined based on a preset initial step length and the step length coefficient.
[0018] Optionally, the performing blind performance tests on the multiple versions based on the test dependency information of the kernel to obtain the blind performance test results includes:
[0019] Based on the test dependency information of the kernel, controlling the target device to perform performance tests on the multiple versions of the kernel in sequence to obtain performance test results of the multiple versions; the operating system of the target device is the target operating system;
[0020] The performance test results of the multiple versions are used as the performance blind test results.
[0021] Optionally, the test dependency information includes: a test environment construction instruction, a test execution instruction, and a result extraction instruction, and the control of the target device to sequentially perform performance tests on the multiple versions of the kernel based on the test dependency information of the kernel to obtain the performance test results of the multiple versions includes:
[0022] For any performance test, sending the test environment construction instruction to the target device, so that the target device responds to the test environment construction instruction and constructs the test environment required for the performance test of the kernel;
[0023] Sending the test execution instruction and the software package of the kernel of the version of the performance test to the target device, so that the target device responds to the test execution instruction, and performing a performance test on the kernel of the version based on the software package of the kernel in the test environment to obtain a performance characterization parameter value;
[0024] Sending the result extraction instruction to the target device, so that the target device responds to the result extraction instruction and feeds back the performance characterization parameter value;
[0025] receiving the performance characterization parameter value from the target device;
[0026] Based on the performance characterization parameter value, the performance test result of the version is determined.
[0027] Optionally, the method further includes:
[0028] Receiving performance judgment threshold;
[0029] The determining the performance test result of the version based on the performance characterization parameter value includes:
[0030] The performance test result is determined based on the performance characterization parameter value and the performance judgment threshold.
[0031] Optionally, determining the target version interval where the kernel performance is degraded from the initial version interval according to the performance blind test result includes:
[0032] Based on the blind performance test result, determining a candidate version interval where the kernel performance degrades from the initial version interval; the boundary of the candidate version interval is two adjacent versions from the multiple versions;
[0033] The candidate version interval that meets preset conditions is used as the target version interval; the preset conditions include: the number of versions existing between the target version and the candidate version is the least; the target version is later than the versions in the initial version interval.
[0034] Optionally, determining the performance-degraded version of the kernel within the target version interval based on the test dependency information includes:
[0035] Based on the test dependency information, a performance-degraded version of the kernel is determined within the target version range by binary positioning.
[0036] Optionally, determining the performance-degraded version of the kernel in the target version range by binary positioning based on the test dependency information includes:
[0037] In response to the number of versions within the target version interval being less than or equal to a preset number, based on the test dependency information, a performance-degraded version of the kernel is determined within the target version interval by binary positioning.
[0038] Optionally, the method further includes:
[0039] In response to the number of versions in the target version interval being greater than the preset number, the target version interval is used as a new initial version interval, and based on the new initial version interval, the target version interval is re-determined until the number of versions in the re-determined target version interval is less than or equal to the preset number.
[0040] In a second aspect, the present application provides a kernel version positioning method, wherein the kernel is a kernel of an operating system of a target device, and the method comprises:
[0041] Receiving test dependency information of the kernel;
[0042] Using different blind test step lengths to determine multiple versions within the initial version interval of the kernel; the blind test step length is to sample the versions within the initial version interval to determine the sampling step length of the multiple versions; the initial version interval includes: versions of the kernel arranged according to release time;
[0043] Controlling the target device to perform performance tests on the multiple versions of kernels in sequence through the test dependency information to obtain blind performance test results;
[0044] Determining a target version interval where kernel performance degrades from the initial version interval based on the blind performance test result;
[0045] Based on the test dependency information, determining a performance-degraded version of the kernel from within the target version interval;
[0046] Output the version information of the performance-degraded version.
[0047] In a third aspect, the present application provides a kernel version positioning device, wherein the kernel is a kernel of a target operating system, and the device comprises:
[0048] A processing module, configured to perform a performance blind test on multiple versions within an initial version interval using different blind test step lengths based on the test dependency information of the kernel, and obtain a performance blind test result; the blind test step length is to sample the versions within the initial version interval to determine the sampling step length of the multiple versions; the initial version interval includes: versions of the kernel arranged according to release time;
[0049] A first determination module, configured to determine, from the initial version interval, a target version interval where the kernel performance is degraded, based on the performance blind test result;
[0050] The second determination module is used to determine the performance-degraded version of the kernel from within the target version range based on the test dependency information.
[0051] In a fourth aspect, the present application provides a kernel version positioning device, wherein the kernel is a kernel of an operating system of a target device, and the device comprises:
[0052] A receiving module, used for receiving the test dependency information of the kernel;
[0053] The processing module adopts different blind test step lengths to determine multiple versions within the initial version interval of the kernel; through the test dependency information, the target device is controlled to perform performance tests on the multiple versions of the kernel in sequence to obtain performance blind test results; the blind test step length is to sample the versions within the initial version interval to determine the sampling step length of the multiple versions; the initial version interval includes: versions of the kernel arranged according to release time;
[0054] A first determination module, configured to determine, from the initial version interval, a target version interval where the kernel performance is degraded, based on the performance blind test result;
[0055] A second determination module, configured to determine a performance-degraded version of the kernel from within the target version interval based on the test dependency information;
[0056] An output module is used to output version information of the performance-degraded version.
[0057] In a fifth aspect, the present application provides a kernel version positioning system, the system comprising an electronic device and a target device, the kernel being a kernel of an operating system of the target device;
[0058] The electronic device is used to execute the method according to any one of the first aspects;
[0059] The target device is used to perform performance testing on the kernel in response to control of the electronic device.
[0060] In a sixth aspect, the present application provides an electronic device, comprising: a processor and a memory; the processor is communicatively connected with the memory;
[0061] The memory stores computer instructions;
[0062] The processor executes the computer instructions stored in the memory to implement the method as described in any one of the first aspect and / or the second aspect.
[0063] In a seventh aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method as described in any one of the first aspect and / or the second aspect.
[0064] In an eighth aspect, the present application provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the method as described in any one of the first aspect and / or the second aspect is implemented.
[0065] The kernel version positioning method, device, system, equipment, medium and program product provided by the present application can first determine multiple versions from the initial version interval for blind testing through different blind test step sizes, and obtain performance blind test results. Through the above method, the initial performance test of the multiple versions in the initial version interval is achieved. Then, based on the performance blind test results, the target version interval in which the kernel performance is degraded within the initial version interval can be determined, and the performance degradation interval of the kernel can be screened, so that the performance degraded version of the kernel can be determined in the target version interval of the performance degradation later. Because the target version interval is the performance degradation interval of the kernel, therefore, within the target version interval, the volatility of the kernel performance is reduced, thereby improving the accuracy of positioning the performance degraded version within the target version interval. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] In order to more clearly illustrate the technical solutions in the present application or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0067] Figure 1 A flowchart of a kernel version positioning method provided by this application;
[0068] Figure 2 A schematic diagram of a process for obtaining blind performance test results provided in this application;
[0069] Figure 3 A schematic diagram of a blind test step length provided in this application;
[0070] Figure 4 A schematic diagram of a process for obtaining blind performance test results through a target device provided in this application;
[0071] Figure 5 A flowchart of another kernel version location method provided by this application;
[0072] Figure 6 A schematic diagram of the architecture of a kernel version positioning system provided for this application;
[0073] Figure 7 A schematic diagram of the architecture of another kernel version positioning system provided for this application;
[0074] Figure 8 A flowchart of another kernel version location method provided by this application;
[0075] Fig. 9 A schematic diagram of the structure of a kernel version positioning device provided by this application;
[0076] Fig.10 A schematic diagram of the structure of another kernel version positioning device provided by the present application;
[0077] Fig.11 A schematic diagram of the hardware structure of an electronic device provided in this application.
[0078] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0079] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0080] The kernel is the core component of the operating system, which is responsible for managing the resources of the operating system and providing the basic functions of the operating system. Kernel maintenance is complex and important, especially for scenarios with specific performance, security and other functional requirements. Through kernel customization and optimization, the performance and reliability of the operating system can be improved to meet functional requirements. With the change of functional requirements and the development of computer technology, the kernel version is constantly updated.
[0081] However, with version updates, the kernel may also experience performance degradation. The phenomenon of kernel performance degradation may refer to the phenomenon that after the kernel is updated or modified, the kernel's performance indicators, such as corresponding response speed, resource utilization efficiency, etc., become worse than the previous version. This degradation may affect the overall efficiency of the system and user experience. The reasons for kernel performance degradation are complex and diverse, and will not be elaborated here. Even if kernel developers try their best to ensure kernel performance when introducing new features and optimizing the kernel, it is usually difficult to avoid kernel performance degradation due to the complexity and diversity of kernel code.
[0082] Therefore, in order to ensure the stable performance of the kernel, it is necessary to locate the performance-degraded version of the kernel and repair the kernel performance based on the performance-degraded version.
[0083] Currently, binary positioning (also called binary search algorithm) is mainly used to locate the performance-degraded version from multiple versions of the kernel.
[0084] The principle of determining the performance-degraded version of the internal energy by binary location is the binary search algorithm. The binary search algorithm is a search algorithm used in an ordered set to locate the target value. Its basic idea is to continuously halve the search range to narrow it down to the location of the target value.
[0085] For example, when the binary search algorithm is used to locate the performance-degraded version, the user first needs to input two commit points into the user terminal. The commit points may refer to the version records of the historical release versions of the kernel. At the two commit points, the performance of the kernel is good and bad respectively.
[0086] When locating the performance-degraded version by the above-mentioned binary positioning method, first, the user terminal determines the middle commit point of the two commit points. Then, the user inputs a code acquisition instruction. The code acquisition instruction is used to instruct to obtain the kernel code of the version corresponding to the middle commit point from the kernel code repository. Then, the user inputs a kernel code compilation instruction to compile the kernel code to obtain a kernel RPM (English abbreviation for a software package manager) package. The user installs the kernel RPM on the target machine and restarts the target machine to implement kernel installation on the target machine. Then, the user enters a performance test instruction on the target machine and reads the performance test result. The user views the performance test result, determines the performance of the version corresponding to the middle commit point, and inputs the performance result to the aforementioned user terminal. Then, the user terminal can use the middle commit point as a new starting point or end point, and repeats in this way, gradually narrowing the range until the cycle is completed and a commit point is determined as the performance-degraded version.
[0087] However, as mentioned above, the binary search algorithm is applied in an ordered set. That is to say, the prerequisite for determining the performance-degraded version of the internal energy by binary location is that the performance change trend of the kernel remains unchanged. Among them, the unchanged performance change trend can mean that the performance of the kernel after each update is worse than the performance of the kernel before the update (or the performance of the kernel after each update is better than the performance of the kernel before the update). However, the performance of the kernel is determined by complex and multifaceted factors, and the performance of the kernel after the update may be better or worse than the performance of the kernel before the update.
[0088] That is to say, in real scenarios, the performance trend of the kernel fluctuates, not monotonically. Therefore, when the version range used for binary positioning is large, there will be multiple versions that affect the kernel performance, causing the kernel performance to fluctuate rather than be monotonically linear, which in turn leads to poor accuracy in locating the performance-degraded version determined by the binary positioning method.
[0089] Considering that the reason why the existing performance degradation version location method has the above problems is that with the version iteration, the kernel performance fluctuates and changes non-monotonic linearly, therefore, the present application proposes a method for first determining the target version interval where the kernel performance degrades, and then locating the performance degradation version within the target version interval. Within the target version interval, the volatility of the kernel performance is reduced, so the accuracy of locating the performance degradation version within the target version interval can be improved.
[0090] Optionally, the execution subject of the kernel version positioning method provided in the present application may be, for example, any electronic device with processing capabilities, such as a terminal and a server.
[0091] The technical solution of the present application is described in detail below in conjunction with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0092] Figure 1 The following is a flowchart of a kernel version positioning method provided by this application. Figure 1 As shown, the method may include the following steps:
[0093] S101. Based on the test dependency information of the kernel, different blind test step sizes are used to perform blind performance tests on multiple versions within the initial version range to obtain blind performance test results.
[0094] The kernel may be a kernel of a target operating system, for example, a Linux system.
[0095] Optionally, the test dependency information may include, for example, information required for the kernel performance test to be dependent on. For example, the test dependency information may include: kernel performance test start instructions, environment parameters required for the performance test, performance test start time, kernel test items required for the performance test, etc.
[0096] In some embodiments, the initial version interval includes versions of the kernel arranged according to release time. For example, the kernel versions included in the initial version interval can be arranged in chronological order according to the release time of the versions. Optionally, the first boundary of the above-mentioned initial version interval can be the first version of the kernel released earlier. The second boundary of the initial version interval can be the second version of the kernel released later. The kernel versions included in the initial version interval can be versions released between the above-mentioned first version and the second version. Optionally, the initial version interval can be represented by a version identifier, for example. For example, the first boundary of the initial version interval can be represented by the version identifier of the above-mentioned first version, and the second boundary of the initial version interval can be represented by the version identifier of the above-mentioned second version.
[0097] Optionally, the blind test step size is to sample the versions within the initial version interval to determine the sampling step size of the multiple versions. The blind test step size can be used, for example, to characterize the number of versions existing between the two versions obtained by sampling. The different blind test step sizes mentioned above may, for example, refer to different sampling step sizes for sampling the initial version interval, that is, the number of versions existing between the multiple versions within the initial version interval is different.
[0098] Optionally, the above-mentioned blind performance test may, for example, refer to performing a performance test on the kernel of each version of the multiple versions within the initial version interval. Exemplarily, the above-mentioned blind performance test result may, for example, include performing a performance test on the kernel of each version of the multiple versions, and obtaining a performance test result of each version of the kernel.
[0099] As a possible implementation, the blind test step length may be pre-stored in the electronic device. Alternatively, the electronic device may first determine the different blind test step lengths based on the number of versions included in the initial version interval, and then sample the initial version interval using the different blind test step lengths to determine multiple versions within the initial version interval. The electronic device may then perform a blind performance test on the multiple versions to obtain the blind performance test results.
[0100] S102. Determine a target version range where kernel performance is degraded from the initial version range based on the performance blind test result.
[0101] Optionally, the above-mentioned kernel performance degradation may, for example, refer to the performance test results of the kernel of an earlier released version being used to characterize that the kernel of this version meets the performance requirements, and the performance test results of the kernel of a later released version being used to characterize that the kernel of this version does not meet the performance requirements. Exemplarily, the performance test results of the kernel of a version on the first boundary of the target version interval of the above-mentioned kernel performance degradation (i.e., the version of the kernel released earlier) are used to characterize that the kernel of this version meets the performance requirements. The performance test results of the kernel of a version on the second boundary of the target version interval of the above-mentioned kernel performance degradation (i.e., the version of the kernel released later) are used to characterize that the kernel of this version does not meet the performance requirements.
[0102] Optionally, taking the above-mentioned performance blind test results including the performance test results of the multiple versions of the kernel as an example, the above-mentioned electronic device can, for example, based on the performance test results of the multiple versions of the kernel, use the interval determined by the following two versions as the boundary as the target version interval: the performance test results of the kernel of an earlier released version are used to characterize that the kernel of this version meets the performance requirements, and the performance test results of the kernel of a later released version are used to characterize that the kernel of this version does not meet the performance requirements.
[0103] S103: Based on the test dependency information, determine a performance-degraded version of the kernel within the target version range.
[0104] As a possible implementation, the electronic device may, for example, determine the performance-degraded version of the kernel within the target version range by using the aforementioned binary positioning method within the target version range. Alternatively, the electronic device may, for example, determine the performance-degraded version of the kernel within the target version range by using any existing method capable of determining the performance-degraded version of the kernel.
[0105] In some embodiments, after determining the performance-degraded version of the kernel, the electronic device may further output information such as a version record of the performance-degraded version, so that the user can view the performance-degraded version of the kernel.
[0106] In this embodiment, through different blind test step sizes, multiple versions can be determined from the initial version interval for blind testing, and the performance blind test results can be obtained. Through the above method, the initial performance test of the multiple versions in the initial version interval is achieved. Then, based on the performance blind test results, the target version interval in which the kernel performance is degraded within the initial version interval can be determined, and the performance degradation interval of the kernel can be screened, so that the performance degraded version of the kernel can be determined in the target version interval of the performance degradation later. Because the target version interval is the performance degradation interval of the kernel, therefore, within the target version interval, the volatility of the kernel performance is reduced, thereby improving the accuracy of locating the performance degraded version within the target version interval.
[0107] The following is a detailed description of how electronic devices use different blind test step sizes to perform blind performance tests on multiple versions within the initial version range based on the kernel test dependency information and obtain blind performance test results:
[0108] Figure 2 A schematic diagram of a process for obtaining blind performance test results provided in this application. Figure 2 As shown, as a possible implementation, the above step S101 may include the following steps:
[0109] S201. Determine a blind test step length based on the number of versions in an initial version interval.
[0110] Optionally, the number of versions in the initial version interval may refer to the number of all versions in the initial version interval, for example.
[0111] In some embodiments, the blind test step length may be positively correlated with the target number, for example. The target number may be: the number of versions existing between the versions within the blind test step length and the target version.
[0112] The above target version may be later than the version in the initial version interval. For example, the target version may be later than any version in the initial version interval. That is, the target version may be outside the initial version interval, and the target version may be a version released after any version in the initial version interval. In some embodiments, the target version may also be, for example, the second version on the aforementioned second boundary of the initial version interval.
[0113] Exemplarily, the target version may be, for example, the latest version of the kernel.
[0114] For example, Figure 3 This is a schematic diagram of a blind test step length provided in this application. Figure 3 As shown in FIG. 1 , the kernel versions are sorted in the order of release time, and point A is used to represent the above target version, such as the latest version of the kernel. Figure 3 As shown in , the longer the line segment, the longer the blind test step length (that is, the more versions exist within the blind test step length), and the shorter the line segment, the shorter the blind test step length (that is, the fewer versions exist within the blind test step length).
[0115] The larger the number of targets, the longer the blind test step length; the smaller the number of targets, the shorter the blind test step length. Figure 3As shown, the number of versions between version B represented by point B and the target version A is less than the number of versions between version C represented by point C and the target version A, then the length of the blind test step AB (represented by line segment AB) is less than the blind test step BC (represented by line segment BC); the length of the blind test step BC is less than the blind test step CD (represented by line segment CD), and so on. That is to say, the farther the version is from the target version A, the longer the blind test step is, and the closer the version is to the target version A, the shorter the blind test step is.
[0116] Because it is usually necessary to locate the performance-degraded version of the kernel when it is discovered that the kernel performance has degraded, the closer the kernel version is to the latest version, the greater the possibility of a performance-degraded version. Therefore, by ensuring that the aforementioned blind test step size is positively correlated with the target number, the closer to the target version, the denser the sampling in the initial version interval, and thus the closer to the target version, based on the blind test step size, the sampling of versions within the initial version interval, and the denser the multiple versions determined, thereby improving the subsequent performance blind testing based on the multiple versions, and the accuracy of the performance blind test results obtained, and determining the target version interval where the kernel performance has degraded, thereby further improving the accuracy of locating the performance-degraded version within the target version interval.
[0117] In some embodiments, the electronic device may, for example, first determine a step size coefficient based on the number of versions within the initial version interval, and then determine the blind test step size based on a preset initial step size and the step size coefficient.
[0118] The step coefficient may be positively correlated with the number of versions in the initial version interval. That is, the more versions there are in the initial version interval, the longer the step coefficient may be. The fewer versions there are in the initial version interval, the shorter the step coefficient may be.
[0119] Exemplarily, the step coefficient may be, for example, a quotient obtained by dividing the number of versions in the initial version interval by a preset value.
[0120] Exemplarily, the preset initial step length may be, for example, a step length pre-stored in the electronic device.
[0121] Optionally, the preset initial step length may be positively correlated with the target quantity. The electronic device may use the product of the preset initial step length and the step length coefficient as the blind test step length.
[0122] For example, assuming that the number of versions in the above initial version range is 1000 and the preset value is 100, the electronic device can determine the step coefficient to be 1000 / 100=10. Then, assuming that there are four types of the above initial step lengths (also called step size specifications), such as 1, 5, 10, and 20, the electronic device can obtain four blind test step lengths based on the product of the initial step length and the step coefficient, which are: 1 10=10, 5 10=50, 10 10=100, 20 10=200. Therefore, for the initial version interval with 1000 versions, it can be divided into 4 different blind test step lengths. Taking the 4 blind test step lengths equally divided in the initial version interval as an example, 1000 / 4=250, that is, the blind test step lengths within every 250 versions can be the same, and the blind test step lengths between every 250 versions are different.
[0123] For example, starting from the second version of the aforementioned second boundary of the initial version interval, within 250 versions away from the second version, the blind test step length within the interval is 10; within 250-500 versions away from the second version, the blind test step length within the interval is 50; within 500-750 versions away from the second version, the blind test step length within the interval is 100; within 750-1000 versions away from the second version, the blind test step length within the interval is 200.
[0124] Through the above method, the step size coefficient can be determined based on the number of versions in the above initial version interval, so that the size of the step size coefficient is related to the number of versions in the initial version interval, and then the blind test step size determined based on the step size coefficient is related to the number of versions in the initial version interval. Therefore, when the number of versions in different initial version intervals is different, the obtained blind test step size can be different, thereby improving the flexibility of the blind test step size determination.
[0125] In some embodiments, the above-mentioned different blind test step lengths may be pre-stored in the electronic device, for example. The electronic device may obtain the above-mentioned different blind test step lengths from data stored in the electronic device, for example.
[0126] In some embodiments, the electronic device may randomly select a number of different versions from the number of versions that meet the following step length condition as the blind test step length. The step length condition may include, for example, that the number of versions is less than the number of versions in the initial version interval.
[0127] S202: Based on the blind test step length, sample the versions within the initial version range to determine multiple versions.
[0128] For example, the electronic device may start from the boundary of the initial version interval (for example, the second boundary mentioned above), and use the version indicated by each blind test step as the version to be sampled and determined, thereby determining the above multiple versions. Figure 3 For example, assuming that the version indicated by point A at the boundary of the initial version interval is, the versions within the initial version interval are sampled by blind testing steps, and the determined versions may include, for example, the version indicated by point B, the version indicated by point C, the version indicated by point D, the version indicated by point E, and so on.
[0129] S203. Based on the test dependency information of the kernel, a blind performance test is performed on multiple versions to obtain a blind performance test result.
[0130] Optionally, the test dependency information may be used, for example, to control the target device to install a kernel, build a kernel performance test environment, or control the restart of the target device.
[0131] In some embodiments, the electronic device may, for example, control the target device to sequentially perform performance tests on multiple versions of the kernel based on the test dependency information of the kernel to obtain performance test results of multiple versions. Then, the electronic device may, for example, obtain a blind performance test result based on the performance test results of the multiple versions. Exemplarily, the electronic device may, for example, use the performance test results of the multiple versions as the above-mentioned blind performance test results.
[0132] The operating system of the target device is the aforementioned target operating system. That is, the kernel of the operating system of the target device is the kernel for which performance degradation version positioning is required.
[0133] Optionally, the target device may be any existing device capable of installing the target operating system. In some embodiments, the target device may also be referred to as a client; and the electronic device may also be referred to as a server.
[0134] Through the above method, the electronic device can control the target device to automatically perform kernel performance testing by testing dependency information, thereby realizing automatic performance testing of the kernel, improving the efficiency of obtaining the above performance blind test results, and further improving the efficiency of locating performance-degraded versions based on the performance blind test results.
[0135] In some embodiments, the electronic device can also control multiple devices to perform performance tests on multiple versions of the kernel based on the test dependency information of the above-mentioned kernel, obtain performance test results of the multiple versions, and obtain performance blind test results based on the performance test results of the multiple versions.
[0136] Among the multiple devices, the kernel versions tested by different devices may be different, for example. For example, assuming that the electronic device performs blind performance tests on 100 versions based on the kernel test dependency information to obtain the performance blind test results, and the number of the multiple devices is 10, then the electronic device may, for example, control device 1 to perform performance tests on kernel versions 1-10 based on the above kernel test dependency information to obtain the performance test results of the 10 versions; based on the above kernel test dependency information, control device 1 to perform performance tests on kernel versions 11-20 to obtain the performance test results of the 10 versions... and so on, through 10 devices, realize the blind performance test of 100 versions and obtain the performance blind test results.
[0137] Through the above method, the performance of multiple versions of the kernel can be tested through multiple devices, thereby improving the efficiency of blindly testing the performance of the multiple versions and obtaining the performance blind test results, and further improving the efficiency of locating the performance-degraded version based on the performance blind test results.
[0138] In this embodiment, the blind test step length is determined by the number of versions in the initial version interval, so that the blind test step length can vary with the number of versions in the initial version interval, thereby improving the flexibility of the blind test step length, and further improving the flexibility of the multiple versions in the initial version interval determined based on the blind test step length. Then, through the test dependency information of the kernel, the performance blind test of the multiple versions can be implemented to obtain the performance blind test results, which lays the foundation for determining the target version interval where the kernel performance degrades based on the performance blind test results.
[0139] As another possible implementation, the electronic device may also, for example, take a boundary of the initial version interval (such as the aforementioned second boundary) as a starting point, and determine a version from the initial version interval based on a blind test step length, and then perform a performance test on the kernel of this version based on the test dependency information of the kernel to obtain the performance test result of the version. Then, the electronic device may take this version as a starting point, continue to loop and execute based on a blind test step length, determine a new version from the initial version interval, and then perform a performance test on the kernel of the new version based on the test dependency information of the kernel to obtain the performance test result of the new version, until the above-mentioned multiple versions are determined from the initial version interval and the performance test results of the multiple versions are obtained.
[0140] The following uses the above test dependency information including: test environment construction instructions, test execution instructions and result extraction instructions as an example to illustrate how an electronic device controls a target device to perform performance tests on multiple versions of kernels in sequence based on the kernel test dependency information:
[0141] Figure 4A schematic diagram of a process for obtaining blind performance test results through a target device provided by this application. Figure 4 As shown, in some embodiments, for any performance test, the electronic device may, for example, perform the following steps to implement a performance test of the kernel version through the target device.
[0142] S401. The electronic device sends a test environment building instruction to a target device.
[0143] In some embodiments, the test environment construction instruction may include, for example: data required for the target device to construct the test environment required for the performance test of the kernel, and instruction information for instructing the target device to construct the test environment required for the performance test of the kernel.
[0144] Optionally, the electronic device may, for example, receive a user-triggered instruction for instructing to start locating a performance-degraded version of the kernel, and send the test environment building instruction to the target device.
[0145] S402: The target device responds to the test environment building instruction and builds a test environment required for the performance test of the kernel.
[0146] Optionally, the target device may construct a test environment for the performance test of the kernel in an implementation manner, for example, by referring to any existing test environment construction method for kernel performance testing, which will not be described in detail here.
[0147] In some embodiments, after completing the construction of the above-mentioned test environment, the target device may also send feedback information indicating that the construction of the test environment is completed to the electronic device, for example.
[0148] S403: The electronic device sends a test execution instruction and a kernel software package of the version of the performance test to the target device.
[0149] In some embodiments, the kernel software package may be a kernel RPM package.
[0150] Exemplarily, the electronic device may first download the kernel code of the version from the kernel code library based on the version identifier of the version. Then, the electronic device may compile the kernel code to obtain the RPM package of the kernel. Then, the electronic device may send the RPM package of the kernel and the test execution instruction to the target device. The kernel code library may be, for example, a kernel code library pre-stored in the electronic device.
[0151] S404: The target device responds to the test execution instruction and performs a performance test on the kernel version based on the software package of the kernel in the above test environment to obtain a performance characterization parameter value.
[0152] Optionally, the target device may, for example, install the kernel based on the software package of the kernel. Then, the target device may, for example, perform a performance test on the kernel of this version through any existing kernel performance testing method to obtain a performance characterization parameter value. Exemplarily, the performance characterization parameter value may, for example, be the value of multiple performance characterization parameters, or a performance characterization parameter value (the performance characterization parameter value may, for example, be used to characterize at least one performance of the kernel). Exemplarily, the above-mentioned performance characterization parameters may, for example, include: any existing parameter capable of characterizing kernel performance, such as the kernel's operating speed, response speed, and resource utilization rate.
[0153] S405: The electronic device sends a result extraction instruction to the target device.
[0154] In some embodiments, after completing the performance test on the version of the kernel, the target device may, for example, send feedback information indicating that the performance test on the version of the kernel is completed to the electronic device. The electronic device may, for example, respond to the feedback information and send a result extraction instruction to the target device.
[0155] Alternatively, the electronic device may also send a result extraction instruction to the target device, for example, after sending the test execution instruction to the target device for a preset time period.
[0156] S406: The target device responds to the result extraction instruction and feeds back the above performance characterization parameter value.
[0157] Accordingly, the electronic device may receive the performance characterization parameter value from the target device.
[0158] S407: The electronic device may determine a performance test result of the version based on the performance characterization parameter value.
[0159] In some embodiments, the electronic device may use the performance characterization parameter value as the performance test result of the version.
[0160] Alternatively, in some embodiments, the electronic device may first receive a performance judgment threshold, and then determine a performance test result based on the performance characterization parameter value and the performance judgment threshold.
[0161] Exemplarily, the electronic device may receive the above-mentioned performance judgment threshold value input by the user through, for example, an application programming interface (Application Programming Interface, API) or a graphical user interface (Graphical User Interface, GUI).
[0162] Exemplarily, taking the above-mentioned performance characterization parameter value as a performance test score as an example, the performance judgment threshold may be a score threshold. Assuming that a higher score is used to indicate that the performance of the kernel is better, the electronic device may determine that the performance test result is used to characterize that the performance of the kernel of this version meets the performance requirement when the performance characterization parameter value is greater than or equal to the performance judgment threshold. The electronic device may determine that the performance test result is used to characterize that the performance of the kernel of this version does not meet the performance requirement when the performance characterization parameter value is less than the performance judgment threshold.
[0163] In some embodiments, the target device may, for example, pre-store the above-mentioned performance judgment threshold. After obtaining the performance characterization parameter value, the target device may, for example, obtain the above-mentioned performance test result based on the performance characterization parameter value and the performance judgment threshold. Then, the target device may respond to the result extraction instruction from the electronic device and send the performance test result to the electronic device. Accordingly, the electronic device may receive the performance test result of this version.
[0164] Optionally, after the electronic device determines the performance test result of the version based on the performance characterization parameter value, the target device may also be restarted, for example. The electronic device may refer to the method described in the above embodiment to control the target device to test the performance of the kernel of the next version among the multiple versions and obtain the performance test result of the version. Similarly, the electronic device may obtain the performance test results of the multiple versions through the target device.
[0165] In this embodiment, through the test environment construction instructions, test execution instructions, result extraction instructions, etc., the target device can be automatically controlled to perform performance tests on the kernel of each of the multiple versions based on the kernel software package, and then automatically obtain the performance characterization parameter value, which lays the foundation for automatically obtaining the performance test results based on the performance characterization parameter value. Through the above method, the target device can be automatically controlled to perform the kernel performance test and automatically obtain the performance test results, which improves the efficiency of the kernel performance test, and then improves the efficiency of determining the target version interval where the kernel performance is reduced based on the performance test results.
[0166] The following is a detailed description of how the electronic device determines the target version range where the kernel performance is degraded from the initial version range through the performance blind test results:
[0167] As a possible implementation, the electronic device may determine, based on the blind performance test result, a candidate version interval in which the kernel performance is degraded from the initial version interval, wherein the boundary of the candidate version interval is two adjacent versions from the multiple versions.
[0168] Taking the above-mentioned performance blind test results including the performance test results of the multiple versions as an example, because the performance degradation indicates that the performance of the kernel of the later released version is worse, therefore, the electronic device can, for example, use the performance test results of the kernel of the later released version of the two adjacent versions among the above-mentioned multiple versions to characterize that the performance of the kernel of this version does not meet the performance requirements, and the performance test results of the kernel of the earlier released version to characterize that the performance of the kernel of this version meets the performance requirements, and use the interval consisting of the two adjacent versions as the candidate version interval.
[0169] For example, Figure 3 For example, assume that the multiple versions are version H, version G, version F, version E, version D, version C, version B, and version A, and the performance test results of the multiple versions are as follows Figure 3 As shown in . Among them, "good" means that the performance of the kernel of this version meets the performance requirements. "bad" means that the performance of the kernel of this version does not meet the performance requirements. Then the electronic device can use the interval formed by the version H and version G as the boundary, and the interval formed by the version E and version D as the boundary as the candidate version interval.
[0170] Then, the electronic device may use the candidate version interval that meets the following preset conditions as the target version interval.
[0171] The preset condition may include, for example, that the number of versions existing between the target version and the candidate version is the smallest. That is, the electronic device may use the candidate version interval with the smallest number of versions existing between the target version and the candidate version (or the version release time is closest to the release time of the target version) as the target version interval.
[0172] As mentioned above, the target version is later than the version in the initial version range. For example, the target version may be the latest version of the kernel.
[0173] For example, Figure 3 For example, assuming that the interval formed by version H and version G as the boundary, and the interval formed by version E and version D as the boundary are candidate version intervals, and version A is the target version, the electronic device can use the interval formed by version E and version D as the boundary as the target version interval where the kernel performance is degraded. The electronic device can locate the kernel performance degraded version within the target version interval.
[0174] In some embodiments, if the electronic device determines that there is a candidate version interval with degraded kernel performance from the initial version interval based on the above performance blind test results, the electronic device may use the candidate version interval as the above target version interval.
[0175] In this embodiment, by analyzing the performance blind test results of the electronic device, a candidate version interval with kernel performance degradation is determined from the initial version interval, and then the candidate version interval with the least number of versions existing between the target version and the candidate version interval is used as the target version interval. Because it is usually necessary to locate the kernel performance degradation version when the kernel performance degradation is found, the closer the kernel version is to the latest version, the greater the possibility of the occurrence of the performance degradation version. Therefore, by using the candidate version interval with the least number of versions existing between the target version and the target version as the target version interval, the possibility of including the performance degradation version in the target version interval is increased, thereby improving the accuracy of locating the performance degradation version in the target version interval.
[0176] The following is a detailed description of how the electronic device determines the performance-degraded version of the kernel from the target version range based on the test dependency information:
[0177] As a possible implementation manner, the electronic device may, for example, determine the performance-degraded version of the kernel within the target version range by the aforementioned binary positioning method based on the aforementioned test dependency information.
[0178] Exemplarily, the electronic device may use the target version interval as "two commit points input by the user to the user terminal" when executing the aforementioned binary positioning method, that is, the positioning range of the binary positioning is defined within the performance degradation interval of the kernel.
[0179] It should be understood that the electronic device can, for example, determine the version to be tested in each binary positioning cycle within the target version range by the aforementioned binary positioning method. Then, the electronic device can, for example, use the above-mentioned test dependency information to control the target device to perform a performance test on the kernel of the version to be tested, and obtain the performance test result of the version. Then, the electronic device can re-determine the performance degradation interval of the kernel based on the performance test result of the version, and continue to determine the performance degraded version of the kernel by the aforementioned binary positioning method within the performance degradation interval. And so on, until a version is determined as the performance degraded version of the kernel.
[0180] Because the binary positioning method is more efficient, the performance-degraded version of the kernel is determined by using the aforementioned binary positioning method within the target version range, thereby ensuring the accuracy of positioning the performance-degraded version while improving the efficiency of positioning the performance-degraded version.
[0181] As another possible implementation method, before the electronic device determines the performance-degraded version of the kernel through binary positioning within the target version range based on test dependency information, it may, for example, first determine whether the number of versions within the target version range meets the accuracy requirement of binary positioning, and based on the judgment result of the accuracy requirement, determine whether to start determining the performance-degraded version of the kernel through binary positioning.
[0182] For example, before the electronic device determines the performance-degraded version of the kernel in the target version range by binary positioning based on the test dependency information, it can first determine whether the number of versions in the target version range is less than or equal to a preset number.
[0183] Optionally, the preset number may be, for example, a number pre-stored in the electronic device.
[0184] For example, the electronic device may execute the step of "determining the performance-degraded version of the kernel by binary positioning within the target version interval based on the test dependency information" in response to the number of versions within the target version interval being less than or equal to the preset number.
[0185] When the number of versions within the target version range is less than or equal to the preset number, it means that the range of the target version range for kernel performance degradation determined by the aforementioned method is small, thereby reducing the probability of large fluctuations in kernel performance within the target version range, thereby further reducing the volatility of kernel performance within the target version range, and thereby improving the accuracy of determining the performance-degraded version of the kernel within the target version range through binary positioning.
[0186] In some embodiments, the electronic device may also, for example, respond to the number of versions in the target version interval being greater than a preset number, use the target version interval as a new initial version interval, and redetermine the target version interval based on the new initial version interval, until the number of versions in the redetermined target version interval is less than or equal to the preset number, and then execute the step of "determining the performance-degraded version of the kernel by binary positioning within the target version interval based on the test dependency information."
[0187] When the number of versions within the target version range is greater than the preset number, it means that the range of the target version range for kernel performance degradation determined by the aforementioned method is large. Therefore, by redetermining the target version range for kernel performance degradation from the target version range based on the reference to the aforementioned method, the range of versions included in the redetermined target version range is narrowed, thereby ensuring the accuracy of determining the performance-degraded version of the kernel through binary positioning in the subsequent redetermined target version range.
[0188] For example, taking the kernel of the operating system of the target device as an example, Figure 5 A flowchart of another kernel version location method provided by this application. Figure 5 As shown, the method may include the following steps:
[0189] S501, receiving kernel test dependency information.
[0190] The electronic device may receive the test dependency information of the kernel input by the user, for example, wherein the electronic device may be any electronic device with processing capability, such as a terminal or a server.
[0191] Exemplarily, the electronic device may receive the test dependency information through a GUI or an API, for example.
[0192] The contents included in the test dependency information may refer to the description of the test dependency information in any of the aforementioned embodiments, and will not be described in detail here.
[0193] S502: Use different blind test step lengths to determine multiple versions within the initial version range of the kernel.
[0194] As mentioned above, the blind test step is to sample the versions within the initial version interval to determine the sampling step of the multiple versions. The initial version interval may include: versions of the kernel arranged according to release time.
[0195] S503: By testing the dependency information, the target device is controlled to perform performance tests on multiple versions of kernels in sequence to obtain performance blind test results.
[0196] S504: Determine a target version range where kernel performance is degraded from the initial version range based on the performance blind test result.
[0197] S505 . Based on the test dependency information, determine a performance-degraded version of the kernel within the target version range.
[0198] The implementation manner of the electronic device executing steps S502-S505 may refer to the method described in any of the aforementioned embodiments, for example, and will not be described in detail here.
[0199] S506: Output version information of the performance-degraded version.
[0200] Exemplarily, the version information may include, for example, a version identifier of the performance-degraded version, etc. In some embodiments, the version information of the performance-degraded version may be, for example, a version record of the performance-degraded version (eg, the aforementioned commit).
[0201] Exemplarily, taking the electronic device including a display device (or connected to a display device) as an example, the electronic device can, for example, display the version information of the performance-degraded version through the display device to output the version information of the performance-degraded version. Through the above method, the user can view the version information of the performance-degraded version. For example, the user can perform a repair operation on the kernel performance based on the version information of the performance-degraded version.
[0202] Alternatively, the electronic device may also send the version information of the performance-degraded version to the user terminal to output the version information of the performance-degraded version.
[0203] In this embodiment, after receiving the test dependency information of the kernel, the target device can be controlled to perform performance tests on multiple versions of the kernel in sequence through different blind test step lengths and test dependency information, so that the multiple versions within the initial version interval are automatically tested for initial performance, and the manual operation in the process of positioning the performance-degraded version of the kernel is reduced, thereby improving the efficiency of positioning the performance-degraded version. Then, based on the performance blind test result, the target version interval of the kernel performance degradation within the initial version interval can be determined, and the performance degradation interval of the kernel is screened, so that the performance-degraded version of the kernel can be determined within the target version interval of the performance degradation later. Because the target version interval is the performance degradation interval of the kernel, the volatility of the kernel performance is reduced within the target version interval, thereby improving the accuracy of positioning the performance-degraded version within the target version interval. By outputting the version information of the performance-degraded version, the user can repair the kernel performance based on the version information, because the accuracy of positioning the performance-degraded version is improved by the above method, so the accuracy of the user repairing the kernel performance based on the version information of the performance-degraded version can be improved, thereby improving the user experience.
[0204] The present application also provides a kernel version positioning system. Figure 6 This is a schematic diagram of the architecture of a kernel version positioning system provided by this application. Figure 6 As shown, the kernel version positioning system may include an electronic device and a target device, wherein the kernel is a kernel of an operating system of the target device.
[0205] The electronic device can be used to execute the kernel version positioning method as described in any of the aforementioned embodiments.
[0206] The target device can be used to perform a performance test on the kernel in response to the control of the electronic device. Optionally, how the electronic device controls the target device to perform a performance test on the kernel can refer to the kernel version positioning method described in any of the above embodiments, which will not be repeated here.
[0207] For example, Figure 7 This is a schematic diagram of the architecture of another kernel version positioning system provided by this application. Figure 7 As shown, the electronic device may include: a kernel code repository module, a user setting interaction module, an adaptive backtracking module, an automated performance testing module, etc. The above target device may include, for example, a test scenario construction module and a communication module, etc.
[0208] The kernel code repository module can be used to maintain the kernel code repository, switch to the corresponding version, and provide source code support for compiling kernel RPM packages.
[0209] The user setting interaction module can be used to collect user settings, such as the settings of the initial version range, user-defined kernel test environment construction instructions, test execution instructions, result extraction instructions, etc.
[0210] The adaptive backtracking module can be used to determine the performance degradation interval of the kernel closest to the target version, that is, the target version interval, according to the initial version interval set by the user, in a manner such that the closer to the target version, the shorter the backtracking step (that is, the above-mentioned blind test step); the farther from the target version, the longer the backtracking step.
[0211] The automated performance testing module can be used to determine the performance-degraded version of the kernel through binary positioning within the target version range. For example, it can be used to confirm the intermediate version of binary positioning, compile the kernel RPM package, send the above instructions to the target device for kernel performance testing, receive the performance characterization parameter value of the target device, and judge the performance of the intermediate version based on the user's preset performance judgment threshold, etc., so as to further narrow the binary positioning range.
[0212] The test scenario construction module can be used, for example, to respond to the test environment construction instruction and to construct the test environment required for the performance test of the kernel. The communication module can be used, for example, to implement information interaction with the electronic device.
[0213] For example, Figure 8 A flowchart of another kernel version location method provided by this application. Figure 8 As shown, the method may include the following steps:
[0214] S701, the electronic device maintains a kernel code repository.
[0215] S702: The electronic device receives confirmation of an initial version range and a performance judgment threshold input by a user.
[0216] S703: The electronic device receives a user input of a test scenario selection, a custom scenario construction instruction, a test execution instruction, a result extraction instruction, etc.
[0217] S704: The target device can connect to a series of user-defined instructions transmitted by the electronic device to build a test scenario.
[0218] S705. The electronic equipment automated testing service performs adaptive backtracking to confirm the most recent descending interval, that is, the target version interval.
[0219] S706: Update the binary positioning interval to the target version interval.
[0220] S707, start binary positioning, create a kernel RPM package, and pass it to the target device for installation, restart, etc.
[0221] S708: The target device receives the RPM package transmitted by the electronic device.
[0222] S709: The target device installs the kernel and restarts according to the control instruction transmitted by the electronic device.
[0223] S710: The target device performs a performance test on the kernel according to the user-defined test execution instruction transmitted by the electronic device.
[0224] S711. The target device completes the collection of test results according to the user-defined result extraction instruction transmitted by the electronic device and transmits the result back to the electronic device.
[0225] S712: The electronic device receives the test result sent back by the target device, compares it with the performance judgment threshold, and updates the binary positioning interval.
[0226] S713: Binary positioning is completed, and the version record of the performance-degraded version is determined.
[0227] In this embodiment, the performance of the blind test point is combined with the adaptive performance backtracking action on the binary positioning interval to confirm the most recent degradation interval, that is, the target version interval, and further replace the initial large interval of the binary positioning. Through the above method, while reducing the size of the binary positioning interval, it is ensured that the target version interval is the closest degradation interval to the latest version determined based on the existing information. The possibility of multiple versions affecting performance in the target version interval is reduced, that is, the volatility of version performance is reduced, thereby improving the accuracy of binary positioning for performance degradation version positioning.
[0228] Through the collaborative work of the above-mentioned electronic device and the target device, compared with the problem of lack of automated execution in the binary positioning method in the prior art, through the collaboration of the electronic device and the target device, the positioning of the performance-degraded version can be fully automated by the user only needing to complete the input of the test dependency information, thereby reducing tedious manual operations and improving the efficiency of positioning the performance-degraded version.
[0229] Fig. 9This is a schematic diagram of the structure of a kernel version positioning device provided by this application. Fig. 9 As shown, the kernel version positioning device 80 may include: a processing module 81 , a first determining module 82 , and a second determining module 83 .
[0230] The processing module 81 is used to perform performance blind tests on multiple versions within the initial version interval using different blind test step lengths based on the test dependency information of the kernel to obtain performance blind test results. The blind test step length is to sample the versions within the initial version interval to determine the sampling step length of the multiple versions; the initial version interval includes: versions of the kernel arranged according to release time.
[0231] The first determination module 82 is configured to determine, from the initial version interval, a target version interval where the kernel performance is degraded based on the performance blind test result.
[0232] The second determination module 83 is used to determine the performance-degraded version of the kernel from within the target version range based on the test dependency information.
[0233] Optionally, the processing module 81 is specifically used to determine the blind test step length based on the number of versions in the initial version interval; based on the blind test step length, sample the versions in the initial version interval to determine the multiple versions; based on the test dependency information of the kernel, perform performance blind testing on the multiple versions to obtain the performance blind test results.
[0234] Optionally, the blind test step is positively correlated with the target number; the target number is: the number of versions existing between the version within the blind test step and the target version; the target version is later than the version within the initial version interval.
[0235] Optionally, the processing module 81 is specifically configured to determine a step coefficient based on the number of versions in the initial version interval, and determine the blind test step length based on a preset initial step length and the step coefficient, wherein the step coefficient is positively correlated with the number of versions in the initial version interval.
[0236] Optionally, the processing module 81 is specifically used to control the target device to perform performance tests on the multiple versions of the kernel in sequence based on the test dependency information of the kernel, and obtain the performance test results of the multiple versions; and use the performance test results of the multiple versions as the performance blind test results. The operating system of the target device is the target operating system.
[0237] Taking the test dependency information including: test environment construction instructions, test execution instructions and result extraction instructions as an example, optionally, the processing module 81 is specifically used to send the test environment construction instructions to the target device for any performance test, so that the target device responds to the test environment construction instructions and builds the test environment required for the performance test of the kernel; send the test execution instructions and the kernel software package of the version of the performance test to the target device, so that the target device responds to the test execution instructions, and in the test environment, based on the kernel software package, the performance test of the version of the kernel is performed to obtain the performance characterization parameter value; send the result extraction instruction to the target device, so that the target device responds to the result extraction instruction and feeds back the performance characterization parameter value; receive the performance characterization parameter value from the target device; and determine the performance test result of the version based on the performance characterization parameter value.
[0238] Optionally, the processing module 81 is further configured to receive a performance judgment threshold value input by a user; and determine the performance test result based on the performance characterization parameter value and the performance judgment threshold value.
[0239] Optionally, the first determination module 82 is specifically used to determine, based on the performance blind test result, a candidate version interval where the kernel performance degrades from the initial version interval; and use the candidate version interval that meets the preset conditions as the target version interval. The boundary of the candidate version interval is two adjacent versions of the multiple versions; the preset conditions include: the number of versions between the target version and the target version is the least; the target version is later than the version in the initial version interval.
[0240] Optionally, the second determination module 83 is specifically configured to determine the performance-degraded version of the kernel by binary positioning within the target version interval based on the test dependency information.
[0241] Optionally, the second determination module 83 is specifically used to determine the performance-degraded version of the kernel by binary positioning within the target version interval in response to the number of versions within the target version interval being less than or equal to a preset number, based on the test dependency information.
[0242] Optionally, the second determination module 83 is also used to respond to the number of versions in the target version interval being greater than the preset number, to use the target version interval as a new initial version interval, and to redetermine the target version interval based on the new initial version interval until the number of versions in the redetermined target version interval is less than or equal to the preset number.
[0243] The kernel version positioning device provided in the present application is used to execute the aforementioned kernel version positioning method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0244] Fig.10 This is a schematic diagram of the structure of another kernel version positioning device provided by this application. Fig.10 As shown, the kernel version positioning device 90 may include: a receiving module 91 , a processing module 92 , a first determining module 93 , a second determining module 94 , and an output module 95 .
[0245] The receiving module 91 is used to receive the test dependency information of the kernel.
[0246] The processing module 92 is used to use different blind test step lengths to determine multiple versions within the initial version interval of the kernel; and control the target device to perform performance tests on the multiple versions of the kernel in sequence through the test dependency information to obtain performance blind test results. The blind test step length is to sample the versions within the initial version interval to determine the sampling step length of the multiple versions; the initial version interval includes: versions of the kernel arranged according to release time.
[0247] The first determination module 93 is used to determine the target version interval where the kernel performance is degraded from the initial version interval according to the performance blind test result.
[0248] The second determination module 94 is used to determine the performance-degraded version of the kernel from within the target version range based on the test dependency information.
[0249] The output module 95 is used to output the version information of the performance-degraded version.
[0250] The kernel version positioning device provided in the present application is used to execute the aforementioned kernel version positioning method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0251] Fig.11 A schematic diagram of the hardware structure of an electronic device provided in this application. Fig.11 The electronic device 50 shown includes a memory 51, a processor 52, and a communication interface 53. The memory 51, the processor 52, and the communication interface 53 are communicatively connected to each other. For example, the memory 51, the processor 52, and the communication interface 53 can be communicatively connected by a network connection. Alternatively, the electronic device 50 may further include a bus 54. The memory 51, the processor 52, and the communication interface 53 are communicatively connected to each other via the bus 54. Fig.11 The electronic device 50 is a memory 51 , a processor 52 , and a communication interface 53 that are connected to each other via a bus 54 .
[0252] The memory 51 may be a read-only memory (ROM), a static storage device, a dynamic storage device or a random access memory (RAM). The memory 51 may store a program. When the program stored in the memory 51 is executed by the processor 52, the processor 52 and the communication interface 53 are used to execute the kernel version positioning method described in any of the aforementioned embodiments. The memory may also store data required by the kernel version positioning method.
[0253] The processor 52 may be a general-purpose CPU, a microprocessor, an application-specific integrated circuit (ASIC), a graphics processing unit (GPU), or one or more integrated circuits.
[0254] The processor 52 may also be an integrated circuit chip with signal processing capability. In the implementation process, the kernel version positioning method of the present application may be completed by hardware integrated logic circuits or software instructions in the processor 52. The above-mentioned processor 52 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, and may implement or execute the methods, steps and logic block diagrams disclosed in the following embodiments of the present application. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in the following embodiments of the present application may be directly embodied as being executed by a hardware decoding processor, or may be executed by a combination of hardware and software modules in a decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 51, and the processor 52 reads the information in the memory 51, and completes the kernel version positioning method of the present application in combination with its hardware.
[0255] The communication interface 53 uses a transceiver module such as, but not limited to, a transceiver to implement communication between the electronic device 50 and other devices or a communication network. For example, a data set can be acquired through the communication interface 53 .
[0256] When the electronic device 50 described above includes a bus 54 , the bus 54 may include a path for transmitting information between various components of the electronic device 50 (eg, the memory 51 , the processor 52 , and the communication interface 53 ).
[0257] The present application also provides a computer-readable storage medium, which may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes. Specifically, the computer-readable storage medium stores program instructions, and the program instructions are used for the methods in the above embodiments.
[0258] The present application also provides a program product, which includes an execution instruction, which is stored in a readable storage medium. At least one processor of the electronic device can read the execution instruction from the readable storage medium, and at least one processor executes the execution instruction so that the electronic device implements the kernel version positioning method provided by the various embodiments described above.
[0259] The term "plurality" in this article refers to two or more than two. The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: 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 previous and next associated objects are in an "or" relationship; in the formula, the character " / " indicates that the previous and next associated objects are in a "division" relationship. In addition, it should be understood that in the description of this application, words such as "first" and "second" are only used for the purpose of distinguishing descriptions, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying order.
[0260] It should be understood that the various numerical numbers involved in the embodiments of the present application are only used for the convenience of description and are not used to limit the scope of the embodiments of the present application.
[0261] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A kernel version positioning method, characterized in that: The kernel is a kernel of a target operating system, and the method comprises: Determining a step coefficient based on the number of versions in an initial version interval; the initial version interval includes: versions of the kernel arranged according to release time; the step coefficient is positively correlated with the number of versions in the initial version interval; Determining different blind test step lengths based on a preset initial step length and the step length coefficient; Based on the blind test step length, sampling versions within the initial version interval to determine multiple versions; Based on the test dependency information of the kernel, a blind performance test is performed on the multiple versions to obtain the blind performance test result; Determining a target version interval where kernel performance degrades from the initial version interval based on the blind performance test result; Based on the test dependency information, a performance-degraded version of the kernel is determined from within the target version range.
2. The method according to claim 1, characterized in that The blind test step length is positively correlated with the target number; the target number is: the number of versions existing between the version within the blind test step length and the target version; the target version is later than the version within the initial version interval.
3. The method according to claim 1 or 2, characterized in that: The performing blind performance tests on the multiple versions based on the test dependency information of the kernel to obtain the blind performance test results includes: Based on the test dependency information of the kernel, controlling the target device to perform performance tests on the multiple versions of the kernel in sequence to obtain performance test results of the multiple versions; the operating system of the target device is the target operating system; The performance test results of the multiple versions are used as the performance blind test results.
4. The method according to claim 3, characterized in that The test dependency information includes: a test environment construction instruction, a test execution instruction, and a result extraction instruction. Based on the test dependency information of the kernel, controlling the target device to sequentially perform performance tests on the kernels of the multiple versions to obtain the performance test results of the multiple versions includes: For any performance test, sending the test environment construction instruction to the target device, so that the target device responds to the test environment construction instruction and constructs the test environment required for the performance test of the kernel; Sending the test execution instruction and the software package of the kernel of the version of the performance test to the target device, so that the target device responds to the test execution instruction, and performing a performance test on the kernel of the version based on the software package of the kernel in the test environment to obtain a performance characterization parameter value; Sending the result extraction instruction to the target device, so that the target device responds to the result extraction instruction and feeds back the performance characterization parameter value; receiving the performance characterization parameter value from the target device; Based on the performance characterization parameter value, the performance test result of the version is determined.
5. The method according to claim 4, characterized in that The method further comprises: Receiving performance judgment threshold; The determining the performance test result of the version based on the performance characterization parameter value includes: The performance test result is determined based on the performance characterization parameter value and the performance judgment threshold.
6. The method according to claim 1 or 2, characterized in that: Determining a target version interval where kernel performance degrades from the initial version interval by using the performance blind test result includes: Based on the blind performance test result, determining a candidate version interval where the kernel performance degrades from the initial version interval; the boundary of the candidate version interval is two adjacent versions from the multiple versions; The candidate version interval that meets preset conditions is used as the target version interval; the preset conditions include: the number of versions existing between the target version and the candidate version is the least; the target version is later than the versions in the initial version interval.
7. A kernel version positioning method, characterized in that: The kernel is a kernel of an operating system of a target device, and the method comprises: Receiving test dependency information of the kernel; Determining a step coefficient based on the number of versions in an initial version interval; the initial version interval includes: versions of the kernel arranged according to release time; the step coefficient is positively correlated with the number of versions in the initial version interval; Determining different blind test step lengths based on a preset initial step length and the step length coefficient; Based on the blind test step length, sampling versions within the initial version interval to determine multiple versions; Based on the test dependency information of the kernel, a blind performance test is performed on the multiple versions to obtain the blind performance test result; Determining a target version interval where kernel performance degrades from the initial version interval based on the blind performance test result; Based on the test dependency information, determining a performance-degraded version of the kernel from within the target version interval; Output the version information of the performance-degraded version.
8. A kernel version positioning device, characterized in that: The kernel is a kernel of a target operating system, and the device comprises: A processing module, used to determine a step coefficient based on the number of versions in an initial version interval; determine different blind test step lengths based on a preset initial step length and the step coefficient; sample the versions in the initial version interval based on the blind test step length to determine multiple versions; perform performance blind tests on the multiple versions based on the test dependency information of the kernel to obtain the performance blind test results; wherein the initial version interval includes: versions of the kernel arranged according to release time; the step coefficient is positively correlated with the number of versions in the initial version interval; A first determination module is used to determine a target version interval where kernel performance degrades from the initial version interval based on the performance blind test result; The second determination module is used to determine the performance-degraded version of the kernel from within the target version range based on the test dependency information.
9. A kernel version positioning device, characterized in that: The kernel is a kernel of an operating system of a target device, and the device comprises: A receiving module, used for receiving the test dependency information of the kernel; A processing module, used to determine a step coefficient based on the number of versions in an initial version interval; determine different blind test step lengths based on a preset initial step length and the step coefficient; sample the versions in the initial version interval based on the blind test step length to determine multiple versions; perform performance blind tests on the multiple versions based on the test dependency information of the kernel to obtain the performance blind test results; wherein the initial version interval includes: versions of the kernel arranged according to release time; the step coefficient is positively correlated with the number of versions in the initial version interval; A first determination module is used to determine a target version interval where kernel performance degrades from the initial version interval based on the performance blind test result; A second determination module, configured to determine a performance-degraded version of the kernel from within the target version interval based on the test dependency information; An output module is used to output version information of the performance-degraded version.
10. A kernel version positioning system, characterized in that: The kernel version positioning system includes an electronic device and a target device, wherein the kernel is a kernel of an operating system of the target device; The electronic device is used to perform the method according to any one of claims 1 to 7; The target device is used to perform performance testing on the kernel in response to control of the electronic device.
11. An electronic device, characterized in that: include: Processor and memory; The processor is communicatively connected to the memory; The memory stores computer instructions; The processor executes the computer instructions stored in the memory to implement the method according to any one of claims 1 to 7.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.
13. A computer program product, characterized in that The computer program product comprises a computer program, which implements the method according to any one of claims 1 to 7 when executed by a processor.
Citation Information
Patent Citations
Automatic binary positioning method for domestic operating system kernel performance reduction patch
CN117234765A
Method for determining initial error-reported version in software testing and related product
CN117851234A
Improved anti-shake kernel performance reduction patch rapid binary positioning method and system
CN118964113A