CN111400199A - Software aging detection method and device and computer readable storage medium - Google Patents

Software aging detection method and device and computer readable storage medium Download PDF

Info

Publication number
CN111400199A
CN111400199A CN202010502430.9A CN202010502430A CN111400199A CN 111400199 A CN111400199 A CN 111400199A CN 202010502430 A CN202010502430 A CN 202010502430A CN 111400199 A CN111400199 A CN 111400199A
Authority
CN
China
Prior art keywords
software
divergence
target
usage amount
total usage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010502430.9A
Other languages
Chinese (zh)
Other versions
CN111400199B (en
Inventor
赵靖
王思家
陈依群
孙丽群
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Peng Cheng Laboratory
Original Assignee
Peng Cheng Laboratory
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Peng Cheng Laboratory filed Critical Peng Cheng Laboratory
Priority to CN202010502430.9A priority Critical patent/CN111400199B/en
Publication of CN111400199A publication Critical patent/CN111400199A/en
Application granted granted Critical
Publication of CN111400199B publication Critical patent/CN111400199B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/366Software debugging using diagnostics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3644Software debugging by instrumenting at runtime

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a software aging detection method, which comprises the following steps: acquiring the total use amount of test software and a heap corresponding to target software at different times, wherein the test software simulates the operation of the target software and is injected into a memory leak hole; determining divergence values corresponding to all the moments according to a first total usage amount corresponding to the test software and a second total usage amount corresponding to the target software, wherein the divergence values are difference amounts of the first total usage amount and the second total usage amount at the same moment; and when each divergence value is smaller than a preset threshold value, judging that the target software is not aged. The invention also discloses a detection device for software aging and a computer readable storage medium. The invention accurately determines the aging of the software.

Description

Software aging detection method and device and computer readable storage medium
Technical Field
The present invention relates to the field of application program technologies, and in particular, to a method and an apparatus for detecting software aging, and a computer-readable storage medium.
Background
In many software systems which run continuously for a long time, a software aging phenomenon exists, which is generally a bug caused by software failure, and the bug can cause the accumulation of errors in the software execution process and cause adverse effects such as performance reduction or system failure after long-time execution.
One of the main causes of software aging is memory leakage, which is mainly reflected in the usage of the heap in the process. Traditional approaches have employed trend-based approaches to discover the growing trend in memory usage. However, as the number of process heaps increases, the trend detection itself cannot ensure the existence of memory leaks, resulting in inaccurate software aging detection.
Disclosure of Invention
The invention mainly aims to provide a software aging detection method, a software aging detection device and a computer readable storage medium, and aims to solve the problem of inaccurate software aging detection.
In order to achieve the above object, the present invention provides a method for detecting software aging, which comprises the following steps:
acquiring the total use amount of test software and a heap corresponding to target software at different times, wherein the test software simulates the operation of the target software and is injected into a memory leak hole;
determining divergence values corresponding to all the moments according to a first total usage amount corresponding to the test software and a second total usage amount corresponding to the target software, wherein the divergence values are difference amounts of the first total usage amount and the second total usage amount at the same moment;
and when each divergence value is smaller than a preset threshold value, judging that the target software is not aged.
In an embodiment, after the step of determining the divergence value corresponding to each time according to the first total usage amount corresponding to the test software and the second total usage amount corresponding to the target software, the method further includes:
when the divergence value is larger than or equal to a preset threshold value, determining whether divergence events corresponding to the divergence values exist or not, wherein the divergence events are divergence values of which the first preset number is larger than or equal to the preset threshold value, and the corresponding moments of the divergence values larger than or equal to the preset threshold value are adjacent in sequence;
upon determining that there is a divergence event, determining a number of the divergence events;
and when the number of the divergence events is less than or equal to a second preset number, judging that the target software is not aged.
In an embodiment, after the step of determining whether there is a divergence event corresponding to each divergence value, the method further includes:
when determining that no divergence event exists, determining whether each target divergence value is increased according to the time sequence from morning to evening, wherein the target divergence value is a divergence value larger than or equal to a preset threshold value;
and when the target divergence values increase according to the time sequence from morning to evening, judging that the target software is aged.
In an embodiment, after the step of determining the number of divergence events, the method further includes:
when the number of the divergence events is larger than a second preset number, determining the end time point of the last divergence event;
when the time length between the ending time point and the starting operation time point of the test software is less than or equal to the preset time length, judging that the target software is not aged;
and when the time length between the ending time point and the starting running time point of the test software is greater than the preset time length, judging that the target software is aged.
In an embodiment, after the step of determining the ending time point of the last divergence event, the method further includes:
and outputting prompt information of poor software stability when the duration between the ending time point and the starting running time point of the test software is less than or equal to the preset duration.
In an embodiment, the step of determining the divergence value corresponding to each time according to the first total usage amount corresponding to the test software and the second total usage amount corresponding to the target software includes:
generating a first signal corresponding to the test software according to each first total usage amount, and generating a second signal corresponding to the target software according to each second total usage amount;
and determining a divergence value corresponding to each moment according to the first signal and the second signal.
In an embodiment, the step of determining the divergence value corresponding to each time according to the first signal and the second signal includes:
selecting a target moment in a time period corresponding to the first signal;
determining a first total usage amount of the first signal at the target time and a control limit coefficient and a smoothing coefficient of the second signal;
determining an upper control limit value and a lower control limit value corresponding to the second signal at the target moment according to the control limit coefficient and the smoothing coefficient;
and determining a divergence value corresponding to the target time according to the upper control limit value, the lower control limit value and the first total usage amount, and returning to execute the step of selecting the target time in the time period corresponding to the first signal.
In an embodiment, the test software is injected with loads corresponding to the load instructions at different times to simulate the operation of the target software, and the injected loads are different at each time.
In order to achieve the above object, the present invention further provides a software aging detection apparatus, which includes a memory, a processor, and a detection program stored in the memory and executable on the processor, and when the detection program is executed by the processor, the detection program implements the steps of the software aging detection method as described above.
To achieve the above object, the present invention further provides a computer-readable storage medium storing a detection program, which when executed by a processor, implements the steps of the detection method for software aging as described above.
According to the software aging detection method and device and the computer readable storage medium, the software aging detection device obtains the total use amount of the test software and the stacks corresponding to the target software at different times, the test software simulates the operation of the target software, and the test software is injected with the memory leakage loophole; the device determines divergence values corresponding to all the moments according to the first total usage amount of the test software and the second total usage amount of the target software, and judges that the target software is not aged when the divergence values are smaller than a preset threshold value. The memory leakage loophole is injected into the test software, so that the memory leakage condition exists when the test software simulates the target software to run, and the device can determine whether the target software is aged or not according to the memory leakage condition.
Drawings
FIG. 1 is a schematic diagram of a hardware architecture of a software aging detection apparatus according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a first embodiment of a method for detecting software aging according to the present invention;
FIG. 3 is a flowchart illustrating a second embodiment of the method for detecting software aging according to the present invention;
FIG. 4 is a flowchart illustrating a third embodiment of the method for detecting software aging according to the present invention;
FIG. 5 is a flowchart illustrating a fourth embodiment of the method for detecting software aging according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The main solution of the embodiment of the invention is as follows: acquiring the total use amount of test software and a heap corresponding to target software at different times, wherein the test software simulates the operation of the target software and is injected into a memory leak hole; determining divergence values corresponding to all the moments according to a first total usage amount corresponding to the test software and a second total usage amount corresponding to the target software, wherein the divergence values are difference amounts of the first total usage amount and the second total usage amount at the same moment; and when each divergence value is smaller than a preset threshold value, judging that the target software is not aged.
The memory leakage loophole is injected into the test software, so that the memory leakage condition exists when the test software simulates the target software to run, and the device can determine whether the target software is aged or not according to the memory leakage condition.
As an implementation, the detection apparatus of software aging may be as shown in fig. 1.
The embodiment of the invention relates to a detection device for software aging, which comprises: a processor 101, e.g. a CPU, a memory 102, a communication bus 103. Wherein a communication bus 103 is used for enabling the connection communication between these components.
The memory 102 may be a high-speed RAM memory or a non-volatile memory (e.g., a disk memory). As shown in fig. 1, a detection program may be included in the memory 103 as a kind of computer storage medium; and the processor 101 may be configured to call the detection program stored in the memory 102 and perform the following operations:
acquiring the total use amount of test software and a heap corresponding to target software at different times, wherein the test software simulates the operation of the target software and is injected into a memory leak hole;
determining divergence values corresponding to all the moments according to a first total usage amount corresponding to the test software and a second total usage amount corresponding to the target software, wherein the divergence values are difference amounts of the first total usage amount and the second total usage amount at the same moment;
and when each divergence value is smaller than a preset threshold value, judging that the target software is not aged.
In one embodiment, the processor 101 may be configured to call a detection program stored in the memory 102 and perform the following operations:
when the divergence value is larger than or equal to a preset threshold value, determining whether divergence events corresponding to the divergence values exist or not, wherein the divergence events are divergence values of which the first preset number is larger than or equal to the preset threshold value, and the corresponding moments of the divergence values larger than or equal to the preset threshold value are adjacent in sequence;
upon determining that there is a divergence event, determining a number of the divergence events;
and when the number of the divergence events is less than or equal to a second preset number, judging that the target software is not aged.
In one embodiment, the processor 101 may be configured to call a detection program stored in the memory 102 and perform the following operations:
when determining that no divergence event exists, determining whether each target divergence value is increased according to the time sequence from morning to evening, wherein the target divergence value is a divergence value larger than or equal to a preset threshold value;
and when the target divergence values increase according to the time sequence from morning to evening, judging that the target software is aged.
In one embodiment, the processor 101 may be configured to call a detection program stored in the memory 102 and perform the following operations:
when the number of the divergence events is larger than a second preset number, determining the end time point of the last divergence event;
when the time length between the ending time point and the starting operation time point of the test software is less than or equal to the preset time length, judging that the target software is not aged;
and when the time length between the ending time point and the starting running time point of the test software is greater than the preset time length, judging that the target software is aged.
In one embodiment, the processor 101 may be configured to call a detection program stored in the memory 102 and perform the following operations:
and outputting prompt information of poor software stability when the duration between the ending time point and the starting running time point of the test software is less than or equal to the preset duration.
In one embodiment, the processor 101 may be configured to call a detection program stored in the memory 102 and perform the following operations:
generating a first signal corresponding to the test software according to each first total usage amount, and generating a second signal corresponding to the target software according to each second total usage amount;
and determining a divergence value corresponding to each moment according to the first signal and the second signal.
In one embodiment, the processor 101 may be configured to call a detection program stored in the memory 102 and perform the following operations:
selecting a target moment in a time period corresponding to the first signal;
determining a first total usage amount of the first signal at the target time and a control limit coefficient and a smoothing coefficient of the second signal;
determining an upper control limit value and a lower control limit value corresponding to the second signal at the target moment according to the control limit coefficient and the smoothing coefficient;
and determining a divergence value corresponding to the target time according to the upper control limit value, the lower control limit value and the first total usage amount, and returning to execute the step of selecting the target time in the time period corresponding to the first signal.
In one embodiment, the processor 101 may be configured to call a detection program stored in the memory 102 and perform the following operations:
the test software is injected with loads corresponding to the load instructions at different moments to simulate the operation of the target software, and the injected loads at all the moments are different.
According to the scheme, the software aging detection device obtains the total use amount of the test software and the heap corresponding to the target software at different times, the test software simulates the operation of the target software, and the test software injects a memory leakage bug; the device determines divergence values corresponding to all the moments according to the first total usage amount of the test software and the second total usage amount of the target software, and judges that the target software is not aged when the divergence values are smaller than a preset threshold value. The memory leakage loophole is injected into the test software, so that the memory leakage condition exists when the test software simulates the target software to run, and the device can determine whether the target software is aged or not according to the memory leakage condition.
Based on the hardware architecture of the detection device for the software aging, the embodiment of the detection method for the software aging is provided.
Referring to fig. 2, fig. 2 is a first embodiment of the method for detecting software aging according to the present invention, which includes the following steps:
step S10, acquiring the total use amount of the test software and the heap corresponding to the target software at different times, wherein the test software simulates the operation of the target software and is injected into a memory leak hole;
in this embodiment, the execution subject is a detection device of software aging. The software version of the test software is installed in the operating system of a given execution environment and receives the load injected by the workload generator, thereby simulating the target software running. The working load generator can distribute the size of the memory block to control the working load intensity, the working load intensity is divided into a plurality of levels such as low level, normal level and high level, the working load generator can repeatedly request and release the behavior of the memory block simulation target software at random intervals, namely, the loads corresponding to the low level, the normal level and the high level are sequentially injected into the test software. It should be noted that, when the workload generates and injects the load into the test software, the sizes of the allocation blocks are randomly allocated, but the sizes of the random allocation blocks should be in the interval corresponding to the workload intensity, that is, the loads corresponding to the load instructions injected by the test software at different times are different. For example, the workload intensity is low, then the allocation block size is 32 bytes to 512 bytes; the workload intensity is a normal level, and the size of the allocation block is 512 to 28160 bytes; the workload intensity is high level and the size of the allocation block is 1024 bytes to 204800 bytes. The reason for the different loads injected in the test software is: the increase in heap size in the process within the test software may be the result of new memory pages added to the heap pool, not necessarily due to memory leaks, which may be observed under varying workloads (test software) and constant workloads (target software), thus requiring allocation blocks of different sizes.
The target software is software which needs to be tested for aging. The test software is injected into the memory leak bug by the workload generator. Specifically, the workload generator is written through the C language, and dynamic memory allocation is performed using a standard function malloc ()/free (). Injecting a fault instruction in the free () that leaks out the block of memory in a given percentage (p), i.e. making p% of the free () call that cannot release the allocated memory due to the fault instruction, it can be understood that p% is the leakage rate given by the workload generator.
The monitoring tool is determined according to the type of the operating system, for example, the operating system is MS Windows, the monitoring tool is Detours, the operating system is MS L inux, and the monitoring tool is Systemtap.
Step S20, determining divergence values corresponding to all times according to a first total usage amount corresponding to the test software and a second total usage amount corresponding to the target software, wherein the divergence values are difference amounts of the first total usage amount and the second total usage amount at the same time;
after the device obtains the first total usage amount and the second total usage amount, each time can be determined according to each first total usage amount and each second total usage amountThe corresponding divergence value. Specifically, the device generates the first signals at the time corresponding to each first total usage amount and each first total usage amount by using an SPC (Statistical process control) index weighted moving average method
Figure 35803DEST_PATH_IMAGE002
. Thus, EWMA (control chart of Exponentially Weighted Moving Average) is obtained. Similarly, the device generates second signals for each second total usage amount and the time corresponding to each second total usage amount, so that the device determines the divergence value corresponding to each time according to the first signal and the second signal. The divergence value is understood to be a difference between the first total usage amount and the second total usage amount at the same time. Specifically, the divergence value refers to a metric generated by subtracting the influence of the first total usage amount from the second total usage amount (the first total usage amount and the second total usage amount correspond to the same time) in the detection process, and the purpose of the metric is to clarify the difference between the target signal (the target signal is obtained according to each first total usage amount) and the baseline signal (the baseline signal is obtained according to each second total usage amount) in a metric manner. The baseline signal is an index value when the software of the robust version (target software) is aged, the target signal is an index value when the detection version (test software) is operated, and the divergence value is the operation state of the detection version except the robust version, so that the rest is abnormal, and the divergence value is used for improving the accuracy of detection.
The divergence value corresponding to each moment is calculated according to the following formula:
Figure 302836DEST_PATH_IMAGE003
wherein the content of the first and second substances,
Figure 32895DEST_PATH_IMAGE005
is the value of the divergence, and is,
Figure 701773DEST_PATH_IMAGE006
when isThe first total amount of use corresponding to the moment t,
Figure 695137DEST_PATH_IMAGE007
is the upper control limit at time t in the second signal,
Figure 449467DEST_PATH_IMAGE008
is the lower control limit at time t in the second signal. While
Figure 593003DEST_PATH_IMAGE007
And
Figure 116388DEST_PATH_IMAGE008
calculated according to the following formula:
Figure 546233DEST_PATH_IMAGE009
wherein, mu0To a desired value, LσFor the control limit coefficient, λ is a smoothing coefficient, λ is 0 ≦ 1, and λ is a constant.
It can be understood that the device selects a target time within a time period corresponding to the first signal, so as to determine a first total usage amount corresponding to the first signal at the target time, and a control limit coefficient and a smoothing coefficient corresponding to the second signal, so as to determine an upper control limit value and a lower control limit value of the second signal at the target time according to the control limit coefficient and the smoothing coefficient, and thus determine a divergence value corresponding to the target time according to the upper control limit value, the lower control limit value and the first total usage amount; the device selects a target moment in a time period corresponding to the return execution of the first signal so as to determine the divergence value corresponding to each moment one by one. Each time is a sampling time of the monitoring tool.
And step S30, when each divergence value is smaller than a preset threshold value, judging that the target software is not aged.
After the device determines each divergence value, if each divergence value is smaller than a preset threshold value, it can be judged that the target software is not aged, and the device can output prompt information that the target software is not aged. The preset threshold may be any suitable value, such as 0.5.
In the technical scheme provided by this embodiment, a detection device for software aging acquires the total usage amount of the test software and the heap corresponding to the target software at different times, the test software simulates the operation of the target software, and the test software injects a memory leak; the device determines divergence values corresponding to all the moments according to the first total usage amount of the test software and the second total usage amount of the target software, and judges that the target software is not aged when the divergence values are smaller than a preset threshold value. The memory leakage loophole is injected into the test software, so that the memory leakage condition exists when the test software simulates the target software to run, and the device can determine whether the target software is aged or not according to the memory leakage condition.
Referring to fig. 3, fig. 3 is a second embodiment of the method for detecting software aging according to the present invention, and based on the second embodiment, after step S20, the method further includes:
step S40, when the divergence value is larger than or equal to the preset threshold value, determining whether divergence events corresponding to the divergence values exist, wherein the divergence events are divergence values of which the first preset number is larger than or equal to the preset threshold value, and the corresponding moments of the divergence values larger than or equal to the preset threshold value are adjacent in sequence;
step S50, when determining that divergence events exist, determining the number of divergence events;
and step S60, when the number of the divergence events is less than or equal to a second preset number, judging that the target software is not aged.
In this embodiment, if there is a divergence value greater than a predetermined threshold, the device needs to determine that there is a divergence event. The divergence event refers to a first preset number of divergence values larger than or equal to a preset threshold, and the corresponding moments of the divergence values larger than or equal to the preset threshold are adjacent in sequence. The first predetermined amount may be any suitable amount. Preferably, the first preset number is 5, that is, if 5 temporally consecutive divergence values are all greater than or equal to the preset threshold value, it can be determined that a divergence event has occurred. The number of divergence events can characterize whether aging of the target software occurs. If the number of the divergence events is smaller than or equal to the second preset number, it indicates that the target software is not aged due to the memory leakage, that is, the target software is not aged, and at this time, it is determined that the target software is not aged, and the device may output a prompt message that the target software is not aged.
In the technical scheme provided by this embodiment, when the divergence value is greater than or equal to the preset threshold value, it is determined whether a divergence event corresponding to each divergence value exists, and if the divergence event exists, it is determined that the target software is not aged.
Referring to fig. 4, fig. 4 is a third embodiment of the method for detecting software aging according to the present invention, and based on the second embodiment, after step S40, the method further includes:
and step S70, when it is determined that no divergence event exists and the target divergence values increase from morning to evening, judging that the target software is aged, wherein the target divergence value is a divergence value larger than a preset threshold value.
In this embodiment, the absence of a divergence event means that more than a first preset number of individual divergence values are each greater than a preset threshold. For example, the first preset number is 5, and if there are 6 or more than 6 divergence values that are sequentially adjacent to each other, the divergence event may be determined to be absent. If there is no divergence event, the device needs whether each target divergence value monotonically increases in time order.
Specifically, when it is determined that no divergence event exists, divergence values larger than a preset threshold value are determined as target divergence values, if the time corresponding to each target divergence value is adjacent in sequence and each target divergence value is increased from early to late, each target divergence value is increased in a monotonous way, and at this time, the memory leakage of the target software is continuously increased, and the device can judge that the software is aged.
In the technical scheme provided by this embodiment, when it is determined that there is no divergence event and each target divergence value increases in the order from morning to evening, the apparatus determines that the target software is aged due to continuous increase of memory leakage.
Referring to fig. 5, fig. 5 is a fourth embodiment of the method for detecting software aging according to the present invention, and based on the second embodiment, after step S50, the method further includes:
step S80, when the number of the divergence events is larger than a second preset number, determining the end time point of the last divergence event;
step S90, when the time length between the ending time point and the starting running time point of the test software is less than or equal to the preset time length, judging that the target software is not aged;
and S100, judging that the target software is aged when the time length between the ending time point and the starting running time point of the test software is greater than the preset time length.
In this embodiment, the existence of divergence events does not necessarily confirm that the target software is aged, and may be a false alarm, but the false alarm has a certain time limit, that is, the false alarm disappears after a certain period of time. Therefore, when the number of the divergence events is larger than the second preset number, the ending time point of the last divergence event is determined, if the interval time length between the ending time point and the starting operation time point of the test software operation is smaller than or equal to the preset time length, the existence of the divergence event can be determined as an error alarm, and at this time, the target software is judged not to be aged. If the interval time between the ending time point and the starting running time point of the test software is longer than the preset time, namely the time effect of the error alarm is over, the divergence event still occurs in the test software, and at the moment, the target software can be determined to be really aged. The preset duration can be regarded as the aging duration of the false alarm.
It should be noted that, when the number of divergence events is greater than the second preset number, and the duration of the ending time point and the starting operation time point is less than or equal to the preset duration, the target software is not aged, but the software stability is poor, and at this time, the device may output a prompt message indicating that the software stability is poor.
In the technical scheme provided by this embodiment, after determining that the number of divergence events is greater than the second preset number, the device determines whether the test software has an error alarm, if so, determines that the target file is not aged, and if not, the target software is aged.
The present invention also provides a device for detecting software aging, which includes a memory, a processor, and a detection program stored in the memory and executable on the processor, and when the detection program is executed by the processor, the detection program implements the steps of the method for detecting software aging according to the above embodiment.
The present invention also provides a computer-readable storage medium storing a detection program, which when executed by a processor implements the steps of the detection method of software aging as described in the above embodiments.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method for detecting software aging is characterized by comprising the following steps:
acquiring the total use amount of test software and a heap corresponding to target software at different times, wherein the test software simulates the operation of the target software and is injected into a memory leak hole;
determining divergence values corresponding to all the moments according to a first total usage amount corresponding to the test software and a second total usage amount corresponding to the target software, wherein the divergence values are difference amounts of the first total usage amount and the second total usage amount at the same moment;
and when each divergence value is smaller than a preset threshold value, judging that the target software is not aged.
2. The method for detecting software aging according to claim 1, wherein after the step of determining the divergence value corresponding to each time according to the first total usage amount corresponding to the test software and the second total usage amount corresponding to the target software, the method further comprises:
when the divergence value is larger than or equal to a preset threshold value, determining whether divergence events corresponding to the divergence values exist or not, wherein the divergence events are divergence values of which the first preset number is larger than or equal to the preset threshold value, and the corresponding moments of the divergence values larger than or equal to the preset threshold value are adjacent in sequence;
upon determining that there is a divergence event, determining a number of the divergence events;
and when the number of the divergence events is less than or equal to a second preset number, judging that the target software is not aged.
3. The method of detecting software aging of claim 2, wherein said step of determining whether there is a divergence event corresponding to each of said divergence values is followed by further comprising:
and when it is determined that no divergence event exists and each target divergence value is increased from morning to evening, judging that the target software is aged, wherein the target divergence value is a divergence value larger than a preset threshold value.
4. The method of detecting software aging of claim 2, wherein said step of determining the number of divergence events is followed by further comprising:
when the number of the divergence events is larger than a second preset number, determining the end time point of the last divergence event;
when the time length between the ending time point and the starting operation time point of the test software is less than or equal to the preset time length, judging that the target software is not aged;
and when the time length between the ending time point and the starting running time point of the test software is greater than the preset time length, judging that the target software is aged.
5. The method of detecting software aging of claim 4, wherein said step of determining the end point in time of the last said divergence event is followed by further comprising:
and outputting prompt information of poor software stability when the duration between the ending time point and the starting running time point of the test software is less than or equal to the preset duration.
6. The method for detecting software aging according to claim 1, wherein the step of determining the divergence value corresponding to each time point according to the first total usage amount corresponding to the test software and the second total usage amount corresponding to the target software comprises:
generating a first signal corresponding to the test software according to each first total usage amount, and generating a second signal corresponding to the target software according to each second total usage amount;
and determining a divergence value corresponding to each moment according to the first signal and the second signal.
7. The method of detecting software aging of claim 6, wherein the step of determining a divergence value for each time based on the first signal and the second signal comprises:
selecting a target moment in a time period corresponding to the first signal;
determining a first total usage amount of the first signal at the target time and a control limit coefficient and a smoothing coefficient of the second signal;
determining an upper control limit value and a lower control limit value corresponding to the second signal at the target moment according to the control limit coefficient and the smoothing coefficient;
and determining a divergence value corresponding to the target time according to the upper control limit value, the lower control limit value and the first total usage amount, and returning to execute the step of selecting the target time in the time period corresponding to the first signal.
8. The method for detecting software aging according to any one of claims 1 to 7, wherein the test software is injected with loads corresponding to load instructions at different times to simulate the operation of the target software, and the injected loads are different at each time.
9. A device for detecting software aging, comprising a memory, a processor and a detection program stored in the memory and executable on the processor, wherein the detection program, when executed by the processor, implements the steps of the method for detecting software aging according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a detection program, which when executed by a processor implements the steps of the detection method of software aging according to any one of claims 1 to 8.
CN202010502430.9A 2020-06-05 2020-06-05 Software aging detection method and device and computer readable storage medium Active CN111400199B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010502430.9A CN111400199B (en) 2020-06-05 2020-06-05 Software aging detection method and device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010502430.9A CN111400199B (en) 2020-06-05 2020-06-05 Software aging detection method and device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN111400199A true CN111400199A (en) 2020-07-10
CN111400199B CN111400199B (en) 2020-11-03

Family

ID=71433682

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010502430.9A Active CN111400199B (en) 2020-06-05 2020-06-05 Software aging detection method and device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111400199B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112000580A (en) * 2020-08-27 2020-11-27 武汉理工大学 Load-related software aging detection method
CN112505519A (en) * 2020-11-23 2021-03-16 赖俊生 Method, device and computer readable storage medium for monitoring and confirming aging state of semiconductor device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102681940A (en) * 2012-05-15 2012-09-19 兰雨晴 Method for carrying out performance test on memory management subsystem of Linux operation system
CN103383659A (en) * 2013-07-11 2013-11-06 哈尔滨工程大学 Software accelerating life test method
CN103984867A (en) * 2014-05-20 2014-08-13 南京理工大学 Recession analysis method for virtual machine monitor in manner of context awareness
CN104536894A (en) * 2015-01-09 2015-04-22 哈尔滨工程大学 Global optimization method based on maintenance charge and for two-tier software aging phenomenon
US20190179733A1 (en) * 2017-12-13 2019-06-13 Arm Limited Software test program generation
US20200034277A1 (en) * 2018-07-30 2020-01-30 EMC IP Holding Company LLC Method for performance analysis in a continuous integration pipeline
US10592404B2 (en) * 2017-03-01 2020-03-17 International Business Machines Corporation Performance test of software products with reduced duration

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102681940A (en) * 2012-05-15 2012-09-19 兰雨晴 Method for carrying out performance test on memory management subsystem of Linux operation system
CN103383659A (en) * 2013-07-11 2013-11-06 哈尔滨工程大学 Software accelerating life test method
CN103984867A (en) * 2014-05-20 2014-08-13 南京理工大学 Recession analysis method for virtual machine monitor in manner of context awareness
CN104536894A (en) * 2015-01-09 2015-04-22 哈尔滨工程大学 Global optimization method based on maintenance charge and for two-tier software aging phenomenon
US10592404B2 (en) * 2017-03-01 2020-03-17 International Business Machines Corporation Performance test of software products with reduced duration
US20190179733A1 (en) * 2017-12-13 2019-06-13 Arm Limited Software test program generation
US20200034277A1 (en) * 2018-07-30 2020-01-30 EMC IP Holding Company LLC Method for performance analysis in a continuous integration pipeline

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
ZHAO JING ET AL: "Evaluation of software performance affected by aging", 《2010 IEEE SECOND INTERNATIONAL WORKSHOP ON SOFTWARE AGING AND REJUVENATION》 *
刘建军等: "J2EE 应用服务器的软件老化测试研究", 《计算机技术与发展》 *
李志娟等: "基于数据分析的云监控系统", 《指挥信息系统与技术》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112000580A (en) * 2020-08-27 2020-11-27 武汉理工大学 Load-related software aging detection method
CN112505519A (en) * 2020-11-23 2021-03-16 赖俊生 Method, device and computer readable storage medium for monitoring and confirming aging state of semiconductor device

Also Published As

Publication number Publication date
CN111400199B (en) 2020-11-03

Similar Documents

Publication Publication Date Title
CN108763089B (en) Test method, device and system
Carrozza et al. Memory leak analysis of mission-critical middleware
CN111400199B (en) Software aging detection method and device and computer readable storage medium
CN102681938B (en) Memory leakage detecting method and device
CN103109276B (en) System detection method
CN109901881B (en) Plug-in loading method and device of application program, computer equipment and storage medium
CN111813646B (en) Method and device for injecting application probe in docker container environment
CN110059068B (en) Data verification method and data verification system in distributed storage system
CN111124911A (en) Automatic testing method, device, equipment and readable storage medium
CN110879781A (en) Program debugging method and device, electronic equipment and computer readable storage medium
EP2196910A1 (en) System and methods for enhanced profiling of computer applications
CN111124921A (en) Memory out-of-range detection method, device, equipment and storage medium
CN112153375A (en) Front-end performance testing method, device, equipment and medium based on video information
CN111984527A (en) Software performance testing method, device, equipment and medium
CN104516817A (en) Memory leak detection method and device
CN115656788B (en) Chip testing system, method, equipment and storage medium
CN115733741B (en) Abnormal scene test method and device for system to be tested
CN112148599A (en) Performance pressure measurement method, device and equipment
CN110888809A (en) Test task risk prediction method and device
CN115687129A (en) Coverage rate report generation method and device, storage medium and computer equipment
CN111831551B (en) Non-blocking embedded software testing method, device and storage medium
CN114242181A (en) Desert sand concrete strength prediction model training method, device, equipment and medium
CN110442508B (en) Test task processing method, device, equipment and medium
CN111352852A (en) Regression test case selection method and device
CN113377588A (en) Sustainable integration test method and device for hard disk and computer equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant