Detecting method, device and system for performance deficiency
A defect detection and performance technology, applied in the field of Java performance testing, to avoid system crashes and ensure performance
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
specific example
[0138] The code snippet is as follows:
[0139]
[0140] In the above code segment, func() has applied for a connection object by calling getConnection in line 2, but in line 5, it has applied for a new connection object and lost the reference to the first applied object After that, when the program calls the func() method every time, it will result in applying for a new object without releasing it.
[0141] When the above code is run in the Java virtual machine, the performance defect detection method provided by this application will detect that there is a memory leak in the above code, and adjust the above code according to the detected performance defect. Line 5 can be deleted.
[0142] Similarly, if a thread deadlock is detected in this application, a resource allocation solution algorithm will be invoked accordingly to adjust the resource allocation during code execution to solve the thread deadlock problem.
[0143] For the aforementioned method embodiments, for th...
Embodiment 1
[0144] Corresponding to the method provided in Embodiment 1 of a performance defect detection method of the present application, see Figure 10 , the present application also provides Embodiment 1 of a performance defect detection device. In this embodiment, the device may include:
[0145] Data acquisition module 601 and detection module 602;
[0146] in:
[0147] The data acquisition module 601 is used to obtain the performance defect detection data of the Java program during the Java virtual machine JVM running the Java program, and the performance defect detection data includes:
[0148] The memory data of the JVM, the thread state data of the Java program and the response data of the Java program thread to the request sent by the client;
[0149] In this application, the Jstat tool in the Java JDK tool can be specifically set in the data acquisition module 601 to collect the JVM memory resource consumption data;
[0150] thread dump tool, thread dump tool is a tool for...
Embodiment 2
[0174] Corresponding to the method provided in Embodiment 2 of a performance defect detection method of the present application, see Figure 12 , the present application also provides a preferred embodiment 2 of a performance defect detection device. In this embodiment, the device may specifically include:
[0175] adjustment module 607;
[0176] The adjustment module 607 is configured to adjust the source code of the Java program according to the detected performance defect.
[0177] In this embodiment, the adjustment module 607 searches the Java program for the source code of the performance data according to the performance data corresponding to the detected performance defect, and adjusts the found source code according to the detected performance defect, so that the Java program Can better run in the actual computer system.
[0178] Corresponding to the above embodiments of a performance defect detection method and device in the present application, the present applicat...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com