CN108874646A - The method and apparatus for analyzing data - Google Patents
The method and apparatus for analyzing data Download PDFInfo
- Publication number
- CN108874646A CN108874646A CN201810608207.5A CN201810608207A CN108874646A CN 108874646 A CN108874646 A CN 108874646A CN 201810608207 A CN201810608207 A CN 201810608207A CN 108874646 A CN108874646 A CN 108874646A
- Authority
- CN
- China
- Prior art keywords
- time
- attribute
- client
- view
- analyzed
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording 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/3452—Performance evaluation by statistical analysis
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Probability & Statistics with Applications (AREA)
- Evolutionary Biology (AREA)
- Bioinformatics & Computational Biology (AREA)
- Computer Hardware Design (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Quality & Reliability (AREA)
- General Physics & Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses a kind of method and apparatus for analyzing data.Wherein, this method includes:Obtain the performance parameter of client;The data of performance parameter are acquired, sample data is obtained;Sample data is analyzed according to preset performance indicator rule, obtains analysis result, wherein performance parameter and performance indicator rule correspond, and whether the performance parameter that analysis result is used to characterize client is qualified.The present invention is solved the prior art and is analyzed using manual type the performance based on locally applied client, and the technical problem that analysis efficiency is low is caused.
Description
Technical field
The present invention relates to computer fields, in particular to a kind of method and apparatus for analyzing data.
Background technique
React Native, abbreviation RN are a kind of Development Frameworks of cross-platform mobile application, are based on the Development Framework, soft
Part developer can develop primary client.However, React Native is in initial stage at present, in framework, property
There is also many deficiencies in energy quality and equipment, therefore, it is necessary to be monitored to the client based on React Native, with
Evaluate the performance of client.
It is existing not to be suitable for the client based on React Native for primary or web monitoring method, currently, main
The performance of the client based on React Native is monitored and is assessed by artificial mode.The side of personal monitoring
Formula not only needs to consume a large amount of manpower and material resources, moreover, it is manually relatively low to the analysis efficiency of client performance, it is error-prone.
The performance based on locally applied client is analyzed using manual type for the above-mentioned prior art, is caused
The low problem of analysis efficiency, currently no effective solution has been proposed.
Summary of the invention
The embodiment of the invention provides a kind of method and apparatus for analyzing data, at least to solve the prior art using artificial
Mode analyzes the performance based on locally applied client, leads to the technical problem that analysis efficiency is low.
According to an aspect of an embodiment of the present invention, a kind of method for analyzing data is provided, including:Obtain client
Performance parameter;The data of performance parameter are acquired, sample data is obtained;According to preset performance indicator rule to sample number
According to being analyzed, analysis result is obtained, wherein performance parameter and performance indicator rule correspond, and analysis result is for characterizing
Whether the performance parameter of client is qualified.
Further, performance parameter includes at least:Whether more the delay time of message response draws delay time, component
New control function, mapping logic synchronous frame rate, execution duration, processor load, the network flow of function.
Further, the delay time of message response corresponding sample data includes at least:First scope is made to second
The first time of first message is sent with domain, the second scope receives the second time of first message and the first scope receives
The third time for the second message that second scope is sent, the method for analyzing data further include:When obtaining at the first time with second
Between first time is poor and the second time difference of the second time and third time;When poor default less than first at the first time
Between, and/or, in the case that the second time difference is less than the second preset time, determine that the delay time of the message response of client closes
Lattice.
Further, the sample data of delay time of drawing includes at least:The submission time and hold that view operation instructs
The row time, batch operation view the non-of time and non-batch operation view that execute in batches execute in batches the time, analyze data
Method further include:According to the submission time of view operation instruction and the time is executed, when determining the preparation of view operation instruction
Between;To view operation instruction time, the time of executing in batches and it is non-execute in batches the time carry out accumulating operation, led
The drawing delay time of view out;In the case where delay time of drawing being less than preset time, the drawing delay of client is determined
Time is qualified.
Further, the method for analyzing data further includes:Obtain the first internal component attribute and of component to be detected
One external module attribute;Control function whether is updated to the first internal component attribute and the first external module attribute according to component
It is updated, obtains the second internal component attribute and the second external module attribute;Compare the first internal component attribute and second
Internal component attribute and the first external module attribute and the second external module attribute, obtain comparison result;If comparison result
Indicate that the first internal component attribute is different from the second internal component attribute, and/or, the first external module attribute and the second outer set
Part attribute is not identical, then to the first internal component attribute and the second internal component attribute and the first outer set in decision device
Part attribute is analyzed with the second external module attribute, obtains analysis result.
Further, the method for analyzing data further includes:Inside the attribute value and second for comparing the first internal component attribute
Whether the attribute value of component property identical and the attribute of the attribute value of the first external module attribute and the second external module attribute
Whether identical it is worth;And/or compares the corresponding function of the first internal component attribute function corresponding with the second internal component attribute and be
Whether the no identical and corresponding function of the first external module attribute function corresponding with the second external module attribute is identical.
Further, the sample data of mapping logic synchronous frame rate includes at least:Whether view falls frame and logical delay
Time, the method for analyzing data further include:Judge to mention between present frame view and previous frame view with the presence or absence of the first scope
The unfinished event handed over;If between present frame view and previous frame view exist do not complete event, also, present frame view with
Time in logical delay between previous frame view is greater than third preset time, it is determined that present frame view does not fall frame;Working as
In the case that previous frame view does not fall frame, determine that the mapping logic synchronous frame rate of client is qualified.
Further, the method for analyzing data further includes:Obtain function to be detected;In the decorator of client execute to
Detection function, and record the execution duration for executing function to be detected;In the case that length is less than default execution duration when being executed, really
The execution duration for determining the function of client is qualified.
Further, the method for analyzing data further includes:The processor load of thread in acquisition process;Determine processor
It is supported on the second load value of the first load value and processor load of predetermined time in preset duration;In the first load
It is worth less than the first default load value, and/or, in the case that the second load value is less than the second default load value, determine client
Processor load is qualified.
Further, the method for analyzing data further includes:Obtain the uplink and downlink flow of the network interface card of client;According to uplink and downlink
Flow determines the network flow of client in preset time period;In the case where network flow is less than preset flow, client is determined
The network flow at end is qualified.
Further, the method for analyzing data further includes:In the parameter to be analyzed of the performance of analysis result instruction client
In underproof situation, warning information is generated;Analysis log and/or Visual Chart are generated according to warning information.
According to another aspect of an embodiment of the present invention, a kind of device for analyzing data is additionally provided, including:Module is obtained,
For obtaining the performance parameter of client;Acquisition module is acquired for the data to performance parameter, obtains sample data;
Analysis module obtains analysis result, wherein performance for analyzing according to preset performance indicator rule sample data
Parameter and performance indicator rule correspond, and whether the performance parameter that analysis result is used to characterize client is qualified.
According to another aspect of an embodiment of the present invention, a kind of storage medium is additionally provided, which includes storage
Program, wherein the method that program executes analysis data.
According to another aspect of an embodiment of the present invention, a kind of processor is additionally provided, which is used to run program,
In, the method for analysis data is executed when program is run.
In embodiments of the present invention, in such a way that the performance parameter to client is assessed, by obtaining client
Performance parameter, and the data of performance parameter are acquired, obtain sample data, then according to preset performance indicator rule
Sample data is analyzed, analysis result is obtained, wherein performance parameter and performance indicator rule correspond, and analyze result
Whether the performance parameter for characterizing client is qualified, has reached client-based performance parameter and has carried out to the performance of client
The purpose automatically analyzed, to realize the technical effect for improving the analysis efficiency analyzed the performance of client, in turn
It solves the prior art to analyze the performance based on locally applied client using manual type, causes analysis efficiency low
The technical issues of.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present invention, constitutes part of this application, this hair
Bright illustrative embodiments and their description are used to explain the present invention, and are not constituted improper limitations of the present invention.In the accompanying drawings:
Fig. 1 is a kind of method flow diagram for analyzing data according to an embodiment of the present invention;
Fig. 2 is the block schematic illustration of the delay time of optional detection message response according to an embodiment of the present invention a kind of;
Fig. 3 is the block schematic illustration of the delay time of optional detection message response according to an embodiment of the present invention a kind of;
Fig. 4 is the frame signal whether a kind of optional detection components according to an embodiment of the present invention update control function
Figure;
Fig. 5 is a kind of block schematic illustration of optional detection mapping logic synchronous frame rate according to an embodiment of the present invention;
Fig. 6 (a) is a kind of schematic diagram of optional Visual Chart according to an embodiment of the present invention;
Fig. 6 (b) is a kind of schematic diagram of optional Visual Chart according to an embodiment of the present invention;
Fig. 6 (c) is a kind of schematic diagram of optional Visual Chart according to an embodiment of the present invention;
Fig. 6 (d) is a kind of schematic diagram of optional Visual Chart according to an embodiment of the present invention;
Fig. 6 (e) is a kind of schematic diagram of optional Visual Chart according to an embodiment of the present invention;
Fig. 6 (f) is a kind of schematic diagram of optional Visual Chart according to an embodiment of the present invention;
Fig. 6 (g) is a kind of schematic diagram of optional Visual Chart according to an embodiment of the present invention;And
Fig. 7 is a kind of apparatus structure schematic diagram for analyzing data according to an embodiment of the present invention.
Specific embodiment
In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention
Attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only
The embodiment of a part of the invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill people
The model that the present invention protects all should belong in member's every other embodiment obtained without making creative work
It encloses.
It should be noted that description and claims of this specification and term " first " in above-mentioned attached drawing, "
Two " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that using in this way
Data be interchangeable under appropriate circumstances, so as to the embodiment of the present invention described herein can in addition to illustrating herein or
Sequence other than those of description is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that cover
Cover it is non-exclusive include, for example, the process, method, system, product or equipment for containing a series of steps or units are not necessarily limited to
Step or unit those of is clearly listed, but may include be not clearly listed or for these process, methods, product
Or other step or units that equipment is intrinsic.
Embodiment 1
According to embodiments of the present invention, a kind of embodiment of the method for analyzing data is provided, it should be noted that in attached drawing
The step of process illustrates can execute in a computer system such as a set of computer executable instructions, although also,
Logical order is shown in flow chart, but in some cases, it can be to be different from shown by sequence execution herein or retouch
The step of stating.
Fig. 1 is the method flow diagram of analysis data according to an embodiment of the present invention, as shown in Figure 1, this method includes as follows
Step:
Step S102 obtains the performance parameter of client.
In step s 102, client is application or program based on React Native Development Framework, i.e., in the application
Middle client is Native client, and the performance parameter of the client includes at least:The delay time of message response, delay of drawing
Whether time, component update control function, mapping logic synchronous frame rate, the execution duration of function, processor load, network flow
Amount.
Step S104 is acquired the data of performance parameter, obtains sample data.
It should be noted that in step S104, sampler can corresponding data of acquisition performance parameter in real time, and then obtain
Sample data.After the data to performance parameter are acquired, the data of collected performance parameter are stored in logger
In, it is storable in the data storage (for example, local database) of system local, that is, locally records, the property of may also be stored in
In energy data server, i.e., long-range record.Software developer can select for sampled data to be stored according to actual development situation
In the data storage of system local, also it is stored in performance data server.
In addition, different performance parameters has different sample datas, for example, the sample data for delay time of drawing is at least
Including:The submission time of view operation instruction and execute the time, batch operation view executes in batches time and non-batch
The non-of operational view executes in batches the time, and the sample data of mapping logic synchronous frame rate includes at least:View whether fall frame with
And the time in logical delay.
Step S106 analyzes sample data according to preset performance indicator rule, obtains analysis result, wherein
Performance parameter and performance indicator rule correspond, and whether the performance parameter that analysis result is used to characterize client is qualified.
It should be noted that analyzer can calculate in real time the sample data in logger, and according to preset property
Energy indicator rule analyzes corresponding performance parameter, wherein the analyzer that different performance parameters uses is different, different
The corresponding performance indicator rule of performance parameter is not also identical, for example, when by the submission time of detection view operation instruction, execution
Between, the non-of time and non-batch operation view that execute in batches of batch operation view execute in batches the big of time and preset time
Small, whether the drawing delay time to determine client is qualified.And patrolling for client is determined by the way that whether detection view falls frame
Whether qualified collect drawing synchronous frame rate.
Based on scheme defined by above-mentioned steps S102 to step S106, it can know, by the performance for obtaining client
Parameter, and the data of performance parameter are acquired, sample data is obtained, then according to preset performance indicator rule to sample
Data are analyzed, and analysis result is obtained, wherein performance parameter and performance indicator rule correspond, and analysis result is used for table
Whether the performance parameter for levying client is qualified.
It is easily noted that, during the performance parameter to client detects, is not necessarily to software developer
The performance of client is monitored and is assessed, the performance detection of whole process automation is realized, has reached client-based
The purpose that performance parameter automatically analyzes the performance of client is furthermore achieved raising and divides the performance of client
The technical effect of the analysis efficiency of analysis.
It can be seen that the method for analysis data provided herein can solve the prior art using manual type to base
It is analyzed in the performance of locally applied client, leads to the technical problem that analysis efficiency is low.
In a kind of optional scheme, the delay time of message response, corresponding sample data was included at least:First effect
Domain sends the first time of first message to the second scope, the second scope receives the second time and first of first message
Scope receives the third time for the second message that the second scope is sent.Wherein, the first scope is the domain Native, i.e. Android
Or the performing environment of the primary code of iOS system, the second scope are the domain JS, i.e. the JavaScript generation of Android or iOS system
The performing environment of code.In addition, the delay time of message response reflects message response timeliness (MRT, the Message of client
Response Timely), the delay which reflects the domain Native and the domain JS interoperability is called.Wherein, according to default
Performance indicator rule sample data is analyzed, analyzed as a result, may include:
Step S20, obtain at the first time with the first time of the second time is poor and the second time and third time the
Two time differences;
Step S22, it is poor less than the first preset time in first time, and/or, the second time difference is less than the second preset time
In the case where, determine that the delay time of the message response of client is qualified.
Optionally, it is illustrated by taking the block schematic illustration of the delay time of detection message response shown in Fig. 2 as an example,
In, MRT analyzer completes the analysis of the delay time to the message response of client.Firstly, the domain Native passes through Ping
First message is sent to the Forward periodicity of function JS scope, wherein include creation first message in first message
Time (i.e. createTime in Fig. 2), the first time (i.e. sendTime in Fig. 2) for sending first message and sequence
(i.e. seq in Fig. 2).After the first message for receiving the transmission of the domain Native, record receives the of first message in the domain JS
Two times, and second message is sent to by the domain Native by ACK Backward function, wherein when second message includes second
Between (i.e. jscReceivedTime in Fig. 2).After receiving second message, record receives second message in the domain Native
The third time.Then the MRT record driver in the domain Native generates complete sample report (i.e. Completed in Fig. 2
Report it), and by sample report is sent to the MRT sample record device in the domain JS, finally by MRT analyzer to the number in sample report
According to being handled and analyzed.Wherein, if the time difference for sending message and receiving between message is larger, MRT analyzer determines
The delay time of the message response of client is unqualified.
Optionally, the sample data of delay time of drawing includes at least:The submission time of view operation instruction and execution
Time, batch operation view execute in batches the time and non-the non-of batch operation view executes in batches the time.Prolong in addition, drawing
The slow time reflects the drawing delay (GCP, Graphic Commands Postdone) of client, which reflects
(rendering function) the export JSX Views tree of render function in the domain JS to rendering the successful time difference on the screen.Wherein, according to pre-
If performance indicator rule sample data is analyzed, analyzed as a result, may include:
Step S30 according to the submission time of view operation instruction and executes the time, determines the preparation of view operation instruction
Time;
Step S32, to view operation instruction time, the time of executing in batches and it is non-execute in batches the time carry out it is tired
Add operation, obtains the drawing delay time of export view;
Step S34 determines that the drawing delay time of client closes in the case where delay time of drawing being less than preset time
Lattice.
Specifically, being illustrated by taking the block schematic illustration of detection drawing delay time shown in Fig. 3 as an example, wherein GCP points
Parser come complete to client drawing delay time analysis.Wherein, function can be passed through
The submission time commitStartTime of view operation instruction can be obtained in UIOperationsonBatchComplete, passes through letter
The execution time runStartTime of view operation instruction can be obtained in number Begin run Operations function, passes through Exec
Nonbatched Operations Cost function obtains non-the non-of batch operation view and executes in batches the time
NonBatchedExecutionTime obtains batch of batch operation view by Exec Operations Cost Time function
Amount executes time BatchedExecutionTime.Logger records the sample data of above-mentioned drawing delay time, and will draw
The sample data of delay time is sent to GCP analyzer.The preparation of view operation instruction is calculated in GCP analyzer according to the following formula
Time T1:
T1=runStartTime-commitStariTime
Then the delay time T2 that draws is calculated again:
T2=BatchedExecutionTime+nonBatchedExecutionTime+T1
Further, GCP analyzer judges the size of T2 and preset time, wherein if T2 is less than preset time, really
The drawing delay time for determining client is qualified, otherwise, it is determined that the drawing delay time of client is unqualified.
In a kind of optional scheme, whether component updates control function, i.e. SCU (shouldComponentUpdate)
It reflects in the component of client with the presence or absence of the calling of invalid extra rendering function (render function).Wherein, according to pre-
If performance indicator rule analyze whether component updates the corresponding sample data of control function, may include:
Step S40 obtains the first internal component attribute and the first external module attribute of component to be detected;
Whether step S42 updates control function to the first internal component attribute and the first external module category according to component
Property is updated, and obtains the second internal component attribute and the second external module attribute;
Step S44, compare the first internal component attribute and the second internal component attribute and the first external module attribute with
Second external module attribute, obtains comparison result;
Step S46, if the comparison indicate that the first internal component attribute is different from the second internal component attribute, and/or,
First external module attribute and the second external module attribute be not identical, then to the first internal component attribute and second in decision device
Internal component attribute and the first external module attribute are analyzed with the second external module attribute, obtain analysis result.
In above process, the first internal component attribute and the second internal component attribute are props attribute, the first outer set
Part attribute and the second external module attribute are state attribute, wherein the attribute that props is assigned by component by outside, state
The attribute assigned inside it by component.And the componentDidUpdate function of component to be detected can be to props attribute
It is transmitted with state attribute, is the first internal component attribute and the first external module attribute before transmitting, is after transmitting
Second internal component attribute and the second external module attribute.
Specifically, be illustrated so that whether detection components shown in Fig. 4 update the block schematic illustration of control function as an example,
In, SCU analyzer completes the analysis that control function whether is updated to the component of client, and SCU analyzer can in this application
Being detected to no SCU component optimized for task is completed, and calculates the time-consuming for executing rendering function.Firstly, runs software
Processor updates componentDidUpdate function by calling render function.It is then based on Hook grades of statistics renderings
Time-consuming, and deep comparison is carried out to props and state, generate comparison result.
Further, compare the first internal component attribute and the second internal component attribute and the first external module attribute
With the second external module attribute, including:Compare the attribute value of the first internal component attribute and the attribute of the second internal component attribute
Whether whether identical and the first external module attribute attribute value is identical as the attribute value of the second external module attribute for value;With/
Or, whether compare the corresponding function of the first internal component attribute function corresponding with the second internal component attribute identical, Yi Ji
Whether the corresponding function of one external module attribute function corresponding with the second external module attribute is identical.
Herein, it should be noted that after carrying out deep comparison, if the comparison indicate that the numerical value of props and state
The function of unequal or props and state is not identical, then SCU analyzer determines whether the component of client updates control function
It is unqualified;If the comparison indicate that the numerical value and function of props and state are all the same, then it is right again in SCU decision device
Props and state are shallowly compared, and determine whether the component of client updates control letter according to the comparison result shallowly compared
Whether number meets the requirements.
In a kind of optional scheme, the sample data of mapping logic synchronous frame rate is included at least:View whether fall frame with
And the time in logical delay, wherein mapping logic synchronous frame rate reflect in drawing course with the presence or absence of in logic fall frame and
Delay.Optionally, the corresponding sample data of mapping logic synchronous frame rate is analyzed according to preset performance indicator rule, it can
To include:
Step S50 judges not completing between present frame view and previous frame view with the presence or absence of what the first scope was submitted
Event;
Step S52, if there is the event of not completing between present frame view and previous frame view, also, present frame view
Time in logical delay between previous frame view is greater than third preset time, it is determined that present frame view does not fall frame;
Step S54 determines that the mapping logic synchronous frame rate of client is closed in the case where present frame view does not fall frame
Lattice.
Specifically, being illustrated by taking the block schematic illustration of detection mapping logic synchronous frame rate shown in fig. 5 as an example, wherein
FPS analyzer completes the analysis to the mapping logic synchronous frame rate of client, and FPS analyzer is mainly to drawing or synchronous frame rate
Fall frame and the low drafting of duration or synchronous frame rate is analyzed.Firstly, the processor of operation program is in the mistake to view rendering
Cheng Zhong detects the view task (i.e. above-mentioned unfinished event) submitted between every two frames view with the presence or absence of the domain JS, for example, in Fig. 5,
There is no the view tasks that the domain JS is submitted between 2 view of 1 view of frame and frame, also, when the time in logical delay presets greater than third
Between (for example, 16.7ms), then FPS analyzer, which determines, is not present frame between 2 view of 1 view of frame and frame, and 2 view of frame and frame 4
There are the view task (being handled 3 view of frame for task) that the domain JS is submitted between view, FPS analyzer determines 2 view of frame
There is frame between 4 view of frame, the mapping logic synchronous frame rate of client is unqualified.
In a kind of optional scheme, the execution duration of function reflects synchronous function, whether asynchronous procedure executes time-consuming
Beyond expected standard, the analysis of the execution duration of the achievable function to client of Memory analyzer.Wherein, according to preset
Performance indicator rule analyzes the corresponding sample data of execution duration of function, may include:
Step S60 obtains function to be detected;
Step S62 executes function to be detected in the decorator of client, and when recording the execution for executing function to be detected
It is long;
Step S64 determines the execution duration of the function of client in the case that length is less than default execution duration when being executed
It is qualified.
Specifically, the processor of operation program is that function increase to be detected is repaired by decorator (i.e. decorator function)
Decorations, and in the execution duration of decorator internal record function to be detected, when Memory analyzer will execute duration with default execute
The long or default duration range that executes is compared, if executing duration is less than preset duration, or is executed duration and is executed default
Duration range, then Memory analyzer determines that the execution duration of the function of client is qualified, and otherwise, Memory analyzer determines visitor
The execution duration of the function at family end is unqualified.
In another optional scheme, processor load mainly reflects JS thread, rendering thread, Native_Module
The load of thread is with the presence or absence of abnormal, wherein the corresponding analyzer of processor load is CPU analyzer, and CPU analyzer is detectable
Instantaneous high consumption, the consumption of duration height and primary thread (for example, JS thread, rendering thread, Native_Module thread) are negative
The abnormal examination of load.Wherein, the corresponding sample data of processor load is analyzed according to preset performance indicator rule, it can
To include:
Step S70, the processor load of the thread in acquisition process;
Step S72, determine processor load predetermined time the first load value and processor load in preset duration
The second interior load value;
Step S74, in the first load value less than the first default load value, and/or, the second load value is less than the second preset negative
In the case where load value, determine that the processor load of client is qualified.
Specifically, the processor load of thread in Linux top extraction process, and calculation processing can be used in CPU analyzer
Device load instantaneous value (i.e. the first load value) and before this in 5 seconds (i.e. in preset duration) P80 quantile processor
Whether within the set range to load (i.e. the second load value).Wherein, if the first load value is less than the first default load value, and/
Or, the second load value is less than the second default load value or the first load value and the second load value respectively in preset load value model
In enclosing, then CPU analyzer determines that the processor load of client is qualified, and otherwise, CPU analyzer determines that the processor of client is negative
It carries unqualified.
Finally, whether the detectable short cycle downlink traffic of Traffic analyzer is abnormal, wherein refer to according to preset performance
Mark rule analyzes the corresponding sample data of network flow, may include:
Step S80 obtains the uplink and downlink flow of the network interface card of client;
Step S82 determines the network flow of client in preset time period according to uplink and downlink flow;
Step S84 determines that the network flow of client is qualified in the case where network flow is less than preset flow.
Optionally, Traffic analyzer can detect the network interface card information of the network interface card of client, and use client
It identifies to extract the uplink and downlink flow of client, and detects the network of 5 seconds (i.e. in preset time period) P80 quantiles before this
Whether flow is abnormal.Wherein, if network flow is more than preset flow, Traffic analyzer determines the network flow of client
It measures unqualified.
It should be noted that analyzing according to preset performance indicator rule sample data, analysis result is obtained
Later, analysis result can be also shown, wherein unqualified in the parameter to be analyzed of the performance of analysis result instruction client
In the case where, warning information is generated, and analysis log and/or Visual Chart are generated according to warning information, for example, Fig. 6 (a)-
(g) the corresponding Visual Chart of above-mentioned 7 kinds of performance parameters is respectively illustrated, wherein Fig. 6 (a) is the delay time of message response
Corresponding Visual Chart, Fig. 6 (b) are whether component updates the corresponding Visual Chart of control function, and Fig. 6 (c) draws for logic
The corresponding Visual Chart of figure synchronous frame rate, Fig. 6 (d) are the corresponding Visual Chart of network flow, and Fig. 6 (e) is holding for function
The corresponding Visual Chart of row duration, Fig. 6 (f) are delay time corresponding Visual Chart of drawing, and Fig. 6 (g) is negative for processor
Carry corresponding Visual Chart.
Embodiment 2
According to embodiments of the present invention, a kind of Installation practice for analyzing data is additionally provided, which can be performed embodiment 1
The method of provided analysis data, wherein Fig. 7 is the apparatus structure schematic diagram of analysis data according to an embodiment of the present invention,
As shown in fig. 7, the device includes:Obtain module 701, acquisition module 703 and analysis module 705.
Wherein, module 701 is obtained, for obtaining the performance parameter of client;Acquisition module 703, for performance parameter
Data be acquired, obtain sample data;Analysis module 705 is used for according to preset performance indicator rule to sample data
It is analyzed, obtains analysis result, wherein performance parameter and performance indicator rule correspond, and analysis result is for characterizing visitor
Whether the performance parameter at family end is qualified.
It should be noted that above-mentioned acquisition module 701, acquisition module 703 and analysis module 705 correspond to embodiment 1
In step S102 to step S106, the example and application scenarios that three modules and corresponding step are realized be identical but unlimited
In 1 disclosure of that of above-described embodiment.
In addition it is also necessary to which explanation, performance parameter include at least:Delay time of message response, delay time of drawing,
Whether component updates execution duration, processor load, the network flow of control function, mapping logic synchronous frame rate, function.
In a kind of optional scheme, the delay time of message response, corresponding sample data was included at least:First effect
Domain sends the first time of first message to the second scope, the second scope receives the second time and first of first message
Scope receives the third time for the second message that the second scope is sent, wherein analysis module includes:First obtain module with
And first determining module.Wherein, first module is obtained, it is poor with the first time of the second time at the first time for obtaining, and
The second time difference of second time and third time;First determining module, for poor less than the first preset time at the first time,
And/or second the time difference less than the second preset time in the case where, determine that the delay time of the message response of client is qualified.
It should be noted that above-mentioned first obtains module and the first determining module corresponding to the step S20 in embodiment 1
To step S22, two modules are identical as example and application scenarios that corresponding step is realized, but are not limited to the above embodiments 1
Disclosure of that.
In a kind of optional scheme, the sample data for delay time of drawing is included at least:The submission of view operation instruction
Time and execute time, when executing in batches time and non-batch operation view non-and executing in batches of batch operation view
Between, wherein analysis module includes:Second determining module, computing module and third determining module.Wherein, the second determining module,
Submission time and execution time for being instructed according to view operation, determine the time of view operation instruction;Operation mould
Block, time, the time of executing in batches for being instructed to view operation and it is non-execute in batches the time and carry out accumulating operation, obtain
To the drawing delay time of export view;Third determining module is used in the case where delay time of drawing being less than preset time,
Determine that the drawing delay time of client is qualified.
It should be noted that above-mentioned second determining module, computing module and third determining module correspond in embodiment 1
Step S30 to step S34, three modules are identical as example and application scenarios that corresponding step is realized, but are not limited to
State 1 disclosure of that of embodiment.
In a kind of optional scheme, analysis module includes:Second obtains module, update module, comparison module and divides
Analyse submodule.Wherein, second module is obtained, for obtaining the first internal component attribute and the first outer set of component to be detected
Part attribute;Update module, for whether updating control function to the first internal component attribute and the first outer set according to component
Part attribute is updated, and obtains the second internal component attribute and the second external module attribute;Comparison module, for comparing first
Internal component attribute and the second internal component attribute and the first external module attribute and the second external module attribute, are compared
Relatively result;Submodule is analyzed, is used for if the comparison indicate that the first internal component attribute is different from the second internal component attribute,
And/or first external module attribute and the second external module attribute it is not identical, then to the first internal component attribute in decision device
It is analyzed with the second internal component attribute and the first external module attribute with the second external module attribute, obtains analysis knot
Fruit.
It should be noted that above-mentioned second obtains module, update module, comparison module and analysis submodule corresponding to real
The step S40 to step S46 in example 1 is applied, four modules are identical as example and application scenarios that corresponding step is realized, but not
It is limited to 1 disclosure of that of above-described embodiment.
In a kind of optional scheme, comparison module includes:First comparison module and/or the second comparison module.Wherein,
One comparison module, for compare the attribute value of the first internal component attribute and the second internal component attribute attribute value whether phase
Together and whether the attribute value of the first external module attribute is identical as the attribute value of the second external module attribute;And/or second
Comparison module, for compare the corresponding function of the first internal component attribute function corresponding with the second internal component attribute whether phase
Together and whether the corresponding function of the first external module attribute function corresponding with the second external module attribute is identical.
In a kind of optional scheme, the sample data of mapping logic synchronous frame rate is included at least:View whether fall frame with
And the time in logical delay, wherein analysis module includes:Judgment module, the 4th determining module and the 5th determining module.Wherein,
Judgment module, the unfinished thing for judging to submit between present frame view and previous frame view with the presence or absence of the first scope
Part;4th determining module, if for there is the event of not completing, also, present frame between present frame view and previous frame view
Time in logical delay between view and previous frame view is greater than third preset time, it is determined that present frame view does not fall
Frame;5th determining module, for determining the mapping logic synchronization frame of client in the case where present frame view does not fall frame
Rate is qualified.
It should be noted that above-mentioned judgment module, the 4th determining module and the 5th determining module correspond in embodiment 1
Step S50 to step S54, three modules are identical as example and application scenarios that corresponding step is realized, but are not limited to
State 1 disclosure of that of embodiment.
In a kind of optional scheme, analysis module includes:Third obtains module, logging modle and the 6th determining mould
Block.Wherein, third obtains module, for obtaining function to be detected;Logging modle, in the decorator of client execute to
Detection function, and record the execution duration for executing function to be detected;6th determining module is less than default hold for long when being executed
In the case where row duration, determine that the execution duration of the function of client is qualified.
Correspond in embodiment 1 it should be noted that above-mentioned third obtains module, logging modle and the 6th determining module
Step S60 to step S64, three modules are identical as example and application scenarios that corresponding step is realized, but are not limited to
State 1 disclosure of that of embodiment.
In a kind of optional scheme, analysis module includes:4th acquisition module, the 7th determining module and the 8th determine
Module.Wherein, the 4th module, the processor load for the thread in acquisition process are obtained;7th determining module, for determining
First load value and processor load second load value preset duration in of the processor load in predetermined time;8th
Determining module is used in the first load value less than the first default load value, and/or, the second load value is less than the second default load
In the case where value, determine that the processor load of client is qualified.
It should be noted that the above-mentioned 4th obtains module, the 7th determining module and the 8th determining module corresponding to implementation
Step S70 to step S74 in example 1, the example and application scenarios that three modules and corresponding step are realized are identical but unlimited
In 1 disclosure of that of above-described embodiment.
In a kind of optional scheme, analysis module includes:5th acquisition module, the 9th determining module and the tenth determine
Module.Wherein, the 5th module, the uplink and downlink flow of the network interface card for obtaining client are obtained;9th determining module is used for basis
Uplink and downlink flow determines the network flow of client in preset time period;Tenth determining module, it is pre- for being less than in network flow
If in the case where flow, determining that the network flow of client is qualified.
It should be noted that the above-mentioned 5th obtains module, the 9th determining module and the tenth determining module corresponding to implementation
Step S80 to step S84 in example 1, the example and application scenarios that three modules and corresponding step are realized are identical but unlimited
In 1 disclosure of that of above-described embodiment.
In a kind of optional scheme, the device for analyzing data further includes:First generation module and the second generation module.
Wherein, the first generation module, for giving birth in the underproof situation of parameter to be analyzed of the performance of analysis result instruction client
At warning information;Second generation module, for generating analysis log and/or Visual Chart according to warning information.
Embodiment 3
According to another aspect of an embodiment of the present invention, a kind of storage medium is additionally provided, which includes storage
Program, wherein the method that program executes the analysis data in embodiment 1.
Embodiment 4
According to another aspect of an embodiment of the present invention, a kind of processor is additionally provided, which is used to run program,
In, the method for the analysis data in embodiment 1 is executed when program is run.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
In the above embodiment of the invention, it all emphasizes particularly on different fields to the description of each embodiment, does not have in some embodiment
The part of detailed description, reference can be made to the related descriptions of other embodiments.
In several embodiments provided herein, it should be understood that disclosed technology contents can pass through others
Mode is realized.Wherein, the apparatus embodiments described above are merely exemplary, such as the division of the unit, Ke Yiwei
A kind of logical function partition, there may be another division manner in actual implementation, for example, multiple units or components can combine or
Person is desirably integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual
Between coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or communication link of unit or module
It connects, can be electrical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
On unit.It can some or all of the units may be selected to achieve the purpose of the solution of this embodiment according to the actual needs.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one 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 software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product
When, it can store in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially
The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words
It embodies, which is stored in a storage medium, including some instructions are used so that a computer
Equipment (can for personal computer, server or network equipment etc.) execute each embodiment the method for the present invention whole or
Part steps.And storage medium above-mentioned includes:USB flash disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited
Reservoir (RAM, Random Access Memory), mobile hard disk, magnetic or disk etc. be various to can store program code
Medium.
The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art
For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered
It is considered as protection scope of the present invention.
Claims (14)
1. a kind of method for analyzing data, which is characterized in that including:
Obtain the performance parameter of client;
The data of the performance parameter are acquired, sample data is obtained;
The sample data is analyzed according to preset performance indicator rule, obtains analysis result, wherein the performance ginseng
Several to correspond with the performance indicator rule, whether the performance parameter that the analysis result is used to characterize the client closes
Lattice.
2. the method according to claim 1, wherein the performance parameter includes at least:The delay of message response
Whether time, delay time of drawing, component update control function, mapping logic synchronous frame rate, the execution duration of function, processor
Load, network flow.
3. according to the method described in claim 2, it is characterized in that, the delay time of the message response corresponding sample data
It includes at least:Described in first scope sends the first time of first message to the second scope, second scope receives
When second time of first message and first scope receive the third for the second message that second scope is sent
Between, first scope is local scope, and second scope is JS scope, wherein is referred to according to preset performance
Mark rule analyzes the sample data, is analyzed as a result, including:
Obtain the first time and second time first time is poor and second time and the third time
The second time difference;
It is poor less than the first preset time in the first time, and/or, feelings of second time difference less than the second preset time
Under condition, determine that the delay time of the message response of the client is qualified.
4. according to the method described in claim 2, it is characterized in that, the sample data for drawing delay time includes at least:
View operation instruction submission time and execute the time, batch operation view execute in batches the time and non-batch operation view
The non-of figure executes in batches the time, wherein analyzes according to preset performance indicator rule the sample data, is analyzed
As a result, including:
According to the submission time of view operation instruction and the execution time, the preparation of the view operation instruction is determined
Time;
To the view operation instruction time, it is described execute in batches the time and it is described it is non-execute in batches the time carry out it is tired
Add operation, obtains the drawing delay time of export view;
In the case where the drawing delay time being less than preset time, determine that the drawing delay time of the client is qualified.
5. according to the method described in claim 2, it is characterized in that, according to preset performance indicator rule to the sample data
It is analyzed, is analyzed as a result, including:
Obtain the first internal component attribute and the first external module attribute of component to be detected;
Control function whether is updated to the first internal component attribute and the first external module category according to the component
Property is updated, and obtains the second internal component attribute and the second external module attribute;
Compare the first internal component attribute and the second internal component attribute and the first external module attribute with
The second external module attribute, obtains comparison result;
If the comparison result indicates that the first internal component attribute is different from the second internal component attribute, and/or,
The first external module attribute and the second external module attribute be not identical, then to group inside described first in decision device
Part attribute and the second internal component attribute and the first external module attribute and the second external module attribute into
Row analysis, obtains the analysis result.
6. according to the method described in claim 5, it is characterized in that, in the first internal component attribute and described second
Parts attribute and the first external module attribute and the second external module attribute, obtain comparison result, including:
Whether the attribute value for comparing the first internal component attribute is identical as the attribute value of the second internal component attribute, with
And whether the attribute value of the first external module attribute is identical as the attribute value of the second external module attribute;And/or
Compare the corresponding function of the first internal component attribute function corresponding with the second internal component attribute whether phase
Together and the corresponding function of the first external module attribute function corresponding with the second external module attribute whether phase
Together.
7. according to the method described in claim 2, it is characterized in that, the sample data of the mapping logic synchronous frame rate is at least wrapped
It includes:Whether view falls frame and time in logical delay, wherein carries out according to preset performance indicator rule to the sample data
Analysis, is analyzed as a result, including:
Judge the unfinished event submitted between present frame view and previous frame view with the presence or absence of the first scope;
If there are the unfinished event between the present frame view and the previous frame view, also, the present frame
Time in logical delay between view and the previous frame view is greater than third preset time, it is determined that the present frame view is not
Fall frame;
In the case where the present frame view does not fall frame, determine that the mapping logic synchronous frame rate of the client is qualified.
8. according to the method described in claim 2, it is characterized in that, according to preset performance indicator rule to the sample data
It is analyzed, is analyzed as a result, including:
Obtain function to be detected;
When executing the function to be detected in the decorator of the client, and recording the execution for executing the function to be detected
It is long;
In the case where the execution duration is less than default execution duration, determine that the execution duration of the function of the client is closed
Lattice.
9. according to the method described in claim 2, it is characterized in that, according to preset performance indicator rule to the sample data
It is analyzed, is analyzed as a result, including:
The processor load of thread in acquisition process;
Determine the processor load in the first load value of predetermined time and the processor load in preset duration
Second load value;
In first load value less than the first default load value, and/or, second load value is less than the second default load value
In the case where, determine that the processor load of the client is qualified.
10. according to the method described in claim 2, it is characterized in that, according to preset performance indicator rule to the sample number
According to being analyzed, analyzed as a result, including:
Obtain the uplink and downlink flow of the network interface card of the client;
The network flow of the client in preset time period is determined according to the uplink and downlink flow;
In the case where the network flow is less than preset flow, determine that the network flow of the client is qualified.
11. the method according to any one of claim 3 to 10, which is characterized in that according to preset performance indicator
Rule analyzes the sample data, after obtaining analysis result, the method also includes:
In the case where the analysis result indicates the underproof situation of parameter to be analyzed of performance of the client, early warning letter is generated
Breath;
Analysis log and/or Visual Chart are generated according to the warning information.
12. a kind of device for analyzing data, which is characterized in that including:
Module is obtained, for obtaining the performance parameter of client;
Acquisition module is acquired for the data to the performance parameter, obtains sample data;
Analysis module, for analyzing according to preset performance indicator rule the sample data, analyzed as a result, its
In, the performance parameter and the performance indicator rule correspond, and the analysis result is used to characterize the property of the client
Whether energy parameter is qualified.
13. a kind of storage medium, which is characterized in that the storage medium includes the program of storage, wherein described program right of execution
Benefit require any one of 1 to 11 described in analysis data method.
14. a kind of processor, which is characterized in that the processor is for running program, wherein right of execution when described program is run
Benefit require any one of 1 to 11 described in analysis data method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810608207.5A CN108874646A (en) | 2018-06-13 | 2018-06-13 | The method and apparatus for analyzing data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810608207.5A CN108874646A (en) | 2018-06-13 | 2018-06-13 | The method and apparatus for analyzing data |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108874646A true CN108874646A (en) | 2018-11-23 |
Family
ID=64338799
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810608207.5A Pending CN108874646A (en) | 2018-06-13 | 2018-06-13 | The method and apparatus for analyzing data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108874646A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110008101A (en) * | 2019-04-04 | 2019-07-12 | 网易(杭州)网络有限公司 | Client performance evaluation method, device, storage medium and electronic equipment |
CN110287243A (en) * | 2019-06-28 | 2019-09-27 | 重庆回形针信息技术有限公司 | Distributed data acquires and display systems and method in real time |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130127900A1 (en) * | 2011-11-21 | 2013-05-23 | Schlumberger Technology Corporation | Interface for controlling and improving drilling operations |
CN103425574A (en) * | 2012-05-25 | 2013-12-04 | 腾讯科技(深圳)有限公司 | Method and device for testing applications |
CN107436840A (en) * | 2017-08-01 | 2017-12-05 | 北京奇虎科技有限公司 | Application program analysis of running performance method, apparatus and system |
CN107506293A (en) * | 2016-06-14 | 2017-12-22 | 中兴通讯股份有限公司 | A kind of software performance data acquisition method and device |
-
2018
- 2018-06-13 CN CN201810608207.5A patent/CN108874646A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130127900A1 (en) * | 2011-11-21 | 2013-05-23 | Schlumberger Technology Corporation | Interface for controlling and improving drilling operations |
CN103425574A (en) * | 2012-05-25 | 2013-12-04 | 腾讯科技(深圳)有限公司 | Method and device for testing applications |
CN107506293A (en) * | 2016-06-14 | 2017-12-22 | 中兴通讯股份有限公司 | A kind of software performance data acquisition method and device |
CN107436840A (en) * | 2017-08-01 | 2017-12-05 | 北京奇虎科技有限公司 | Application program analysis of running performance method, apparatus and system |
Non-Patent Citations (2)
Title |
---|
SOPACO的Q文中继站: "【QClient】ReactNative应用自动化性能采集、分析和量化评估方案", 《HTTPS://WWW.JIANSHU.COM/P/943C3E7A8CD1?FROM=TIMELINE》 * |
广州市图书馆学会等: "《现代图书馆研究系列 图书馆合作创新与发展 2016年卷》", 30 November 2016 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110008101A (en) * | 2019-04-04 | 2019-07-12 | 网易(杭州)网络有限公司 | Client performance evaluation method, device, storage medium and electronic equipment |
CN110287243A (en) * | 2019-06-28 | 2019-09-27 | 重庆回形针信息技术有限公司 | Distributed data acquires and display systems and method in real time |
CN110287243B (en) * | 2019-06-28 | 2022-01-18 | 重庆回形针信息技术有限公司 | Distributed data real-time acquisition and display system and method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101882105B (en) | Method for testing response time of Web page under concurrent environment | |
CN108521339B (en) | Feedback type node fault processing method and system based on cluster log | |
WO2023109251A1 (en) | System fault detection method and apparatus, device, and medium | |
CN116416706A (en) | Data acquisition method and device | |
CN111292020B (en) | Power grid real-time operation risk assessment method and system based on random forest | |
CN107229566B (en) | Method and system for maintaining functional consistency of SOA service conversion language | |
CN112994972B (en) | Distributed probe monitoring platform | |
CN103716209B (en) | A kind of tunnel concurrent test system and equipment | |
CN110363355B (en) | Cloud-edge collaborative forecasting system and method for alumina production index | |
CN115660288A (en) | Analysis management system based on internet big data | |
CN108874646A (en) | The method and apparatus for analyzing data | |
CN105511937A (en) | Batch virtual machine blue screen monitoring method suitable for cloud platform | |
CN110941558B (en) | Intelligent office remote operation and maintenance method and system | |
CN106648722B (en) | Method and device for processing Flume receiving terminal data based on big data | |
CN106855844A (en) | A kind of performance test methods and system | |
CN112650656A (en) | Performance monitoring method, device, equipment, server and storage medium | |
CN113537590A (en) | Data anomaly prediction method and system | |
CN113364625B (en) | Data transmission method, intermediate transmission equipment and storage medium | |
CN114416415A (en) | Remote online fault detection method and system for Hongmon operating system and storage medium | |
CN115080386A (en) | Scene effectiveness analysis method and device based on automatic driving function requirement | |
US9229898B2 (en) | Causation isolation using a configuration item metric identified based on event classification | |
CN115618290A (en) | Cell scene identification method, device, equipment and storage medium | |
CN107666416B (en) | Iperf test result judgment system | |
CN111861012A (en) | Test task execution time prediction method and optimal execution node selection method | |
CN106371880B (en) | A kind of system and method for resource heat load iteratively faster game making |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181123 |