CN109359019A - Application program capacity monitoring method, device, electronic equipment and storage medium - Google Patents

Application program capacity monitoring method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN109359019A
CN109359019A CN201810929554.8A CN201810929554A CN109359019A CN 109359019 A CN109359019 A CN 109359019A CN 201810929554 A CN201810929554 A CN 201810929554A CN 109359019 A CN109359019 A CN 109359019A
Authority
CN
China
Prior art keywords
application program
server
monitored object
electronic equipment
data
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.)
Pending
Application number
CN201810929554.8A
Other languages
Chinese (zh)
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.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China 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 Ping An Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN201810929554.8A priority Critical patent/CN109359019A/en
Publication of CN109359019A publication Critical patent/CN109359019A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging

Landscapes

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

Abstract

A kind of application program capacity monitoring method, comprising: the communication channel that server is established and is equipped between the electronic equipment of monitored object;The server receives the test request that monitored object is sent, wherein the monitored object is application program;The performance parameter of monitored object described in the collection of server;Performance parameter described in the server analysis;And the server shows that analysis result is for reference.The present invention also provides a kind of application program capacity monitoring device, electronic equipment and storage mediums.The present invention can monitor and analyze the performance of application program, ensure information safety.

Description

Application program capacity monitoring method, device, electronic equipment and storage medium
Technical field
The present invention relates to fields of communication technology, and in particular to a kind of application program capacity monitoring method, device, electronic equipment And storage medium.
Background technique
Itself monitoring function that software systems provide allows user to understand its operation shape more comprehensively, in more detail Condition.The data returned by monitoring system, user not only will be seen that the current monitored condition of system, it might even be possible in certain journey The next health status of forecasting software on degree.Such as when monitoring data show what although current system was up, Its response time is becoming slower and slower, then we can predict that final system can not may make a response in time.I Can be before thing becomes even worse, lookup is gone wrong, and is solved the problems, such as in time to avoid loss.
In the prior art, user will use software tool to measure the performance of application program.For example, application program capacity is supervised Control the other elements of (APM), network performance management (NPM), server performance management, storage performance management and data center.But It is that these software tools there are problems that a series of being difficult to overcome.For example, APM is that user experience and application program provide for enterprise Service quality an important indicator.But traditional APM tool is dispersed in everywhere in data center, possibly can not be managed for enterprise Reason person provide needed for them it is to be understood that available information.And software tool in the prior art exist directly with monitored object In conjunction with, the degree of coupling is higher, not enough independently, the not comprehensive enough problem of function.Existing tool uses not convenient enough simultaneously.No Enough real-time, the help for being given to exploitation and test is not big enough.
Summary of the invention
In view of the foregoing, it is necessary to propose that a kind of application program capacity monitoring method, device, electronic equipment and storage are situated between Matter can monitor and analyze the performance of application program.
The first aspect of the present invention provides a kind of application program capacity monitoring method, which comprises
The communication channel that server is established and is equipped between the electronic equipment of monitored object;
The server receives the test request that monitored object is sent, wherein the monitored object is application program;
The performance parameter of monitored object described in the collection of server;
Performance parameter described in the server analysis;And
The server display analysis result is for reference.
Preferably, the step of server analysis performance parameter includes:
Data pick-up is carried out to the performance parameter, generates data sequence;
Each data in the data sequence are compared with the target capabilities parameter prestored respectively.
Preferably, the server establish and be equipped between the electronic equipment of monitored object communication channel the step of Include:
The server establishes the network control channel between electronic equipment;
The server receives the test request that the electronic equipment is sent;And
The server returns to the port numbers of test channel to the electronic equipment according to the test request, wherein institute It states electronic equipment and establishes test channel on the port of return.
Preferably, the extraction to the performance parameter is realized using SAT data pick-up model.
Preferably, server display analysis result step for reference includes: by showing on a user interface Show the form of suspended window to show the performance parameter after visable representation.
Preferably, the suspended window also carries out statistics to the collapse type of the object that is monitored and attribute qualifier uses Correctness is prompted.
Preferably, the server by utilizing Cocoapods manages third party's open source library of the monitored object.
The second aspect of the present invention provides a kind of application program capacity monitoring device, and described device includes:
Module is established, the communication channel for establishing between server and the electronic equipment for being equipped with monitored object;
Receiving module, the test request sent for receiving monitored object by the communication channel, wherein the quilt Monitored object is application program;
Acquisition module, for acquiring the performance parameter of the monitored object;
Analysis module, for analyzing the performance parameter;And
Display module, for showing that analysis result is for reference.
The third aspect of the present invention provides a kind of electronic equipment, and the electronic equipment includes processor and memory, described Processor is for realizing the application program capacity monitoring method when executing the computer program stored in the memory.
The fourth aspect of the present invention provides a kind of computer readable storage medium, deposits on the computer readable storage medium Computer program is contained, the computer program realizes the application program capacity monitoring method when being executed by processor.
Application program capacity monitoring method, device, electronic equipment and storage medium of the present invention, can receive and be supervised Control the test request that object is sent, wherein the monitored object is application program;Acquire the performance ginseng of the monitored object Number;Analyze the performance parameter;And display analysis result is for reference.It can monitor and analyze the performance of application program. The present invention can also be easy to use independently of third party software (application program) platform simultaneously, and more fully monitoring third party is soft The various performance measurement datas of part give the opinion in terms of improving the third party software application performance.The present invention is integrated Simply, while data feedback can be easily seen in exploitation and test process.Facilitate software engineer in the process of development It finds the problem, finds the problem in time when also facilitating Test Engineer's test data.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of invention for those of ordinary skill in the art without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
Fig. 1 is the flow chart for the application program capacity monitoring method that the embodiment of the present invention one provides.
Fig. 2 is the refined flow chart of step S3 in the application program capacity monitoring method of the offer of the embodiment of the present invention one.
Fig. 3 is the functional block diagram of application program capacity monitoring device provided by Embodiment 2 of the present invention.
Fig. 4 is the schematic diagram for the electronic equipment that the embodiment of the present invention three provides.
The present invention that the following detailed description will be further explained with reference to the above drawings.
Specific embodiment
To better understand the objects, features and advantages of the present invention, with reference to the accompanying drawing and specific real Applying example, the present invention will be described in detail.It should be noted that in the absence of conflict, the embodiment of the present invention and embodiment In feature can be combined with each other.
In the following description, numerous specific details are set forth in order to facilitate a full understanding of the present invention, described embodiment is only It is only a part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill Personnel's every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
Unless otherwise defined, all technical and scientific terms used herein and belong to technical field of the invention The normally understood meaning of technical staff is identical.Term as used herein in the specification of the present invention is intended merely to description tool The purpose of the embodiment of body, it is not intended that in the limitation present invention.
Description and claims of this specification and term " first " in above-mentioned attached drawing, " second " and " third " etc. are For distinguishing different objects, not for description particular order.In addition, term " includes " and their any deformations, it is intended that Non-exclusive include in covering.Such as the process, method, system, product or equipment for containing a series of steps or units do not have It is defined in listed step or unit, but optionally further comprising the step of not listing or unit, or optionally further comprising For the intrinsic other step or units of these process, methods, product or equipment.
The application program capacity monitoring method of the embodiment of the present invention is applied in one or more electronic equipment.It is described What application program capacity monitoring method also can be applied to be attached by electronic equipment and by network and the electronic equipment In the hardware environment that server is constituted.Network includes but is not limited to: wide area network, Metropolitan Area Network (MAN) or local area network.The embodiment of the present invention Application program capacity monitoring method can be executed by server, can also be executed by electronic equipment;It can also be by taking Business device and electronic equipment execute jointly.
The electronic equipment for needing to carry out application program capacity monitoring method, can directly collect on an electronic device At application program capacity monitoring function provided by method of the invention, or installation is for realizing the client of method of the invention End.For another example, method provided by the present invention can also with Software Development Kit (Software Development Kit, SDK form) operates in the equipment such as server, and the interface of application program capacity monitoring function, electronics are provided in the form of SDK The monitoring to application program capacity can be realized by the interface provided in equipment or other equipment.
Embodiment one
Fig. 1 is the flow chart for the application program capacity monitoring method that the embodiment of the present invention one provides.According to different requirements, Execution sequence in the flow chart can change, and certain steps can be omitted.
Step S1 receives the test request that monitored object is sent.
For example, receiving monitored object (such as golden house keeper App) hair when needing to monitor the network performance of monitored object The network request risen.Herein, it should be noted that the test request is not limited to network request, it can also be that starting operation is asked It asks.
Step S2 acquires the performance parameter of the monitored object.
In the present embodiment, the monitored object is application program, for example, golden house keeper, safety pocket bank etc..Institute Application program is stated to be installed in electronic equipment.
The performance parameter includes: system parameter, resource parameters and workload parameters.
The system parameter includes the load balance at mirroring service end, maximum thread of data base management system support etc.. The resource parameters include passing disk tracking time, transmission rate, network bandwidth, routing delay and cpu clock frequency etc..The work It include every daily visit of proxy server, the request number per second for submitting to file server and per second as load parameter It is submitted to the transactions etc. of database server.
Preferably, the performance parameter further includes network data.The network data includes the success rate of network request, shape State code, flow, network response time, HTTP and the dns resolution of HTTPS, TCP shake hands, SSL shakes hands (except HTTP), when first packet Between, SSL time, the data such as HTTP error rate and network error rate.
In the present embodiment, the method for acquiring the performance parameter includes: sampling method and event tracking method.
The sampling method is to be recorded according to certain using performance parameter of the period to monitored object.It is understood that , in order to obtain the performance change of monitored object, according to sampling thheorem, sample frequency is at least useful signal highest Two times of frequency.A large amount of performance parameter, if sample frequency is sufficiently large, root will be generated when application program runing time is longer According to collected performance parameter can accurately reconfiguring application performance change situation.
The event tracking method refers to by the specific events trigger follow-up mechanism in the monitored object, to record event Performance parameter when generation.Event tracking method only has recorded critical event in monitored object and occurs and moment and relevant performance Parameter, data volume is less than data volume acquired in sampling method.Since the event tracking method only has recorded the particular event The behavior pattern that the moment occurs, to the performance and its other events that do not consider under normal circumstances (when no particular event occurs) The image of the performance of the object that is monitored can not be recorded, therefore, performance of the event tracking method to the monitored object The precision of description is lower than sampling method.
The event tracking can be using binary code insertion, source code modification and the monitored object chained library of change etc. Multiple technologies are realized.Sampling method records system performance parameter with the fixed period by hardware clock, does not need to correspond to It is modified with program code.And event tracking method is suitable for software realization since the event type tracked is more.Therefore, exist In the present solution, can be acquired simultaneously using two methods to different performance parameters.
In the present embodiment, when the test request is network request, the monitored object is according to the network Request carries out networking operation, acquires the network parameter of the monitored object carried out when networking operates.
In the prior art, general that network is realized by NSURLProtocol and code injection (Hook) both modes Monitoring is to obtain the network parameter.Since NSURLProtocol belongs to URL Loading System system, the system application The protocol finite that layer is supported only supports several application layer protocols such as FTP, HTTP and HTTPS, for using the flow of other agreements It is then helpless, so having some limitations.
Therefore, this programme realizes network monitoring by the way of code injection (Hook).Realize that the mode of Hook has three Kind: Method Swizzling, NSProxy and Fishhook.The above two are suitable for the library that Objective-C is realized, such as NSURLConnection and NSURLSession;Fishhook is then suitable for the library of C language realization, such as CFNetwork.
Preferably, this programme realizes Fishhook to carry out network monitoring using CFNetwork.CFNetwork is logical It crosses using proxy mode and realizes network monitoring.It specifically, is in CoreFoundation Framework CFStream realizes a Proxy Stream to achieve the purpose that interception, records the network parameter read by CFStream Then length relays to Original Stream.
Specifically, the CFNetwork realizes that method of the Fishhook to carry out network monitoring includes:
Design one is inherited from NSObject and holds the Proxy class of NSInputStream object;
The NSInputStream held is denoted as OriginalStream;
All message for being sent to Proxy are transmitted to OriginalStream processing;
Rewrite the read:maxLength of NSInputStream.
The size of http stream in available network parameter through the above scheme.
It is understood that in other embodiments, the network parameter can also be obtained using web crawlers technology.
Step S3 analyzes the performance parameter.
Step S4, display analysis result are for reference.
In the present embodiment, the form of suspended window can be shown on a user interface to show the property after visable representation It can parameter.
Further, the suspended window can not only show data monitoring as a result, the object that can also be monitored to this collapses (crash) type of bursting is counted and attribute qualifier is prompted using correctness.
For example, weak and strong modifier respectively indicates weak reference type and strongly reference type.If the weak modification Symbol has modified strongly reference type, then prompts user in the form of eye-catchingization (being such as highlighted weak modifier) in the suspended window Qualifier uses mistake, and prompts user that need to select strong modifier.
Preferably, before executing above method, further include the steps that establishing the communication channel that measurement needs.
For example, being equipped with the electronic equipment of the monitored object when needing to monitor the network performance of monitored object Need to establish the communication channel for carrying out performance measurement between server.Establishing communication channel is the base for carrying out network performance measurement Plinth, the electronic equipment described first is by establishing network control channel between browser or order line and server.Then, described Electronic equipment sends test request and target capabilities parameter to server, and test channel is returned after the verifying of server end Port numbers.Finally, the electronic equipment establishes test channel on the port that server end returns.
Fig. 2 is the refined flow chart of the step S3 preferred embodiment in Fig. 1, is walked in the flow chart according to different requirements, Rapid sequence can change, and certain steps can be omitted.
Step S31 carries out data pick-up to the performance parameter, generates data sequence;
In the present embodiment, the extraction to the performance parameter is realized using SAT data pick-up model.
The SAT model is mainly abstracted as three logical layers: S layers are Interval data layers, are responsible for the separation of data, that is, The distributed treatment of data;The analysis of A layers of load data;The processing integration and data conversion packaging of T layers of completion data.
SAT model algorithm process:
1) S layers
The pretreatment and input of data, carry out chaos processing to the performance parameter of acquisition first, and preliminary generation is defeated with model The similar chaos data of data out;Secondly the type selecting range of data is increased to controllable value model using data search algorithm In enclosing, reach the complicated type selecting of data to evade the differentiation of data type selecting.
2) A layers
The analysis of data.Data are carried out when SAT module center is handled according to the chaos data of pretreatment final finishing Analysis, and noise reduction process first is carried out to data when being handled.
The feature extraction of data carries out corresponding feature extraction to test data according to the method that data extract feature, mentions It takes repeated and redundant data and does not repeat Non-redundant data.
3) T layers
There are fuzzy mapping relations between the data crossed due to A layer analysis, extract using data model available The data sequence of cluster.The data module can be Map-Reduce model.
It preferably, further include that statistical is carried out to the performance parameter before carrying out data pick-up to the performance parameter Analysis.
The statistical analysis technique includes: collect statistics, Threshold Analysis, baseline value analysis, weight factor analysis and measurement Association etc. between index.Above-mentioned statistical analysis technique is the prior art, and details are not described herein.
Each data in the data sequence are compared with the target capabilities parameter prestored step S32 respectively.
In the present embodiment, the target capabilities parameter can be a parameter value determined, can also be a parameter value Range.For example, the target capabilities parameter includes: data rate and two-way time, generally it is defaulted as being suitble to most of networks Performance parameter (100Mbps and 20ms).
When the target capabilities parameter is the parameter value of the determination, by comparing each number in the data sequence According to whether unanimously whether normal come the object that judges to be monitored with corresponding target capabilities parameter respectively.For example, working as the data sequence When each data in column are consistent with corresponding target capabilities parameter respectively, illustrate that the monitored object is normal;When the number When according to data a certain in sequence and inconsistent corresponding target capabilities parameter, illustrate that the monitored object is abnormal.
When the target capabilities parameter is the range of parameter values, by comparing each data in the data sequence Whether fall in corresponding target capabilities range of parameter values and judges whether monitored object is normal.For example, working as the data sequence When each data in column are all fallen in corresponding target capabilities range of parameter values, illustrate that the monitored object is normal;Work as number When not falling in corresponding target capabilities range of parameter values according to a certain data in sequence, illustrate that the monitored object is different Often.
The data sequence after comparison is carried out visable representation by step S33.
For example, the data sequence is mapped on specific view.For the same data sequence, can use Different representations.For example, statistical data can be used the form of histogram, line chart, pie chart or table;For aobvious The state that animation form represents each moment can be used in the data for showing evolution process, can also use using the time as horizontal axis Function curve indicate.
In the present embodiment, the third party's open source library for the object that is monitored in this programme is managed using Cocoapods.Make After CocoaPods, it is only necessary to which third party's open source library of the monitored object is put into the file of an entitled Podfile In, then execute pod install.CocoaPods will automatically download the source code in third party open source library, and It sets corresponding system and relies on and compile parameter.In this way, the performance monitoring scheme can be made independently of the monitored object, Multiple monitored objects can also be accessed simultaneously.
In conclusion application program capacity monitoring method provided by the invention, can receive the survey that monitored object is sent Examination request, wherein the monitored object is application program;When the monitored object executes the test request, acquisition The performance parameter of the monitored object;Analyze the performance parameter;And display analysis result is for reference.It can monitor With the performance of analysis application program.The present invention can also be easy to use independently of third party software (application program) platform simultaneously, The various performance measurement datas for more fully monitoring third party software, give and improve the third party software application performance side The opinion in face.The present invention is integrated simple, while can easily see data feedback in exploitation and test process.Facilitate software Engineer finds the problem in the process of development, finds the problem in time when also facilitating Test Engineer's test data.
The above is only a specific embodiment of the invention, but scope of protection of the present invention is not limited thereto, for For those skilled in the art, without departing from the concept of the premise of the invention, improvement, but these can also be made It all belongs to the scope of protection of the present invention.
Below with reference to the 3rd to 4 figure, respectively to the function mould of the electronic equipment of the above-mentioned application program capacity monitoring method of realization Block and hardware configuration are introduced.
Embodiment two
Fig. 3 is the functional block diagram in application program capacity monitoring device preferred embodiment of the present invention.
In some embodiments, the application program capacity monitoring device 20 (hereinafter referred to as " performance monitoring apparatus 20 ") It runs in electronic equipment.The performance monitoring apparatus 20 may include multiple functional modules as composed by program code segments. The program code of each program segment in the performance monitoring apparatus 20 can store in memory, and by least one processing Performed by device, with the performance monitoring of execution (being detailed in Fig. 1 and its associated description) application program.
In the present embodiment, function of the performance monitoring apparatus 20 of the electronic equipment according to performed by it can be divided For multiple functional modules.The functional module may include: to establish module 201, receiving module 202, acquisition module 203, analysis Module 204 and display module 205.The so-called module of the present invention refers to that one kind can be performed by least one processor and energy The series of computation machine program segment of fixed function is enough completed, storage is in memory.In some embodiments, about each module Function will be described in detail in subsequent embodiment.
Module 201 is established, the communication channel for establishing between server and the electronic equipment for being equipped with monitored object.
For example, being equipped with the electronic equipment of the monitored object when needing to monitor the network performance of monitored object Need to establish the communication channel for carrying out performance measurement between server.Establishing communication channel is the base for carrying out network performance measurement Plinth, the electronic equipment described first is by establishing network control channel between browser or order line and server.Then, described Electronic equipment sends test request and target capabilities parameter to server, and test channel is returned after the verifying of server end Port numbers.Finally, the electronic equipment establishes test channel on the port that server end returns.
Receiving module 202, the test request sent for receiving monitored object.
For example, receiving monitored object (such as golden house keeper App) hair when needing to monitor the network performance of monitored object The network request and target capabilities parameter risen.The target capabilities parameter includes: data rate and two-way time, is generally defaulted as It is suitble to the performance parameter (100Mbps and 20ms) of most of networks.Herein, it should be noted that the test request is not limited to Network request can also be starting operation request.
Acquisition module 203, for acquiring the performance parameter of the monitored object.
In the present embodiment, the monitored object is application program, for example, golden house keeper, safety pocket bank etc..Institute Application program is stated to be installed in electronic equipment.
The performance parameter includes: system parameter, resource parameters and workload parameters.
The system parameter includes the load balance at mirroring service end, maximum thread of data base management system support etc.. The resource parameters include passing disk tracking time, transmission rate, network bandwidth, routing delay and cpu clock frequency etc..The work It include every daily visit of proxy server, the request number per second for submitting to file server and per second as load parameter It is submitted to the transactions etc. of database server.
Preferably, the performance parameter further includes network data.The network data includes the success rate of network request, shape State code, flow, network response time, HTTP and the dns resolution of HTTPS, TCP shake hands, SSL shakes hands (except HTTP), when first packet Between, SSL time, the data such as HTTP error rate and network error rate.
In the present embodiment, the method for acquiring the performance parameter includes: sampling method and event tracking method.
The sampling method is to be recorded according to certain using performance parameter of the period to monitored object.It is understood that , in order to obtain the performance change of monitored object, according to sampling thheorem, sample frequency is at least useful signal highest Two times of frequency.A large amount of performance parameter, if sample frequency is sufficiently large, root will be generated when application program runing time is longer According to collected performance parameter can accurately reconfiguring application performance change situation.
The event tracking method refers to by the specific events trigger follow-up mechanism in the monitored object, to record event Performance parameter when generation.Event tracking method only has recorded critical event in monitored object and occurs and moment and relevant performance Parameter, data volume is less than data volume acquired in sampling method.Since the event tracking method only has recorded the particular event The behavior pattern that the moment occurs, to the performance and its other events that do not consider under normal circumstances (when no particular event occurs) The image of the performance of the object that is monitored can not be recorded, therefore, performance of the event tracking method to the monitored object The precision of description is lower than sampling method.
The event tracking can be using binary code insertion, source code modification and the monitored object chained library of change etc. Multiple technologies are realized.Sampling method records system performance parameter with the fixed period by hardware clock, does not need to correspond to It is modified with program code.And event tracking method is suitable for software realization since the event type tracked is more.Therefore, exist In the present solution, can be acquired simultaneously using two methods to different performance parameters.
In the present embodiment, when the test request is network request, the monitored object is according to the network Request carries out networking operation, acquires the network parameter of the monitored object carried out when networking operates.
In the prior art, general that network is realized by NSURLProtocol and code injection (Hook) both modes Monitoring is to obtain the network parameter.Since NSURLProtocol belongs to URL Loading System system, the system application The protocol finite that layer is supported only supports several application layer protocols such as FTP, HTTP and HTTPS, for using the flow of other agreements It is then helpless, so having some limitations.
Therefore, this programme realizes network monitoring by the way of code injection (Hook).Realize that the mode of Hook has three Kind: Method Swizzling, NSProxy and Fishhook.The above two are suitable for the library that Objective-C is realized, such as NSURLConnection and NSURLSession;Fishhook is then suitable for the library of C language realization, such as CFNetwork.
Preferably, this programme realizes Fishhook to carry out network monitoring using CFNetwork.CFNetwork is logical It crosses using proxy mode and realizes network monitoring.It specifically, is in CoreFoundation Framework CFStream realizes a Proxy Stream to achieve the purpose that interception, records the network parameter read by CFStream Then length relays to Original Stream.
Specifically, the CFNetwork realizes that method of the Fishhook to carry out network monitoring includes:
Design one is inherited from NSObject and holds the Proxy class of NSInputStream object;
The NSInputStream held is denoted as OriginalStream;
All message for being sent to Proxy are transmitted to OriginalStream processing;
Rewrite the read:maxLength of NSInputStream.
The size of http stream in available network parameter through the above scheme.
It is understood that in other embodiments, the network parameter can also be obtained using web crawlers technology.
Analysis module 205, for analyzing the performance parameter.
The analysis module 205 includes carrying out data pick-up to the performance parameter, generates data sequence;By the data Each data in sequence are compared with target capabilities parameter respectively;The data sequence after comparison is subjected to visualization table Show.
In the present embodiment, the extraction to the performance parameter is realized using SAT data pick-up model.
The SAT model is mainly abstracted as three logical layers: S layers are Interval data layers, are responsible for the separation of data, that is, The distributed treatment of data;The analysis of A layers of load data;The processing integration and data conversion packaging of T layers of completion data.
SAT model algorithm process:
1) S layers
The pretreatment and input of data, carry out chaos processing to the performance parameter of acquisition first, and preliminary generation is defeated with model The similar chaos data of data out;Secondly the type selecting range of data is increased to controllable value model using data search algorithm In enclosing, reach the complicated type selecting of data to evade the differentiation of data type selecting.
2) A layers
The analysis of data.Data are carried out when SAT module center is handled according to the chaos data of pretreatment final finishing Analysis, and noise reduction process first is carried out to data when being handled.
The feature extraction of data carries out corresponding feature extraction to test data according to the method that data extract feature, mentions It takes repeated and redundant data and does not repeat Non-redundant data.
3) T layers
There are fuzzy mapping relations between the data crossed due to A layer analysis, extract using data model available The data sequence of cluster.The data module can be Map-Reduce model.
It preferably, further include that statistical is carried out to the performance parameter before carrying out data pick-up to the performance parameter Analysis.
The statistical analysis technique includes: collect statistics, Threshold Analysis, baseline value analysis, weight factor analysis and measurement Association etc. between index.Above-mentioned statistical analysis technique is the prior art, and details are not described herein.
In the present embodiment, the target capabilities parameter can be a parameter value determined, can also be a parameter value Range.For example, the target capabilities parameter includes: data rate and two-way time, generally it is defaulted as being suitble to most of networks Performance parameter (100Mbps and 20ms).
When the target capabilities parameter is the parameter value of the determination, by comparing each number in the data sequence According to whether unanimously whether normal come the object that judges to be monitored with corresponding target capabilities parameter respectively.For example, working as the data sequence When each data in column are consistent with corresponding target capabilities parameter respectively, illustrate that the monitored object is normal;When the number When according to data a certain in sequence and inconsistent corresponding target capabilities parameter, illustrate that the monitored object is abnormal.
When the target capabilities parameter is the range of parameter values, by comparing each data in the data sequence Whether fall in corresponding target capabilities range of parameter values and judges whether monitored object is normal.For example, working as the data sequence When each data in column are all fallen in corresponding target capabilities range of parameter values, illustrate that the monitored object is normal;Work as number When not falling in corresponding target capabilities range of parameter values according to a certain data in sequence, illustrate that the monitored object is different Often.
In the present embodiment, the data sequence after comparison can be mapped on specific view.For The same data sequence can use different representations.For example, for statistical data can be used histogram, line chart, The form of pie chart or table;For the data of display evolution process, the state that animation form represents each moment can be used, Can also use using the time as the function curve of horizontal axis indicates.
Display module 205, for showing that analysis result is for reference.
In the present embodiment, the form of suspended window can be shown on a user interface to show the property after visable representation It can parameter.
Further, the suspended window can not only show data monitoring as a result, the object that can also be monitored to this collapses (crash) type of bursting is counted and attribute qualifier is prompted using correctness.
For example, weak and strong modifier respectively indicates weak reference type and strongly reference type.If the weak modification Symbol has modified strongly reference type, then prompts user in the form of eye-catchingization (being such as highlighted weak modifier) in the suspended window Qualifier uses mistake, and prompts user that need to select strong modifier.
In the present embodiment, the third party's open source library for the object that is monitored in this programme is managed using Cocoapods.Make After CocoaPods, it is only necessary to which third party's open source library of the monitored object is put into the file of an entitled Podfile In, then execute pod install.CocoaPods will automatically download the source code in third party open source library, and It sets corresponding system and relies on and compile parameter.In this way, the performance monitoring scheme can be made independently of the monitored object, Multiple monitored objects can also be accessed simultaneously.
In conclusion device 20 of the present invention, can receive the test request that monitored object is sent, wherein institute Stating monitored object is application program;When the monitored object executes the test request, the monitored object is acquired Performance parameter;Analyze the performance parameter;And display analysis result is for reference.It can monitor and analyze application program Performance.The present invention can also be easy to use independently of third party software (application program) platform simultaneously, more fully monitoring the The various performance measurement datas of software of the third party give the opinion in terms of improving the third party software application performance.This hair It is bright integrated simple, while data feedback can be easily seen in exploitation and test process.Facilitate software engineer developing It finds the problem, finds the problem in time when also facilitating Test Engineer's test data in the process.
The above-mentioned integrated unit realized in the form of software function module, can store and computer-readable deposit at one In storage media.Above-mentioned software function module is stored in a storage medium, including some instructions are used so that a computer It is each that equipment (can be personal computer, double screen equipment or the network equipment etc.) or processor (processor) execute the present invention The part of a embodiment the method.
Embodiment three
Fig. 4 is the schematic diagram for the electronic equipment that the embodiment of the present invention three provides.
The electronic equipment 3 includes: memory 31, at least one processor 32, is stored in the memory 31 and can The computer program 33 and at least one communication bus 34 run at least one described processor 32.
At least one described processor 32 realizes above-mentioned application program capacity monitoring side when executing the computer program 33 Step in method embodiment.
Illustratively, the computer program 33 can be divided into one or more module/units, it is one or Multiple module/units are stored in the memory 31, and are executed by least one described processor 32, to complete this hair It is bright.One or more of module/units can be the series of computation machine program instruction section that can complete specific function, this refers to Enable section for describing implementation procedure of the computer program 33 in the electronic equipment 3.
The electronic equipment 3 can be mobile phone, tablet computer, personal digital assistant (Personal Digital Assistant, PDA) etc. application program is installed equipment.It will be understood by those skilled in the art that the schematic diagram 3 is only The example of electronic equipment 3 does not constitute the restriction to electronic equipment 3, may include components more more or fewer than diagram, or Certain components or different components are combined, such as the electronic equipment 3 can also include input-output equipment, network insertion Equipment, bus etc..
At least one described processor 32 can be central processing unit (Central Processing Unit, CPU), It can also be other general processors, digital signal processor (Digital Signal Processor, DSP), dedicated integrated Circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field- Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..The processor 32 can be microprocessor or the processor 32 is also possible to any conventional processor Deng the processor 32 is the control centre of the electronic equipment 3, utilizes various interfaces and the entire electronic equipment 3 of connection Various pieces.
The memory 31 can be used for storing the computer program 33 and/or module/unit, and the processor 32 passes through Operation executes the computer program and/or module/unit being stored in the memory 31, and calls and be stored in memory Data in 31 realize the various functions of the electronic equipment 3.The memory 31 can mainly include storing program area and storage Data field, wherein storing program area can application program needed for storage program area, at least one function (for example sound plays Function, image player function etc.) etc.;Storage data area, which can be stored, uses created data (such as sound according to electronic equipment 3 Frequency evidence, phone directory etc.) etc..In addition, memory 31 may include high-speed random access memory, it can also include non-volatile Memory, such as hard disk, memory, plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card), at least one disk memory, flush memory device or other Volatile solid-state part.
If the integrated module/unit of the electronic equipment 3 is realized in the form of SFU software functional unit and as independent Product when selling or using, can store in a computer readable storage medium.Based on this understanding, the present invention is real All or part of the process in existing above-described embodiment method, can also instruct relevant hardware come complete by computer program At the computer program can be stored in a computer readable storage medium, which is being executed by processor When, it can be achieved that the step of above-mentioned each embodiment of the method.Wherein, the computer program includes computer program code, described Computer program code can be source code form, object identification code form, executable file or certain intermediate forms etc..The meter Calculation machine readable medium may include: can carry the computer program code any entity or device, recording medium, USB flash disk, Mobile hard disk, magnetic disk, CD, computer storage, read-only memory (ROM, Read-Only Memory), random access memory Device (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It needs to illustrate It is that the content that the computer-readable medium includes can be fitted according to the requirement made laws in jurisdiction with patent practice When increase and decrease, such as in certain jurisdictions, according to legislation and patent practice, computer-readable medium does not include electric carrier wave letter Number and telecommunication signal.
In several embodiments provided by the present invention, it should be understood that disclosed electronic equipment and method, Ke Yitong Other modes are crossed to realize.For example, electronic equipment embodiment described above is only schematical, for example, the unit Division, only a kind of logical function partition, there may be another division manner in actual implementation.
It, can also be in addition, each functional unit in each embodiment of the present invention can integrate in same treatment unit It is that each unit physically exists alone, can also be integrated in same unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of hardware adds software function module.
It is obvious to a person skilled in the art that invention is not limited to the details of the above exemplary embodiments, Er Qie In the case where without departing substantially from spirit or essential attributes of the invention, the present invention can be realized in other specific forms.Therefore, no matter From the point of view of which point, the present embodiments are to be considered as illustrative and not restrictive, and the scope of the present invention is by appended power Benefit requires rather than above description limits, it is intended that all by what is fallen within the meaning and scope of the equivalent elements of the claims Variation is included in the present invention.Any reference signs in the claims should not be construed as limiting the involved claims.This Outside, it is clear that one word of " comprising " is not excluded for other units or, odd number is not excluded for plural number.The multiple units stated in system claims Or device can also be implemented through software or hardware by a unit or device.The first, the second equal words are used to indicate name Claim, and does not indicate any particular order.
Finally it should be noted that the above examples are only used to illustrate the technical scheme of the present invention and are not limiting, although reference Preferred embodiment describes the invention in detail, those skilled in the art should understand that, it can be to of the invention Technical solution is modified or equivalent replacement, without departing from the spirit of the technical scheme of the invention range.

Claims (10)

1. a kind of application program capacity monitoring method, which is characterized in that the described method includes:
The communication channel that server is established and is equipped between the electronic equipment of monitored object;
The server receives the test request that monitored object is sent, wherein the monitored object is application program;
The performance parameter of monitored object described in the collection of server;
Performance parameter described in the server analysis;And
The server display analysis result is for reference.
2. application program capacity monitoring method as described in claim 1, which is characterized in that the server analysis performance parameter The step of include:
Data pick-up is carried out to the performance parameter, generates data sequence;
Each data in the data sequence are compared with the target capabilities parameter prestored respectively.
3. application program capacity monitoring method as described in claim 1, which is characterized in that the server is established and is equipped with The step of communication channel between the electronic equipment of monitored object includes:
The server establishes the network control channel between electronic equipment;
The server receives the test request that the electronic equipment is sent;And
The server returns to the port numbers of test channel to the electronic equipment according to the test request, wherein the electricity Sub- equipment establishes test channel on the port of return.
4. application program capacity monitoring method as claimed in claim 2, it is characterised in that: using SAT data pick-up model come Realize the extraction to the performance parameter.
5. application program capacity monitoring method as described in claim 1, which is characterized in that the server display analysis result Step for reference includes: to show the performance after visable representation by way of showing suspended window on a user interface Parameter.
6. application program capacity monitoring method as claimed in claim 5, which is characterized in that the suspended window is also monitored to this The collapse type of object carries out statistics and attribute qualifier is prompted using correctness.
7. application program capacity monitoring method as described in claim 1, which is characterized in that the server by utilizing Cocoapods manages third party's open source library of the monitored object.
8. a kind of application program capacity monitoring device, which is characterized in that described device includes:
Module is established, the communication channel for establishing between server and the electronic equipment for being equipped with monitored object;
Receiving module, the test request sent for receiving monitored object by the communication channel, wherein described monitored Object is application program;
Acquisition module, for acquiring the performance parameter of the monitored object;
Analysis module, for analyzing the performance parameter;And
Display module, for showing that analysis result is for reference.
9. a kind of electronic equipment, which is characterized in that the electronic equipment includes processor and memory, and the processor is for holding Application program as claimed in any of claims 1 to 7 in one of claims is realized when the computer program stored in the row memory It can monitoring method.
10. a kind of computer readable storage medium, computer program, feature are stored on the computer readable storage medium It is, the computer program realizes application program as claimed in any of claims 1 to 7 in one of claims when being executed by processor It can monitoring method.
CN201810929554.8A 2018-08-15 2018-08-15 Application program capacity monitoring method, device, electronic equipment and storage medium Pending CN109359019A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810929554.8A CN109359019A (en) 2018-08-15 2018-08-15 Application program capacity monitoring method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810929554.8A CN109359019A (en) 2018-08-15 2018-08-15 Application program capacity monitoring method, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN109359019A true CN109359019A (en) 2019-02-19

Family

ID=65349999

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810929554.8A Pending CN109359019A (en) 2018-08-15 2018-08-15 Application program capacity monitoring method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109359019A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110096430A (en) * 2019-03-16 2019-08-06 平安证券股份有限公司 Third party's SDK entry test method, apparatus, terminal and storage medium
CN110177300A (en) * 2019-05-23 2019-08-27 北京字节跳动网络技术有限公司 Monitoring method, device, electronic equipment and the storage medium of running state of programs
CN110324436A (en) * 2019-07-05 2019-10-11 网宿科技股份有限公司 A kind of Proxy Method and device of transport-layer proxy
CN113254256A (en) * 2020-02-10 2021-08-13 华为技术有限公司 Data reconstruction method, storage device and storage medium
CN114520995A (en) * 2022-01-11 2022-05-20 宝宝巴士股份有限公司 Method for realizing non-invasive monitoring of application network flow use

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040064552A1 (en) * 2002-06-25 2004-04-01 Chong James C. Method and system for monitoring performance of applications in a distributed environment
US20050021736A1 (en) * 2003-01-07 2005-01-27 International Business Machines Corporation Method and system for monitoring performance of distributed applications
CN104683180A (en) * 2015-02-12 2015-06-03 北京蓝海讯通科技有限公司 Performance monitoring method and system as well as application server
CN106294091A (en) * 2016-08-11 2017-01-04 福建富士通信息软件有限公司 A kind of without intrusive mood daily record interception method for analyzing performance and system
CN107704360A (en) * 2017-09-15 2018-02-16 平安科技(深圳)有限公司 Processing method, equipment, server and the storage medium of monitoring data
CN107832226A (en) * 2017-11-23 2018-03-23 中国平安人寿保险股份有限公司 Report-generating method, device, equipment and computer media based on performance test
CN108337127A (en) * 2017-12-21 2018-07-27 中国平安人寿保险股份有限公司 application performance monitoring method, system, terminal and computer readable storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040064552A1 (en) * 2002-06-25 2004-04-01 Chong James C. Method and system for monitoring performance of applications in a distributed environment
US20050021736A1 (en) * 2003-01-07 2005-01-27 International Business Machines Corporation Method and system for monitoring performance of distributed applications
CN104683180A (en) * 2015-02-12 2015-06-03 北京蓝海讯通科技有限公司 Performance monitoring method and system as well as application server
CN106294091A (en) * 2016-08-11 2017-01-04 福建富士通信息软件有限公司 A kind of without intrusive mood daily record interception method for analyzing performance and system
CN107704360A (en) * 2017-09-15 2018-02-16 平安科技(深圳)有限公司 Processing method, equipment, server and the storage medium of monitoring data
CN107832226A (en) * 2017-11-23 2018-03-23 中国平安人寿保险股份有限公司 Report-generating method, device, equipment and computer media based on performance test
CN108337127A (en) * 2017-12-21 2018-07-27 中国平安人寿保险股份有限公司 application performance monitoring method, system, terminal and computer readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈兴业: "《计算机***性能评价》", 华南工学院出版社, pages: 56 - 60 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110096430A (en) * 2019-03-16 2019-08-06 平安证券股份有限公司 Third party's SDK entry test method, apparatus, terminal and storage medium
CN110177300A (en) * 2019-05-23 2019-08-27 北京字节跳动网络技术有限公司 Monitoring method, device, electronic equipment and the storage medium of running state of programs
CN110324436A (en) * 2019-07-05 2019-10-11 网宿科技股份有限公司 A kind of Proxy Method and device of transport-layer proxy
CN110324436B (en) * 2019-07-05 2023-04-18 网宿科技股份有限公司 Proxy method and device for transport layer proxy
CN113254256A (en) * 2020-02-10 2021-08-13 华为技术有限公司 Data reconstruction method, storage device and storage medium
CN113254256B (en) * 2020-02-10 2023-08-22 华为技术有限公司 Data reconstruction method, storage device and storage medium
CN114520995A (en) * 2022-01-11 2022-05-20 宝宝巴士股份有限公司 Method for realizing non-invasive monitoring of application network flow use

Similar Documents

Publication Publication Date Title
CN109359019A (en) Application program capacity monitoring method, device, electronic equipment and storage medium
US20210176136A1 (en) Continuous data sensing of functional states of networked computing devices to determine efficiency metrics for servicing electronic messages asynchronously
CN109684370A (en) Daily record data processing method, system, equipment and storage medium
CN110351150A (en) Fault rootstock determines method and device, electronic equipment and readable storage medium storing program for executing
CN108039959A (en) Situation Awareness method, system and the relevant apparatus of a kind of data
CN107896175A (en) Collecting method and device
CN110428127B (en) Automatic analysis method, user equipment, storage medium and device
CN110175154A (en) A kind of processing method of log recording, server and storage medium
CN108809701A (en) A kind of data center's wisdom data platform and its implementation
CN107370806A (en) HTTP conditional codes monitoring method, device, storage medium and electronic equipment
CN109344170A (en) Stream data processing method, system, electronic equipment and readable storage medium storing program for executing
CN109656963A (en) Metadata acquisition methods, device, equipment and computer readable storage medium
CN107807872A (en) A kind of power transmission and transformation system method for monitoring operation states
CN109271359A (en) Log information processing method, device, electronic equipment and readable storage medium storing program for executing
CN105405221A (en) Method and device for automated test
CN113347170A (en) Intelligent analysis platform design method based on big data framework
CN110262919A (en) Abnormal data analysis method, device, equipment and computer readable storage medium
US9405531B2 (en) Methods for building application intelligence into event driven applications through usage learning, and systems supporting such applications
CN110377623A (en) One kind being based on event driven auditing system
US20230011128A1 (en) Query generation from event-based pattern matching
KR101830936B1 (en) Performance Improving System Based Web for Database and Application
CN114116872A (en) Data processing method and device, electronic equipment and computer readable storage medium
Romero et al. Integration of DevOps practices on a noise monitor system with CircleCI and Terraform
US20170109637A1 (en) Crowd-Based Model for Identifying Nonconsecutive Executions of a Business Process
CN113918534A (en) Policy processing system and method

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