CN111045891B - Monitoring method, device, equipment and storage medium based on java multithreading - Google Patents

Monitoring method, device, equipment and storage medium based on java multithreading Download PDF

Info

Publication number
CN111045891B
CN111045891B CN201911267533.5A CN201911267533A CN111045891B CN 111045891 B CN111045891 B CN 111045891B CN 201911267533 A CN201911267533 A CN 201911267533A CN 111045891 B CN111045891 B CN 111045891B
Authority
CN
China
Prior art keywords
monitoring
virtual machine
interface
thread
request
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.)
Active
Application number
CN201911267533.5A
Other languages
Chinese (zh)
Other versions
CN111045891A (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.)
Shenzhen Qianhai Huanrong Lianyi Information Technology Service Co Ltd
Original Assignee
Shenzhen Qianhai Huanrong Lianyi Information Technology Service Co Ltd
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 Shenzhen Qianhai Huanrong Lianyi Information Technology Service Co Ltd filed Critical Shenzhen Qianhai Huanrong Lianyi Information Technology Service Co Ltd
Priority to CN201911267533.5A priority Critical patent/CN111045891B/en
Publication of CN111045891A publication Critical patent/CN111045891A/en
Application granted granted Critical
Publication of CN111045891B publication Critical patent/CN111045891B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3089Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the invention discloses a monitoring method, a device, equipment and a storage medium based on java multithreading, wherein the method comprises the following steps: accessing the monitoring interface into the Spring class; generating a plurality of request threads for concurrency simulation in a thread pool of the java virtual machine; monitoring a plurality of request threads generated in the java virtual machine by using the monitoring interface, and recording a monitoring result; analyzing the monitoring result recorded by the monitoring interface and sending the analysis result to the user terminal. According to the invention, the monitoring interface is arranged to automatically check and analyze the results of the concurrent threads, and the analysis results are fed back to the user, so that a great deal of manpower can be saved and the testing efficiency can be improved.

Description

Monitoring method, device, equipment and storage medium based on java multithreading
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a java multithreading-based monitoring method, device, equipment, and storage medium.
Background
In the prior art, in some concurrency scenarios, we usually use code review to check the code that is not thread safe. However, if the traffic is large, the code design is complex, it is difficult to inspect the code unsafe to the thread in the form of code review, meanwhile, we need to analyze the performance of the unsafe problem of the thread, and in this case, if the inspection and analysis are performed only manually, the error is easily made in the process of inspection and analysis due to the subjectivity of people, and relatively large manpower is consumed.
Disclosure of Invention
In view of the above, the embodiment of the invention provides a java multithreading-based monitoring method, device, equipment and storage medium, which automatically checks and analyzes the results of concurrent threads by setting a monitoring interface and feeds back the analysis results to a user, so that a great deal of manpower can be saved and the testing efficiency can be improved.
In one aspect, an embodiment of the present invention provides a java multithreading-based monitoring method, where the method includes:
accessing the monitoring interface into the Spring class;
generating a plurality of request threads for concurrency simulation in a thread pool of the java virtual machine;
monitoring a plurality of request threads generated in the java virtual machine by using the monitoring interface, and recording a monitoring result;
analyzing the monitoring result recorded by the monitoring interface and sending the analysis result to the user terminal.
On the other hand, the embodiment of the invention provides a java multithreading-based monitoring device, which comprises:
the access unit is used for accessing the monitoring interface into the Spring class;
the generating unit is used for generating a plurality of request threads for concurrency simulation in a thread pool of the java virtual machine;
the monitoring and recording unit is used for monitoring a plurality of request threads generated in the java virtual machine by utilizing the monitoring interface and recording monitoring results;
and the analysis transmitting unit is used for analyzing the monitoring result recorded by the monitoring interface and transmitting the analysis result to the user terminal.
In yet another aspect, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements the java multithreading-based monitoring method as described above when executing the computer program.
In yet another aspect, embodiments of the present invention further provide a computer readable storage medium storing one or more computer programs executable by one or more processors to implement the java-based multithreading monitoring method as described above.
The embodiment of the invention provides a monitoring method, a device, equipment and a storage medium based on java multithreading, wherein the method comprises the following steps: accessing the monitoring interface into the Spring class; generating a plurality of request threads for concurrency simulation in a thread pool of the java virtual machine; monitoring a plurality of request threads generated in the java virtual machine by using the monitoring interface, and recording a monitoring result; analyzing the monitoring result recorded by the monitoring interface and sending the analysis result to the user terminal. According to the invention, the monitoring interface is arranged to automatically check and analyze the results of the concurrent threads, and the analysis results are fed back to the user, so that a great deal of manpower can be saved and the testing efficiency can be improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic view of an application scenario of a java multithreading-based monitoring method provided by an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a monitoring method based on java multithreading provided by an embodiment of the invention;
FIG. 3 is another schematic flow chart of a java multithreading-based monitoring method provided by an embodiment of the present invention;
FIG. 4 is a schematic block diagram of a java multithreading-based monitoring device provided by an embodiment of the present invention;
FIG. 5 is another schematic block diagram of a java multithreading-based monitoring device provided in an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be understood that the terms "comprises" and "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
Referring to fig. 1 and fig. 2, fig. 1 is a schematic view of an application scenario of a java multithreading-based monitoring method according to an embodiment of the present invention, and fig. 2 is a schematic flow chart of a java multithreading-based monitoring method according to an embodiment of the present invention. The monitoring method based on java multithreading is applied to java virtual machines. As an application, as shown in fig. 1, the java multithreading-based monitoring method is applied to a java virtual machine 10, and the java virtual machine 10 monitors and analyzes the running result of the concurrent thread, and sends the analysis result to a user terminal 20 to inform a user, such as a developer, to perform subsequent processing according to the analysis result, where the user terminal is a terminal device used by the developer, such as a desktop computer, a notebook computer, a smart phone, or the like.
Referring to fig. 2, fig. 2 is a schematic flowchart of a java multithreading-based monitoring method according to an embodiment of the present invention. As shown in fig. 2, the method includes the following steps S101 to S104.
S101, accessing the monitoring interface into the Spring class.
In the embodiment of the present invention, the monitoring interface is compiled by a user writing a monitoring code in a Spring class in a user-defined manner, and in this embodiment, the monitoring interface is implemented by a manner of aop (Aspect Oriented Programming, plane-oriented programming), so that aop refers to a programming scheme of intercepting before and after the method is executed or when an exception is thrown out by a dynamic agent manner, and the monitoring interface can be formed by writing a code of a monitoring target method in an interceptor of the dynamic agent by using aop technology.
Specifically, referring to fig. 3, the step S101 includes steps S201 to S203:
s201, declaring a section class in the Spring class, and marking the section class by using a first preset mark.
In the embodiment of the invention, a section class is declared in the Spring class through the section function provided by the Aspect J framework, and a first preset mark is used for marking the declared section class, for example, "@ Aspect" is used for marking, and the purpose of marking is to illustrate that the section class is a section class.
S202, declaring a monitoring method in the section class, and injecting a monitoring code into the monitoring method.
In the embodiment of the invention, after the section class is declared, a monitoring method is declared in the declared section class, and the code to be monitored is compiled by the monitoring method.
S203, marking the injected monitoring codes by using a second preset mark, and compiling the monitoring codes.
In the embodiment of the invention, after the monitor code is written, a second preset mark is used for marking on the monitor method, for example, "@ Around" is used for marking, and the specific format of marking by using @ Around is as follows: the method comprises the following steps of @ Around ("@ annotation) wherein the annotation name can be selected by a user, is not limited herein, and compiling the custom annotation after marking the monitoring code, so that the monitoring interface is accessed into the spring class.
S102, generating a plurality of request threads for concurrency simulation in a thread pool of the java virtual machine.
In the embodiment of the present invention, the generating a plurality of request threads for concurrency simulation in a thread pool of a java virtual machine specifically includes: generating a plurality of request threads for concurrency simulation through a Thread class of the inheritance Thread pool; alternatively, multiple request threads for concurrency modeling are generated through a Runneable interface implementing a thread pool. Specifically, multiple request threads for concurrency simulation are generated in a thread pool of the java virtual machine, and the generated multiple request threads are used for monitoring performance of the java virtual machine and acquiring various performance parameters of the java virtual machine through operation. The method for generating the request Thread in the Thread pool can be obtained by inheriting the Thread class of the Thread pool, and can also be obtained by a mode of realizing a Runneable interface of the Thread pool. The first request thread generated by the online Cheng Chizhong is used for acquiring an initial result and an initial performance parameter of the java virtual machine; when the java virtual machine needs to process a large number of tasks, more request threads are generated in the thread pool to monitor the performance of the java virtual machine.
And S103, monitoring a plurality of request threads generated in the java virtual machine by using the monitoring interface, and recording the monitoring result.
In the embodiment of the present invention, the monitoring the plurality of request threads generated in the java virtual machine by using the monitoring interface, and recording the monitoring result specifically includes: and recording the initialization performance parameters, the thread unsafe behavior information and the thread overhead information which are acquired when the request thread runs by using the monitoring interface. Specifically, a first request thread generated by the thread pool is used for acquiring an initial result and an initial performance parameter of the java virtual machine. When the java virtual machine needs to process a large number of tasks, more request threads are generated in the thread pool to monitor the performance of the java virtual machine. And recording the initialization performance parameters, the thread unsafe behavior information and the thread overhead information which are acquired when the request thread runs by using the monitoring interface.
S104, analyzing the monitoring result recorded by the monitoring interface and sending the analysis result to the user terminal.
In the embodiment of the present invention, the analyzing the monitoring result recorded by the monitoring interface and sending the analysis result to the user terminal specifically includes: and comparing the monitoring result recorded by the monitoring interface with a preset normal monitoring result, generating alarm information if the monitoring result recorded by the monitoring interface is inconsistent with the preset normal monitoring result, and sending the alarm information to a preset user terminal to inform the related user terminal.
Specifically, after the running of the concurrently simulated request thread is finished, the monitoring result of the monitoring interface needs to be analyzed. The normal monitoring results are prepared in advance for comparative analysis before analyzing the monitoring results. If the monitoring result recorded by the monitoring interface is inconsistent with the preset normal monitoring result, the thread safety problem of the monitored thread can be determined. For example: in the concurrent simulation of multiple request threads, the possible reason for stack overflow is that the recursion depth is too large, and the possible reason for response time is that the loop query is too long. Through analysis of the results and feedback to the developer, the developer can be informed of optimizing the thread with the problem through mail, automatic investigation and analysis are achieved through the monitoring interface, and the analysis results are fed back to the developer, so that a large amount of manpower can be saved, and the testing efficiency can be improved.
From the above, the embodiment of the invention accesses the monitoring interface to the Spring class; generating a plurality of request threads for concurrency simulation in a thread pool of the java virtual machine; monitoring a plurality of request threads generated in the java virtual machine by using the monitoring interface, and recording a monitoring result; analyzing the monitoring result recorded by the monitoring interface and sending the analysis result to the user terminal. According to the invention, the monitoring interface is arranged to automatically check and analyze the results of the concurrent threads, and the analysis results are fed back to the user, so that a great deal of manpower can be saved and the testing efficiency can be improved.
Referring to fig. 4, in response to the above-mentioned monitoring method based on java multithreading, an embodiment of the present invention further provides a monitoring device based on java multithreading, where the device 100 includes: an access unit 101, a generation unit 102, a monitoring and recording unit 103, and an analysis and transmission unit 104.
The access unit 101 is configured to access a monitoring interface to a Spring class; a generating unit 102, configured to generate a plurality of request threads for concurrency simulation in a thread pool of the java virtual machine; a monitoring and recording unit 103, configured to monitor a plurality of request threads generated in the java virtual machine by using the monitoring interface, and record a monitoring result; and the analysis transmitting unit 104 is configured to analyze the monitoring result recorded by the monitoring interface and transmit the analysis result to the user terminal.
Referring to fig. 5, the access unit 101 includes: a first labeling unit 101a, configured to declare a section class in the Spring class, and label the section class with a first preset label; a code injection unit 101b, configured to declare a monitoring method in the section class, and inject a monitoring code into the monitoring method; a second labeling unit 101c, configured to label the injected monitoring code with a second preset label, and compile the monitoring code.
The generating unit 102 is specifically configured to generate a plurality of request threads for concurrency simulation through a Thread class of the inheritance Thread pool; alternatively, multiple request threads for concurrency modeling are generated through a Runneable interface implementing a thread pool.
The monitoring and recording unit 103 is specifically configured to record, by using the monitoring interface, an initialization performance parameter, thread unsafe behavior information, and thread overhead information obtained when a request thread runs.
The analysis sending unit 104 is specifically configured to compare the monitoring result recorded by the monitoring interface with a preset normal monitoring result, generate alarm information if the monitoring result recorded by the monitoring interface is inconsistent with the preset normal monitoring result, and send the alarm information to the user terminal.
From the above, the embodiment of the invention accesses the monitoring interface to the Spring class; generating a plurality of request threads for concurrency simulation in a thread pool of the java virtual machine; monitoring a plurality of request threads generated in the java virtual machine by using the monitoring interface, and recording a monitoring result; analyzing the monitoring result recorded by the monitoring interface and sending the analysis result to the user terminal. According to the invention, the monitoring interface is arranged to automatically check and analyze the results of the concurrent threads, and the analysis results are fed back to the user, so that a great deal of manpower can be saved and the testing efficiency can be improved.
The java multithreading-based monitoring device corresponds to the java multithreading-based monitoring method one by one, and the specific principle and process are the same as those of the method described in the above embodiment, and are not repeated.
The java multithreading-based monitoring apparatus described above may be implemented in the form of a computer program that is executable on a computer device as shown in fig. 6.
Fig. 6 is a schematic structural diagram of a computer device according to the present invention. The device may be a terminal or a server, where the terminal may be an electronic device such as a notebook computer or a desktop computer. The server may be an independent server or a server cluster formed by a plurality of servers. With reference to FIG. 6, the computer device 500 includes a processor 502, a non-volatile storage medium 503, internal memory 504, and a network interface 505, connected by a system bus 501. The non-volatile storage medium 503 of the computer device 500 may store an operating system 5031 and a computer program 5032, where the computer program 5032, when executed, may cause the processor 502 to perform a java multithreading based monitoring method. The processor 502 of the computer device 500 is used to provide computing and control capabilities, supporting the operation of the entire computer device 500. The internal memory 504 provides an environment for the execution of a computer program 5032 in the non-volatile storage medium 503, which when executed by the processor, causes the processor 502 to perform a java multithreading-based monitoring method. The network interface 505 of the computer device 500 is for network communication. It will be appreciated by those skilled in the art that the block diagram of FIG. 6 is merely a partial structure associated with the present application and is not intended to limit the computer device to which the present application is applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
Wherein the processor 502, when executing the computer program, performs the following operations:
accessing the monitoring interface into the Spring class;
generating a plurality of request threads for concurrency simulation in a thread pool of the java virtual machine;
monitoring a plurality of request threads generated in the java virtual machine by using the monitoring interface, and recording a monitoring result;
analyzing the monitoring result recorded by the monitoring interface and sending the analysis result to the user terminal.
In one embodiment, the accessing the monitoring interface to the Spring class includes:
a section class is declared in the Spring class, and a first preset mark is used for marking on the section class;
declaring a monitoring method in the section class, and injecting a monitoring code into the monitoring method;
and marking the injected monitoring code by using a second preset mark, and compiling the monitoring code.
In one embodiment, the generating a plurality of request threads for concurrency simulation in a thread pool of a java virtual machine includes:
generating a plurality of request threads for concurrency simulation through a Thread class of the inheritance Thread pool; alternatively, multiple request threads for concurrency modeling are generated through a Runneable interface implementing a thread pool.
In one embodiment, the monitoring the plurality of request threads generated in the java virtual machine by using the monitoring interface, and recording the monitoring result, includes:
and recording the initialization performance parameters, the thread unsafe behavior information and the thread overhead information which are acquired when the request thread runs by using the monitoring interface.
In one embodiment, the analyzing the monitoring result recorded by the monitoring interface and sending the analysis result to the user terminal includes:
and comparing the monitoring result recorded by the monitoring interface with a preset normal monitoring result, generating alarm information if the monitoring result recorded by the monitoring interface is inconsistent with the preset normal monitoring result, and sending the alarm information to the user terminal.
Those skilled in the art will appreciate that the embodiment of the computer device shown in fig. 6 is not limiting of the specific construction of the computer device, and in other embodiments, the computer device may include more or less components than those shown, or certain components may be combined, or a different arrangement of components. For example, in some embodiments, the computer device includes only a memory and a processor, and in such embodiments, the structure and function of the memory and the processor are consistent with the embodiment shown in fig. 6, and will not be described again.
The present invention provides a computer readable storage medium storing one or more computer programs executable by one or more processors to implement the steps of:
accessing the monitoring interface into the Spring class;
generating a plurality of request threads for concurrency simulation in a thread pool of the java virtual machine;
monitoring a plurality of request threads generated in the java virtual machine by using the monitoring interface, and recording a monitoring result;
analyzing the monitoring result recorded by the monitoring interface and sending the analysis result to the user terminal.
In one embodiment, the accessing the monitoring interface to the Spring class includes:
a section class is declared in the Spring class, and a first preset mark is used for marking on the section class;
declaring a monitoring method in the section class, and injecting a monitoring code into the monitoring method;
and marking the injected monitoring code by using a second preset mark, and compiling the monitoring code.
In one embodiment, the generating a plurality of request threads for concurrency simulation in a thread pool of a java virtual machine includes:
generating a plurality of request threads for concurrency simulation through a Thread class of the inheritance Thread pool; alternatively, multiple request threads for concurrency modeling are generated through a Runneable interface implementing a thread pool.
In one embodiment, the monitoring the plurality of request threads generated in the java virtual machine by using the monitoring interface, and recording the monitoring result, includes:
and recording the initialization performance parameters, the thread unsafe behavior information and the thread overhead information which are acquired when the request thread runs by using the monitoring interface.
In one embodiment, the analyzing the monitoring result recorded by the monitoring interface and sending the analysis result to the user terminal includes:
and comparing the monitoring result recorded by the monitoring interface with a preset normal monitoring result, generating alarm information if the monitoring result recorded by the monitoring interface is inconsistent with the preset normal monitoring result, and sending the alarm information to the user terminal.
The aforementioned storage medium of the present invention includes: various media capable of storing program codes, such as magnetic disk, optical disk, read-Only Memory (ROM), etc.
The units in all embodiments of the invention may be implemented by general-purpose integrated circuits, such as a CPU (Central Processing Unit ), or by ASIC (Application Specific Integrated Circuit, application specific integrated circuit).
The steps in the java multithreading-based monitoring method can be sequentially adjusted, combined and deleted according to actual needs.
The units in the java multithreading-based monitoring device can be combined, divided and deleted according to actual needs.
While the invention has been described with reference to certain preferred embodiments, it will be understood by those skilled in the art that various changes and substitutions of equivalents may be made and equivalents will be apparent to those skilled in the art without departing from the scope of the invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (6)

1. The java-based multithreading monitoring method is characterized by comprising the following steps of:
a section class is declared in the Spring class, and a first preset mark is used for marking on the section class;
declaring a monitoring method in the section class, and injecting a monitoring code into the monitoring method;
marking the injected monitoring code by using a second preset mark, and compiling the monitoring code;
generating a plurality of request threads for concurrency simulation in a thread pool of the java virtual machine;
monitoring a plurality of request threads generated in the java virtual machine by using a monitoring interface, and recording monitoring results;
analyzing the monitoring result recorded by the monitoring interface and sending the analysis result to the user terminal;
the step of generating a plurality of request threads for concurrency simulation in a thread pool of the java virtual machine comprises the following steps:
generating a plurality of request threads for concurrency simulation through a Thread class of the inheritance Thread pool; or,
and generating a plurality of request threads for concurrency simulation through a Runneable interface of the thread pool, wherein a first request thread in the plurality of request threads is used for acquiring an initial result and an initial performance parameter of the java virtual machine, and the rest request threads in the plurality of request threads are used for monitoring the performance of the java virtual machine.
2. The method of claim 1, wherein monitoring the plurality of request threads generated in the java virtual machine using the monitoring interface and recording the monitoring result comprises:
and recording the initialization performance parameters, the thread unsafe behavior information and the thread overhead information which are acquired when the request thread runs by using the monitoring interface.
3. The method of claim 1, wherein analyzing the monitoring result recorded by the monitoring interface and transmitting the analysis result to the user terminal comprises:
and comparing the monitoring result recorded by the monitoring interface with a preset normal monitoring result, generating alarm information if the monitoring result recorded by the monitoring interface is inconsistent with the preset normal monitoring result, and sending the alarm information to the user terminal.
4. A java multithreading-based monitoring device, the device comprising:
the first labeling unit is used for declaring a section class in the Spring class and labeling the section class by using a first preset mark;
the code injection unit is used for declaring a monitoring method in the section class and injecting a monitoring code in the monitoring method;
the second labeling unit is used for labeling the injected monitoring codes by using a second preset mark and compiling the monitoring codes;
the generating unit is used for generating a plurality of request threads for concurrency simulation in a thread pool of the java virtual machine;
the monitoring and recording unit is used for monitoring a plurality of request threads generated in the java virtual machine by utilizing a monitoring interface and recording monitoring results;
the analysis transmitting unit is used for analyzing the monitoring result recorded by the monitoring interface and transmitting the analysis result to the user terminal;
the generating unit is specifically configured to generate a plurality of request threads for concurrency simulation through Thread class of the inheritance Thread pool; or,
and generating a plurality of request threads for concurrency simulation through a Runneable interface of the thread pool, wherein a first request thread in the plurality of request threads is used for acquiring an initial result and an initial performance parameter of the java virtual machine, and the rest request threads in the plurality of request threads are used for monitoring the performance of the java virtual machine.
5. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements a java multithreading-based monitoring method according to any of claims 1-3 when the computer program is executed.
6. A computer readable storage medium storing one or more computer programs executable by one or more processors to implement the java multithreading-based monitoring method of any of claims 1-3.
CN201911267533.5A 2019-12-11 2019-12-11 Monitoring method, device, equipment and storage medium based on java multithreading Active CN111045891B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911267533.5A CN111045891B (en) 2019-12-11 2019-12-11 Monitoring method, device, equipment and storage medium based on java multithreading

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911267533.5A CN111045891B (en) 2019-12-11 2019-12-11 Monitoring method, device, equipment and storage medium based on java multithreading

Publications (2)

Publication Number Publication Date
CN111045891A CN111045891A (en) 2020-04-21
CN111045891B true CN111045891B (en) 2024-03-19

Family

ID=70235703

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911267533.5A Active CN111045891B (en) 2019-12-11 2019-12-11 Monitoring method, device, equipment and storage medium based on java multithreading

Country Status (1)

Country Link
CN (1) CN111045891B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111813633A (en) * 2020-07-20 2020-10-23 前海人寿保险股份有限公司 Performance monitoring method, device, equipment and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103838654A (en) * 2012-11-27 2014-06-04 重庆新媒农信科技有限公司 Multithreading and concurrency testing simulator and testing method thereof
CN109284227A (en) * 2018-09-06 2019-01-29 政采云有限公司 A kind of automation method for testing pressure and device calculate equipment and storage medium
CN109766241A (en) * 2018-12-29 2019-05-17 中国银行股份有限公司 System monitoring method, apparatus, computer equipment and computer readable storage medium
CN110290212A (en) * 2019-06-28 2019-09-27 浙江大搜车软件技术有限公司 Service call recording method, device, computer equipment and storage medium
CN110445669A (en) * 2019-06-26 2019-11-12 苏州浪潮智能科技有限公司 A kind of monitoring method, equipment and the readable medium of the server based on association's journey

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8813035B2 (en) * 2012-02-29 2014-08-19 International Business Machines Corporation Paradigm for concurrency testcase generation
US10997048B2 (en) * 2016-12-30 2021-05-04 Intel Corporation Apparatus and method for multithreading-aware performance monitoring events

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103838654A (en) * 2012-11-27 2014-06-04 重庆新媒农信科技有限公司 Multithreading and concurrency testing simulator and testing method thereof
CN109284227A (en) * 2018-09-06 2019-01-29 政采云有限公司 A kind of automation method for testing pressure and device calculate equipment and storage medium
CN109766241A (en) * 2018-12-29 2019-05-17 中国银行股份有限公司 System monitoring method, apparatus, computer equipment and computer readable storage medium
CN110445669A (en) * 2019-06-26 2019-11-12 苏州浪潮智能科技有限公司 A kind of monitoring method, equipment and the readable medium of the server based on association's journey
CN110290212A (en) * 2019-06-28 2019-09-27 浙江大搜车软件技术有限公司 Service call recording method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN111045891A (en) 2020-04-21

Similar Documents

Publication Publication Date Title
US8938729B2 (en) Two pass automated application instrumentation
US9465718B2 (en) Filter generation for load testing managed environments
US8719784B2 (en) Assigning runtime artifacts to software components
US20090287729A1 (en) Source code coverage testing
US20050223048A1 (en) System and methods for cross-tier transaction tracing
EP2386955A1 (en) Detection of method calls to streamline diagnosis of custom code through dynamic instrumentation
CN106325970A (en) Compiling method and compiling system
US20050223367A1 (en) System and methods for instrumenting applications
US10860465B2 (en) Automatically rerunning test executions
US8918762B2 (en) Generating test plans and test cases from service-oriented architecture and process models
US20060129880A1 (en) Method and system for injecting faults into a software application
US20150106348A1 (en) Monitoring business transaction failures involving database procedure calls
US8151251B2 (en) e-Profiler: dynamic profiling and auditing framework
Panigrahi et al. An approach to prioritize the regression test cases of object-oriented programs
US7783927B2 (en) Intelligent processing tools
EP3514680B1 (en) Identification of changes in functional behavior and runtime behavior of a system during maintenance cycles
US20080244324A1 (en) Method and system for providing enhanced exception messages for exceptions thrown by virtual machines
CN111045891B (en) Monitoring method, device, equipment and storage medium based on java multithreading
US20130318499A1 (en) Test script generation
Yeboah-Antwi et al. Online Genetic Improvement on the java virtual machine with ECSELR
CN111625225A (en) Program specified data output method and device
US9436575B2 (en) Selective profiling of applications
CN114840418A (en) Fuzzy test method and device
Di Ruscio et al. A model‐driven approach to detect faults in FOSS systems
US20030105958A1 (en) Command script instrumentation for logging command execution and the protection of sensitive information

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