CN106100936A - Webpage method for monitoring performance and device and the webserver, client - Google Patents

Webpage method for monitoring performance and device and the webserver, client Download PDF

Info

Publication number
CN106100936A
CN106100936A CN201610653537.7A CN201610653537A CN106100936A CN 106100936 A CN106100936 A CN 106100936A CN 201610653537 A CN201610653537 A CN 201610653537A CN 106100936 A CN106100936 A CN 106100936A
Authority
CN
China
Prior art keywords
page
monitoring
performance
response message
script
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
CN201610653537.7A
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.)
LeTV Holding Beijing Co Ltd
LeTV Information Technology Beijing Co Ltd
Original Assignee
LeTV Holding Beijing Co Ltd
LeTV Information Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by LeTV Holding Beijing Co Ltd, LeTV Information Technology Beijing Co Ltd filed Critical LeTV Holding Beijing Co Ltd
Priority to CN201610653537.7A priority Critical patent/CN106100936A/en
Publication of CN106100936A publication Critical patent/CN106100936A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • G06F11/3072Monitoring arrangements determined by the means or processing involved in reporting the monitored data where the reporting involves data filtering, e.g. pattern matching, time or event triggered, adaptive or policy-based reporting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Quality & Reliability (AREA)
  • Environmental & Geological Engineering (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a kind of webpage method for monitoring performance and device and the webserver, client, wherein said monitoring method receives the accessing page request message that client sends, and generates the page access response message for described accessing page request message;In the filter of described JS monitoring script, obtain the parameter of described page access response message, described JS monitoring script is write described page access response message;Described page response message is sent to client;Obtain the page performance monitoring parameter returned from client.Software project backstage is after obtaining the access request of front end user, webpage performance monitoring script will be added in the page response message generated, monitoring script loads together along with page response message returns to front end user in the lump, thus monitoring script can obtain the performance data of front end page in real time, the performance data Real-time Feedback obtained, to the backstage of software project, obtains page performance monitoring sample with this.

Description

Webpage method for monitoring performance and device and the webserver, client
Technical field
Technical solution of the present invention belongs to networking technology area, particularly relates to a kind of webpage method for monitoring performance and webpage performance Supervising device, and include the webserver of webpage performance monitoring apparatus, networking client.
Background technology
Present software project is more and more higher to the requirement of performance, and generally in software project development, performance test takies relatively Multiple resource, the instrument of the background class test performance of software project is a lot, but the instrument of performance of front end test is fewer.Existing Performance of front end test software be SaaS type mostly, SaaS is the letter of Software-as-a-Service (software i.e. services) Claiming, belong to a kind of software service, the performance data collection method mainly timing of the performance of front end test software of SaaS class uses The machine of different network environments different regions, monitors the every of the page with the instrument inspection of browser or some simulation browsers The data such as waterfall stream in index, such as web page loading process, performance scores, Elemental redistribution, view analysis, then preserve daily record. Though these deemed-to-satisfy4 acquisition performance indications more accurately, test sample is very little, and instrument simulation test can be in certain journey Deviate with truth on degree, sometimes cannot reflect the fluctuation situation of performance, it is impossible to obtain real at front end user in real time User data.Except the base values of white screen head screen etc, the index that software product line focus attentions equally on software product is relevant, such as Advertisement is visible, search can use, it is available etc. to register, and these functions are directly relevant with page JS loading, by the more difficult simulation of instrument, this It is outward to charge due to SaaS service, considerably increases the development cost of software project.
Summary of the invention
Based on above-mentioned background, the invention provides a kind of webpage method for monitoring performance and device and the webserver, client End, especially by implanting JS monitoring script in the page, monitors page loading procedure during real user accession page on line, from And real front end user data can be obtained in real time, to obtain page performance monitoring data, by the page performance obtained Monitoring data carry out Treatment Analysis, can provide reliable reference data for the assessment of software product line with optimizing.
First aspect, the embodiment of the present invention provides a kind of webpage method for monitoring performance, including:
Receive the accessing page request message that client sends, generate the page for described accessing page request message and visit Ask response message;
In the filter of described JS monitoring script, obtain the parameter of described page access response message, described JS is monitored Script writes described page access response message;
Described page response message is sent to client;
Obtain the page performance monitoring parameter returned from client.
Second aspect, the embodiment of the present invention also provides for a kind of webpage method for monitoring performance, including:
Send accessing page request message;
Receiving page access response message, the parameter of described page access response message includes JS monitoring script;
Load JS monitoring script described in page luck row according to described page access response message, obtain page performance monitoring Parameter;
Described page performance monitoring parameter is sent to server.
The third aspect, the embodiment of the present invention provides a kind of webpage performance monitoring apparatus, including:
Request receiver module, for receiving the accessing page request message that client sends, generates and visits for the described page Ask the page access response message of request message;
Processing module, for obtaining the ginseng of described page access response message in the filter of described JS monitoring script Number, writes described page access response message by described JS monitoring script;
Request feedback module, for being sent to client by described page response message;
Monitoring parameter receiver module, for obtaining the page performance monitoring parameter returned from client.
Fourth aspect, the embodiment of the present invention also provides for a kind of webpage performance monitoring apparatus, including:
Request sending module, is used for sending accessing page request message;
Response receiver module, is used for receiving page access response message, wraps in the parameter of described page access response message Include JS monitoring script;
Monitoring parameter acquisition module, for loading JS monitoring described in page luck row according to described page access response message Script, obtains page performance monitoring parameter;
Monitoring parameter feedback module, is sent to server by described page performance monitoring parameter.
5th aspect, the embodiment of the present invention provides a kind of webserver, including webpage performance monitoring apparatus, described webpage Performance monitoring apparatus includes:
Request receiver module, for receiving the accessing page request message that client sends, generates and visits for the described page Ask the page access response message of request message;
Processing module, for obtaining the ginseng of described page access response message in the filter of described JS monitoring script Number, writes described page access response message by described JS monitoring script;
Request feedback module, for being sent to client by described page response message;
Monitoring parameter receiver module, for obtaining the page performance monitoring parameter returned from client.
6th aspect, the embodiment of the present invention provides a kind of networking client, including webpage performance monitoring apparatus, described webpage Performance monitoring apparatus includes:
Request sending module, is used for sending accessing page request message;
Response receiver module, is used for receiving page access response message, wraps in the parameter of described page access response message Include JS monitoring script;
Monitoring parameter acquisition module, for loading JS monitoring described in page luck row according to described page access response message Script, obtains page performance monitoring parameter;
Monitoring parameter feedback module, is sent to server by described page performance monitoring parameter.
The technical scheme provided by the embodiment of the present invention, software project backstage obtain front end user access request it After, all can add webpage performance monitoring script in the page response message generated, monitoring script is along with page response message one And return to front end user and load together, thus monitoring script can obtain the performance data of front end page in real time, it is thus achieved that property Energy data Real-time Feedback, to the backstage of software project, obtains a large amount of real page performance monitoring sample with this.Simultaneously by right The performance monitoring data obtained carries out Treatment Analysis, can provide reliable reference number for the assessment of software product line with optimizing According to.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing In having technology to describe, the required accompanying drawing used is briefly described, it should be apparent that, the accompanying drawing in describing below is only this Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, it is also possible to Other accompanying drawing is obtained according to these accompanying drawings.
The flow chart of the webpage method for monitoring performance that Fig. 1 provides for the embodiment of the present invention one.
The process chart of the parameter obtaining page access response message that Fig. 2 provides for the embodiment of the present invention two.
The flow chart of the webpage method for monitoring performance that Fig. 3 provides for the embodiment of the present invention three.
The structured flowchart of the webpage performance monitoring apparatus that Fig. 4 provides for the embodiment of the present invention four.
The structured flowchart of the processing module that Fig. 5 a provides for the embodiment of the present invention five.
The structured flowchart of the webpage performance monitoring apparatus that Fig. 5 b provides for the embodiment of the present invention five.
The structured flowchart of the webpage performance monitoring apparatus that Fig. 6 provides for the embodiment of the present invention six.
Detailed description of the invention
In order to make those skilled in the art be more fully understood that the present invention program, below in conjunction with in the embodiment of the present invention Accompanying drawing, is clearly and completely described the technical scheme in the embodiment of the present invention.Obviously, described embodiment is only The a part of embodiment of the present invention rather than whole embodiments, give presently preferred embodiments of the present invention in accompanying drawing.The present invention can To realize in many different forms, however it is not limited to embodiment described herein, on the contrary, provide the mesh of these embodiments Be to make the understanding to the disclosure more thorough comprehensively.Based on the embodiment in the present invention, the common skill in this area The every other embodiment that art personnel are obtained under not making creative work premise, broadly falls into the model of present invention protection Enclose.
Unless otherwise defined, all of technology used herein and scientific terminology and the technical field belonging to the present invention The implication that technical staff is generally understood that is identical.The term used the most in the description of the invention is intended merely to describe tool The purpose of the embodiment of body, it is not intended that in limiting the present invention.Additionally, term " includes " and " having " and their any changes Shape, it is intended that cover non-exclusive comprising.Such as contain series of steps or the process of unit, method, system, product or Equipment is not limited to step or the unit listed, but the most also includes step or the unit do not listed, or optional Ground also includes other steps intrinsic for these processes, method, product or equipment or unit.
Referenced herein " embodiment " is it is meant that the special characteristic, structure or the characteristic that describe can be wrapped in conjunction with the embodiments It is contained at least one embodiment of the present invention.It is identical that each position in the description occurs that this phrase might not each mean Embodiment, be not and the independent of other embodiments mutual exclusion or alternative embodiment.Those skilled in the art explicitly and Implicitly being understood by, embodiment described herein can combine with other embodiments.
Embodiment one
Refer to Fig. 1, Fig. 1 and show the flow process signal of a kind of webpage method for monitoring performance that the embodiment of the present invention one provides Figure.As it is shown in figure 1, the webpage method for monitoring performance in the embodiment of the present invention comprises the following steps:
The accessing page request message that S101, reception client send, generates for described accessing page request message Page access response message;
For concrete software project, comprise front end display in general manner and process part and background process part, Ke Yili Solve, receive the display request that accessing page request refers to the background process part receiving front-end display process part of software project. In embodiments of the present invention, the web page access that accessing page request is submitted to by browser in particular to web page front end user Request, after background process part receives the accessing page request message that client sends, generates and disappears for this accessing page request The page access response message of breath.
S102, in the filter of described JS monitoring script, obtain the parameter of described page access response message, by described JS monitoring script writes described page access response message;
In the present embodiment, the process processing accessing page request is different from general web page loading process, specifically It is included in the page access response message according to accessing page request generation and adds JS monitoring script.
The performance of front end of software project directly influences Consumer's Experience, and general performance of front end index includes but not limited to as follows The value of type:
The white screen time, after referring to initiate browse request, start to the time seeing that content of pages is spent, tool from page jump Body refers to start to be loaded into the time of the first byte receiving server return data from display interface;
Initial screen time, refers to that whole page loading time refers to from the beginning of initial starting up and browsing, until all elements is all loaded After completing, the most still there is no the time of network activity;The statistical of initial screen time is complicated, because it is many to relate to picture etc. Kind of element and the asynchronous mode, the actually loading of the picture of the principal element of impact head screen such as render, therefore by statistics head screen The load time of interior picture can relatively accurately obtain the time that first screen has rendered.
User can interaction time, refer to user log in, verify, time required for the interactive operation such as submission, can add up The domready time, because at this moment binding event action would generally be waited.Permissible for employing the JS of modularity Asynchronous loading The load time of the important JS of active flag in software code;
Total download time, refer to the download time summation of the Miscellaneous Documents such as the picture of webpage, css, js, onload can be added up Time, so can add up synchronize load resource all loaded time-consuming.If the page exists the most asynchronous rendering, can To render the time being fully completed as total download time by asynchronous;
The dns resolution time, the time required for fingering row domain name mapping;
The TCP Connection Time, refer to that client sets up the time connected;
Other also include the performance indications such as such as HTTP request time, http response time, page rendering time.
Therefore JS monitoring script correspondingly monitors corresponding to above-mentioned webpage performance indications, and specifically, JS monitoring script includes But be not limited to white screen time monitoring script, initial screen time monitoring script, user can interaction time monitoring script, prison of total download time Control script, dns resolution time monitoring script, TCP Connection Time monitoring script, HTTP request time monitoring script, HTTP are corresponding The webpage performance monitoring scripts such as time monitoring script, page rendering time monitoring script.The webpage added in page info Energy monitoring script can be one or several in above-mentioned webpage performance monitoring script.
S103, described page response message is sent to client;
Page info after return process, specifically, process based on step S102, performance monitoring script will be comprised after process Page info return to the front end of software project.
The page performance monitoring parameter that S104, acquisition return from client.
In the loading procedure of the page info of client, performance monitoring script runs in the lump, thus can obtain the page Can monitoring parameter, client is obtaining after page performance monitoring parameter, will feed back these parameters to backstage, thus be received by backstage The page performance monitoring parameter of these feedbacks.
In the embodiment of the present invention, software project backstage, after obtaining the access request of front end user, all can generate Adding webpage performance monitoring script in page response message, monitoring script returns to front end user in the lump along with page response message Load together, thus monitoring script can obtain the performance data of front end page in real time, it is thus achieved that performance data Real-time Feedback arrive The backstage of software project, obtains a large amount of real page performance monitoring sample with this.
Embodiment two
The embodiment of the present invention two is based on above-described embodiment one.
In embodiments of the present invention, described webpage method for monitoring performance also includes being placed in the filter of JS monitoring script At last chain of filter chain in spring mvc framework.Filter chain is had, in mistake in Spring mvc framework In filter chain, the filter of JS monitoring script is put into last position of filter chain.
In embodiments of the present invention, refering to Fig. 2, described obtain in the filter of described JS monitoring script the described page visit Ask that the parameter of response message includes:
S1021, accessing page request message is performed filter operation at least one times;
The present embodiment comprises strobe utility based on SPRING MVC framework, SPRING MVC framework, is specifically performing filtration During operation, due to different filtration treatment scenes, may comprise multiple times of filtration operation, the such as first filter operation was used for Filter character code, in the user front end request that web.xml file configuration is to be intercepted, the first filter operation is blocked based on configuration file Cut front end request, now coding can be set to request or response (Request, Response) are unified, simplify operation;The most such as Second filter operation judges for service logic, has logged in including such as user, that whether user has permission access is current The situations such as the page of request.
S1022, to filter after page access response message perform intercept operation at least one times;
In SPRING MVC framework, comprise interception mechanism equally, during the concrete execution of operation, may comprise repeatedly Intercepting operation, such as first intercepts operation is used for being defined on the code performed before and after an Action performs, and second intercepts operation Stoping it to perform before performing at an Action, the 3rd intercepts operation is used for extracting reusable part in Action. Action refers to the accessing points that the request of all of expression layer is concentrated.On the one hand abstract conception such as administration view, session and table are provided The centralized access point of forms data etc.;On the other hand also provide for a general mechanism such as mistake and abnormality processing, navigation, internationalize, Data verification, the centralized access point of data conversion etc..When user submits access request to when, actually information is first to send To ActionServlet, once ActionServlet obtains request, and solicited message will be passed and give by ActionServlet Some assisted class (help classes), are processed and the business operation corresponding to solicited message by assisted class.
In embodiments of the present invention, described by the most right for the described JS monitoring script described page access response message of write The page access response message intercepted performs to load webpage performance monitoring script operation.In the present embodiment, webpage performance is loaded Monitoring script comprises specific filtration and interception operation, is different from other filter operations, and specific filter operation is filtered at other Operation performs after all having performed again, and specific interception operation loads webpage performance monitoring foot in the page info of request This.
In embodiments of the present invention, described acquisition returns from client page performance monitoring parameter particularly as follows: according to Ajax acquisition request page performance monitoring parameter;
In embodiments of the present invention, webpage method for monitoring performance also includes page performance monitoring parameter read-in daily record literary composition Part, specifically, stores the journal file comprising performance of front end parameter to the memorizer specified.
In embodiments of the present invention, webpage method for monitoring performance also includes obtaining monitoring script, and monitoring script is to compile in advance The called code of journey.
In embodiments of the present invention, webpage method for monitoring performance also includes that performance Parameter analysis processes.Performance parameter is analyzed Refer to resolve journal file, by the performance monitoring data obtained is carried out Treatment Analysis, for the assessment of software product line with excellent Change and reliable reference data is provided.
The webpage method for monitoring performance that the embodiment of the present invention provides, this enforcement are described as a example by checking webpage in a browser The idiographic flow of example is as follows:
User uses user browser to send access request, enters the rear end program (operating in background server) of software Processing, specifically, background server receives after asking after spring mvc filter chain, finally at processor (Action) user's request, JS monitoring script page access response message before being added by JS monitoring script filter are processed in In, and this page access response message is back in user browser, user browser carries out page rendering, rendered Journey is run described JS monitoring script, thus obtains performance monitoring parameter, and returned performance prison by browser to background server Control parameter.In this specific embodiment, program is JavaScript, and therefore script is JavaScript script language Speech, it is possible to use other program writes script.
Described in above-described embodiment, by the filter of JS monitoring script being placed in the filter in spring mvc framework At last chain of chain, so can ensure that JS monitoring script will not be capped;Simultaneously by retention monitoring parameter, can Arbitrarily invocation performance monitoring parameter carries out performance evaluation, provides foundation for optimizing webpage performance.
Embodiment three
Refering to Fig. 3, the embodiment of the present invention provides a kind of webpage method for monitoring performance, and described method includes:
S201, transmission accessing page request message;
For concrete software project, comprise front end display in general manner and process part and background process part, this front end Display processes the accessing page request message of part and is accepted by the background process part of software project, background process part connecing After receiving accessing page request message, generate the page access response message for this accessing page request message, and pass through backstage The filter of the JS monitoring script processing part obtains the parameter of described page access response message, is write by described JS monitoring script Enter described page access response message;By background process part, the page access corresponding message comprising JS monitoring script is returned afterwards Part is processed back to front end display.Described JS monitoring script includes but not limited to that white screen time monitoring script, initial screen time monitor Script, user can interaction time monitoring script, total download time monitoring script, dns resolution time monitoring script, TCP connect time Between the net such as monitoring script, HTTP request time monitoring script, HTTP corresponding time monitoring script, page rendering time monitoring script Page performance monitoring script.The webpage performance monitoring script added in page info can be in above-mentioned webpage performance monitoring script One or several.
S202, reception page access response message, the parameter of described page access response message includes JS monitoring script; Front end display processes and partly receives the page access corresponding message comprising JS monitoring script returned by background process part.
S203, load JS monitoring script described in page luck row according to described page access response message, obtain the page Can monitoring parameter;
When front end display processes part process page access response message, in the loading procedure of page info, JS monitors Script runs in the lump, thus can obtain page performance monitoring parameter.
S204, described page performance monitoring parameter is sent to server.
Front end display processes part by the page performance monitoring parameter Real-time Feedback that obtains to background process part, thus can Real performance monitoring sample is provided.
By webpage method for monitoring performance described in above-described embodiment, user side with the addition of by obtaining from the backstage of software project The page access response message of JS monitoring script, and by running JS monitoring script in the loading procedure of the page simultaneously, thus The performance data of user side can be obtained in real time, the most also can be by after the performance data Real-time Feedback of acquisition to software project Platform, to provide real performance monitoring sample.
Embodiment four
Refering to Fig. 4, it is illustrated that the webpage performance monitoring apparatus provided for the embodiment of the present invention, described device specifically includes request Receiver module 101, processing module 102, request feedback module 103 and monitoring parameter receiver module 104.Wherein:
Request receiver module 101, for receiving the accessing page request message that client sends, generates for the described page The page access response message of access request message;In embodiments of the present invention, the page access that client sends is received Request message refers to that the background server reception web page front end user of software project please by the web page access that browser is submitted to Ask.
Processing module 102 is for obtaining the ginseng of described page access response message in the filter of described JS monitoring script Number, writes described page access response message by described JS monitoring script;In the present embodiment, the mistake of accessing page request is processed Journey is different from general web page loading process, specifically by the processing module being positioned in server according to accessing page request The page access response message generated adds JS monitoring script.Described JS monitoring script includes but not limited to white screen time monitoring Script, initial screen time monitoring script, user can interaction time monitoring script, total download time monitoring script, the dns resolution time prison Control script, TCP Connection Time monitoring script, HTTP request time monitoring script, HTTP corresponding time monitoring script, page rendering The webpage performance monitoring scripts such as time monitoring script.The webpage performance monitoring script added in page info can be above-mentioned net Page performance monitoring script in one or several.
Request feedback module 103 is for being sent to client by described page response message;At request feedback module 103 is incited somebody to action The page info comprising performance monitoring script after reason returns to the front end of software project.
Monitoring parameter receiver module 104 is for obtaining the page performance monitoring parameter returned from client.At page info Loading procedure in, JS monitoring script runs in the lump, thus obtains page performance monitoring parameter.
The webpage performance monitoring apparatus provided by above-described embodiment, the request receiver module on software project backstage is before acquisition After the access request of end subscriber, all can add JS in the page access response message generated according to request by processing module Monitoring script, by request feedback module, JS monitoring script returns to front end user in the lump along with page access response message, and Load together such that it is able to obtain in real time the performance data at front end user, it is thus achieved that performance data will feed back to software project The monitoring parameter receiver module on backstage, obtain a large amount of real performance monitoring sample with this.
Embodiment five
The embodiment of the present invention is based on embodiment four.
In embodiments of the present invention, described processing module is additionally operable to the filter of JS monitoring script is placed in spring mvc At last chain of filter chain in framework.Filter chain is had in Spring mvc framework, in filter chain, The filter of JS monitoring script is put into last position of filter chain.
In embodiments of the present invention, refering to Fig. 5 a, described processing module 102 includes filter unit 1021, blocker list Unit 1021, script loading unit 1023, wherein:
Filter unit 1021 for performing filter operation to accessing page request, and described filter unit 1021 is specially One filter chain, comprises at least one filter;
The present embodiment, based on SPRING MVC framework, comprises at least one filter in SPRING MVC framework.Filter Being used to filtration, in java web, to incoming request, response filters out some information in advance, or shifts to an earlier date Arranging some parameters, the Action of the most incoming servlet or struts carries out service logic, such as filters out illegal Url (not being the Address requests of login.do, all filter out if user does not log in), or at incoming servlet or The unified character set that arranges before the action of struts, or (through commonly used, some are scold in chatroom to get rid of some forbidden characters If people).Filter function differs, and the such as first filter can be used for filtering characters coding, wants well in web.xml file configuration The user front end request intercepted, this first filter intercepts front end request based on configuration file, now can be to request or response (Request, Response) is unified arranges coding, simplifies operation;The most such as second filter judges for service logic, including Process that such as user has logged in, whether user has permission the situation such as the page accessing current request.
Filter is a program, and it runs on the server prior to associated servlet or JSP.Filter Device can be attached in one or more servlet or JSP, and can check the solicited message entering these resources.? After this, filter can make following selection:
Call resource (i.e. calling servlet or JSP) the most in a conventional manner.
2. the solicited message revised is utilized to call resource.
3. call resource, but before sending a response to client computer, it is modified.
4. stop this resource transfer, instead forward other resource to, return a specific state code or generation is replaced Change output.
When Servlet uses as filter, the request of front end can be processed by it.After process completes, its meeting Giving next filter process, the request of such front end processes in filtration chain one by one, until request is sent to target.Example As, there is the webpage of submission " log-on message of amendment " in certain website, after user has filled in amendment information and submitted to, server exists Need when processing to do two work: judge that the session of client is the most effective;The data submitted to are carried out Unified coding.This Two work can process in the filtration chain being made up of two filters.After filter is processed into merit, submit to Data are sent to final goal;If filter process is unsuccessful, view will be distributed the wrong page specified.
Blocker unit 1022 is for performing to intercept operation, described blocker unit 1022 to the accessing page request filtered Including at least one blocker;
SPRING MVC framework comprises at least one blocker, comprises a blocker chain accordingly.Blocker, For, before certain method or field are accessed, carrying out intercepting then in AOP (Aspect-Oriented Programming) Add some operation before or after it.Blocker is the object that dynamic interception Action calls.Blocker can be defined on one The code that individual action performs before and after performing, it is also possible to stop it to perform before an action performs, also provide simultaneously A kind of can be to extract in action in the way of reusable part.
Multiple blockers form blocker chain by the arrangement of certain execution sequence, and (Interceptor Chain, at Struts 2 In be referred to as blocker stack Interceptor Stack).Blocker is coupled to one by blocker chain exactly in sequence Chain.When accessing intercepted method or field, the blocker in blocker chain will be called by the order defined before it. When major part, blocker method is all to call by the way of agency.The blocker of Struts 2 realizes relatively easy. When request arrives the ServletDispatcher of Struts 2, Struts 2 can search configuration file, and real according to its configuration The blocker object that exampleization is relative, then conspires to create a list (list), the blocker in last one ground invocation list.
Script loading unit 1023 is for performing to load webpage performance monitoring script operation to the page info intercepted.Corresponding In script loading unit 1023, the monitoring script filter comprising JavaScript and the monitoring script of JavaScript intercept Device, in SPRING MVC framework, a request sends from front end, according to one definite sequence perform: before filtration-intercept before- After Action process-interception-filter after.Filtration is a horizontal process, and the content first client submitted to filters (be such as not logged in user and can not access the process of internal pages);After being filtered through, blocker will check that user submits data to Checking, the data doing some early stages process, and then the data after process are issued the Action of correspondence;Action process completes to return Hui Hou, then return back up to the subsequent operation of filter, this step completes will back page.In filter chain, filter Chain is the list of an order.Last position in filter chain, it is meant that it would is that last behaviour before back page Make, it is to avoid the possibility covered by other filters, blocker.
In embodiments of the present invention, the parameter receiver module of webpage performance monitoring apparatus 104 obtains from client return Page performance monitoring parameter is particularly as follows: according to ajax acquisition request page performance monitoring parameter.
In embodiments of the present invention, refering to Fig. 5 b, webpage performance monitoring apparatus also includes memory module 105, for by page Face performance monitoring parameter read-in journal file, and the journal file comprising performance of front end parameter is stored to the memorizer specified In.
In embodiments of the present invention, refering to Fig. 5 b, webpage performance monitoring apparatus also includes monitoring script acquisition module 106, For obtaining webpage performance monitoring script.
In embodiments of the present invention, refering to Fig. 5 b, webpage performance monitoring apparatus also includes performance parameter processing module 107, For analyzing and processing the page performance monitoring parameter of acquisition.Performance parameter processing module is by resolving journal file, to obtain Performance monitoring data carries out Treatment Analysis, and the assessment for software product line provides reliable reference data with optimizing.
Described in above-described embodiment, by processing module, the filter of JS monitoring script is placed in spring mvc framework Filter chain last chain at, so can ensure that JS monitoring script will not be capped;Protected by memory module simultaneously Sustainability energy monitoring parameter, performance monitoring parameter acquisition module arbitrarily can carry out performance evaluation by invocation performance monitoring parameter, for optimizing Webpage performance provides foundation.
Embodiment six
As shown in Figure 6, the embodiment of the present invention provides a kind of webpage performance monitoring apparatus, and described device specifically includes request and sends out Send module 201, response receiver module 202, monitoring parameter acquisition module 203, monitoring parameter feedback module 204, wherein:
Request sending module 201 is used for sending accessing page request message;For concrete software project, wrap in general manner Processing part and background process part containing front end display, this front end display processes the accessing page request message of part by software item Purpose background process part accepts, and by background process part after receiving accessing page request message, generates and visits for this page Ask the page access response message of request message, and obtain described page by the filter of the JS monitoring script of background process part The parameter of response message is asked in interview, and described JS monitoring script is write described page access response message;Afterwards by background process The page access corresponding message comprising JS monitoring script is returned to front end display process part by part.Described JS monitoring script bag Include but be not limited to white screen time monitoring script, initial screen time monitoring script, user can interaction time monitoring script, total download time Monitoring script, dns resolution time monitoring script, TCP Connection Time monitoring script, HTTP request time monitoring script, HTTP phase The webpage performance monitoring script such as monitoring script, page rendering time monitoring script between Ying Shi.The webpage added in page info Performance monitoring script can be one or several in above-mentioned webpage performance monitoring script.
Response receiver module 202 is used for receiving page access response message, in the parameter of described page access response message Including JS monitoring script;The response receiver module 202 of front end display process part received by comprising that background process part returns The page access corresponding message of JS monitoring script.
Monitoring parameter acquisition module 203 is for loading JS prison described in page luck row according to described page access response message Control script, obtains page performance monitoring parameter;The monitoring parameter acquisition module 203 of front end display process part processes page access During response message, the loading procedure of page info loads JS monitoring script simultaneously, thus page performance monitoring ginseng can be obtained Number.
Described page performance monitoring parameter is sent to server by monitoring parameter feedback module 204.Display process portion, front end Point monitoring parameter feedback module 204 by the page performance monitoring parameter Real-time Feedback that obtains to background process part, thus can Real performance monitoring sample is provided.
By webpage performance monitoring apparatus described in above-described embodiment, user side passes through request sending module to background process part After sending request, receive, by response receiver module, the page access that with the addition of JS monitoring script sent by background process part Response message, by loading page access response message, runs JS monitoring script such that it is able to obtain user side in real time simultaneously Performance data, and by monitoring parameter feedback module by the backstage of the performance data Real-time Feedback of acquisition to software project, to carry For real performance monitoring sample.
Embodiment seven
The embodiment of the present invention provides a kind of webserver, and the described webserver includes embodiment four or embodiment five institute The webpage performance monitoring apparatus stated.
Embodiment eight
The embodiment of the present invention provides a kind of networking client, and described networking client includes the webpage described in embodiment six Can supervising device.
Embodiment nine
The embodiment of the present invention provides a kind of webpage performance monitoring system, and described webpage performance monitoring system includes embodiment seven Networking client described in the described webserver and embodiment eight.
These are only the preferred embodiments of the present invention, but be not limiting as the scope of the claims of the present invention, although with reference to aforementioned reality Executing example to be described in detail the present invention, for those skilled in the art comes, it still can be to aforementioned each tool Technical scheme described in body embodiment is modified, or wherein portion of techniques feature carries out equivalence replacement.Every profit The equivalent structure done by description of the invention and accompanying drawing content, is directly or indirectly used in other relevant technical fields, all In like manner within scope of patent protection of the present invention.

Claims (12)

1. a webpage method for monitoring performance, it is characterised in that including:
Receive the accessing page request message that client sends, generate the page access for described accessing page request message and ring Answer message;
The parameter of described page access response message is obtained, by described JS monitoring script in the filter of described JS monitoring script Write described page access response message;
Described page response message is sent to client;
Obtain the page performance monitoring parameter returned from client.
Webpage method for monitoring performance the most according to claim 1, it is characterised in that described method also includes: JS is monitored The filter of script is placed at last chain of the filter chain in spring mvc framework.
Webpage method for monitoring performance the most according to claim 1, it is characterised in that the described mistake at described JS monitoring script The parameter obtaining described page access response message in filter includes:
Accessing page request message is performed filter operation at least one times;
Perform to intercept operation at least one times to the page access response message after filtering;
Described by described JS monitoring script write described page access response message particularly as follows: to intercept page access response letter Breath performs to load webpage performance monitoring script operation.
Webpage method for monitoring performance the most according to claim 1, it is characterised in that the page that described acquisition returns from client Face performance monitoring parameter is particularly as follows: according to ajax acquisition request page performance monitoring parameter.
5. a webpage method for monitoring performance, it is characterised in that including:
Send accessing page request message;
Receiving page access response message, the parameter of described page access response message includes JS monitoring script;
Load JS monitoring script described in page luck row according to described page access response message, obtain page performance monitoring ginseng Number;
Described page performance monitoring parameter is sent to server.
6. a webpage performance monitoring apparatus, it is characterised in that include,
Request receiver module, for receiving the accessing page request message that client sends, generating please for described page access Seek the page access response message of message;
Processing module, for obtaining the parameter of described page access response message in the filter of described JS monitoring script, will Described JS monitoring script writes described page access response message;
Request feedback module, for being sent to client by described page response message;
Monitoring parameter receiver module, for obtaining the page performance monitoring parameter returned from client.
Webpage performance monitoring apparatus the most according to claim 6, it is characterised in that described processing module is additionally operable to supervise JS At last chain of the filter chain that the filter of control script is put in spring mvc framework.
Webpage performance monitoring system the most according to claim 6, it is characterised in that described processing module includes:
Filter unit, for performing filter operation at least one times to accessing page request message;
Blocker unit, for performing to intercept operation at least one times to the page access response message after filtering;
Script loading unit, for performing to load webpage performance monitoring script operation to the page access response message intercepted.
Webpage performance monitoring apparatus the most according to claim 6, it is characterised in that described monitoring parameter receiver module obtains The page performance monitoring parameter returned from client is specially according to ajax acquisition request page performance monitoring parameter.
10. a webpage performance monitoring apparatus, it is characterised in that including:
Request sending module, is used for sending accessing page request message;
Response receiver module, is used for receiving page access response message, and the parameter of described page access response message includes JS Monitoring script;
Monitoring parameter acquisition module, monitors foot for loading JS described in page luck row according to described page access response message This, obtain page performance monitoring parameter;
Monitoring parameter feedback module, is sent to server by described page performance monitoring parameter.
11. 1 kinds of webservers, it is characterised in that the described webserver includes described in claim 6-9 any one Webpage performance monitoring apparatus.
12. 1 kinds of networking clients, it is characterised in that described networking client includes the webpage performance prison described in claim 10 Control device.
CN201610653537.7A 2016-08-10 2016-08-10 Webpage method for monitoring performance and device and the webserver, client Pending CN106100936A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610653537.7A CN106100936A (en) 2016-08-10 2016-08-10 Webpage method for monitoring performance and device and the webserver, client

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610653537.7A CN106100936A (en) 2016-08-10 2016-08-10 Webpage method for monitoring performance and device and the webserver, client

Publications (1)

Publication Number Publication Date
CN106100936A true CN106100936A (en) 2016-11-09

Family

ID=57455532

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610653537.7A Pending CN106100936A (en) 2016-08-10 2016-08-10 Webpage method for monitoring performance and device and the webserver, client

Country Status (1)

Country Link
CN (1) CN106100936A (en)

Cited By (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106681926A (en) * 2017-01-05 2017-05-17 网易(杭州)网络有限公司 Method and device for testing webpage performances
CN107122281A (en) * 2017-03-17 2017-09-01 百度在线网络技术(北京)有限公司 Mobile solution loads monitoring method and system
CN107423194A (en) * 2017-06-30 2017-12-01 阿里巴巴集团控股有限公司 Front end abnormality alarming processing method, apparatus and system
CN107632920A (en) * 2017-09-16 2018-01-26 广西电网有限责任公司电力科学研究院 A kind of power transmission and transforming equipment monitoring device deep monitored method
CN107729208A (en) * 2017-09-16 2018-02-23 广西电网有限责任公司电力科学研究院 A kind of power transmission and transforming equipment monitoring device deep monitored system
CN107864070A (en) * 2017-10-30 2018-03-30 小草数语(北京)科技有限公司 Network status monitoring method, equipment and system
CN108595447A (en) * 2016-12-13 2018-09-28 广州市动景计算机科技有限公司 User terminal and Webpage specificity analysis apparatus and method
CN109245962A (en) * 2018-10-12 2019-01-18 北京信研汇智信息技术有限公司 Server monitoring method, system, computer equipment and storage medium
CN109739711A (en) * 2019-01-04 2019-05-10 广州虎牙信息科技有限公司 A kind of interface test method, device, equipment and storage medium
CN109933736A (en) * 2019-03-08 2019-06-25 浪潮通用软件有限公司 Have secure access to the method, apparatus and storage medium of third party's JSP page
CN110198324A (en) * 2018-02-26 2019-09-03 腾讯科技(深圳)有限公司 Data monitoring method, device, browser and terminal
CN110309463A (en) * 2018-02-28 2019-10-08 腾讯科技(深圳)有限公司 Land page optimization method, device, computer storage medium and the network equipment
CN110569082A (en) * 2019-08-06 2019-12-13 阿里巴巴集团控股有限公司 method and device for controlling page content
CN110688282A (en) * 2019-09-25 2020-01-14 北京博睿宏远数据科技股份有限公司 Webpage performance data monitoring and monitoring task distribution method and device
CN110781052A (en) * 2019-09-20 2020-02-11 平安普惠企业管理有限公司 Offline monitoring method and device, computer equipment and storage medium
CN111130948A (en) * 2019-12-30 2020-05-08 迈普通信技术股份有限公司 Network quality detection method and device
CN111198998A (en) * 2019-12-31 2020-05-26 北京指掌易科技有限公司 Network page loading method, device and system based on Ajax request
CN111290912A (en) * 2020-01-22 2020-06-16 北京百度网讯科技有限公司 Single-page application performance monitoring method and device and electronic equipment
CN111338960A (en) * 2020-02-27 2020-06-26 中国平安人寿保险股份有限公司 Buried point data acquisition method and device
CN111381847A (en) * 2018-12-29 2020-07-07 阿里巴巴集团控股有限公司 Information processing method and device
CN112528186A (en) * 2020-12-17 2021-03-19 上海优扬新媒信息技术有限公司 Webpage monitoring method, device and system
CN112528206A (en) * 2020-12-25 2021-03-19 平安普惠企业管理有限公司 Webpage log collection method and device, electronic equipment and storage medium
CN112559561A (en) * 2019-09-10 2021-03-26 联易软件有限公司 Data processing method and related device
CN112631906A (en) * 2020-12-18 2021-04-09 湖南映客互娱网络信息有限公司 Page performance detection method and system based on server
CN113569168A (en) * 2021-06-17 2021-10-29 北京健康之家科技有限公司 Page performance data generation method and device, computer storage medium and terminal

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101222349A (en) * 2007-01-12 2008-07-16 中国电信股份有限公司 Method and system for collecting web user action and performance data
US8875012B1 (en) * 2013-04-30 2014-10-28 Linkedin Corporation Front-end tool for displaying diagnostic information to facilitate web page development
WO2015014169A1 (en) * 2013-07-31 2015-02-05 Tencent Technology (Shenzhen) Company Limited Method, device, and system for detecting link layer hijacking, user equipment, and analyzing server
CN104516973A (en) * 2014-12-26 2015-04-15 北京奇虎科技有限公司 Method and device for accessing page
CN104754608A (en) * 2013-12-25 2015-07-01 腾讯科技(深圳)有限公司 Method and system for monitoring performances of mobile terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101222349A (en) * 2007-01-12 2008-07-16 中国电信股份有限公司 Method and system for collecting web user action and performance data
US8875012B1 (en) * 2013-04-30 2014-10-28 Linkedin Corporation Front-end tool for displaying diagnostic information to facilitate web page development
WO2015014169A1 (en) * 2013-07-31 2015-02-05 Tencent Technology (Shenzhen) Company Limited Method, device, and system for detecting link layer hijacking, user equipment, and analyzing server
CN104754608A (en) * 2013-12-25 2015-07-01 腾讯科技(深圳)有限公司 Method and system for monitoring performances of mobile terminal
CN104516973A (en) * 2014-12-26 2015-04-15 北京奇虎科技有限公司 Method and device for accessing page

Cited By (33)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108595447A (en) * 2016-12-13 2018-09-28 广州市动景计算机科技有限公司 User terminal and Webpage specificity analysis apparatus and method
CN106681926A (en) * 2017-01-05 2017-05-17 网易(杭州)网络有限公司 Method and device for testing webpage performances
CN107122281A (en) * 2017-03-17 2017-09-01 百度在线网络技术(北京)有限公司 Mobile solution loads monitoring method and system
CN107423194A (en) * 2017-06-30 2017-12-01 阿里巴巴集团控股有限公司 Front end abnormality alarming processing method, apparatus and system
CN107423194B (en) * 2017-06-30 2021-01-22 创新先进技术有限公司 Front-end abnormal alarm processing method, device and system
CN107632920A (en) * 2017-09-16 2018-01-26 广西电网有限责任公司电力科学研究院 A kind of power transmission and transforming equipment monitoring device deep monitored method
CN107729208A (en) * 2017-09-16 2018-02-23 广西电网有限责任公司电力科学研究院 A kind of power transmission and transforming equipment monitoring device deep monitored system
CN107864070A (en) * 2017-10-30 2018-03-30 小草数语(北京)科技有限公司 Network status monitoring method, equipment and system
CN110198324A (en) * 2018-02-26 2019-09-03 腾讯科技(深圳)有限公司 Data monitoring method, device, browser and terminal
CN110198324B (en) * 2018-02-26 2021-12-14 腾讯科技(深圳)有限公司 Data monitoring method and device, browser and terminal
CN110309463B (en) * 2018-02-28 2023-09-19 腾讯科技(深圳)有限公司 Floor page optimization method and device, computer storage medium and network equipment
CN110309463A (en) * 2018-02-28 2019-10-08 腾讯科技(深圳)有限公司 Land page optimization method, device, computer storage medium and the network equipment
CN109245962A (en) * 2018-10-12 2019-01-18 北京信研汇智信息技术有限公司 Server monitoring method, system, computer equipment and storage medium
CN111381847A (en) * 2018-12-29 2020-07-07 阿里巴巴集团控股有限公司 Information processing method and device
CN111381847B (en) * 2018-12-29 2023-04-25 阿里巴巴集团控股有限公司 Information processing method and device
CN109739711B (en) * 2019-01-04 2023-02-28 广州虎牙信息科技有限公司 Interface test method, device, equipment and storage medium
CN109739711A (en) * 2019-01-04 2019-05-10 广州虎牙信息科技有限公司 A kind of interface test method, device, equipment and storage medium
CN109933736A (en) * 2019-03-08 2019-06-25 浪潮通用软件有限公司 Have secure access to the method, apparatus and storage medium of third party's JSP page
CN110569082A (en) * 2019-08-06 2019-12-13 阿里巴巴集团控股有限公司 method and device for controlling page content
CN112559561B (en) * 2019-09-10 2023-12-22 联易软件有限公司 Data processing method and related device
CN112559561A (en) * 2019-09-10 2021-03-26 联易软件有限公司 Data processing method and related device
CN110781052A (en) * 2019-09-20 2020-02-11 平安普惠企业管理有限公司 Offline monitoring method and device, computer equipment and storage medium
CN110688282A (en) * 2019-09-25 2020-01-14 北京博睿宏远数据科技股份有限公司 Webpage performance data monitoring and monitoring task distribution method and device
CN110688282B (en) * 2019-09-25 2023-01-24 北京博睿宏远数据科技股份有限公司 Webpage performance data monitoring and monitoring task distribution method and device
CN111130948A (en) * 2019-12-30 2020-05-08 迈普通信技术股份有限公司 Network quality detection method and device
CN111198998A (en) * 2019-12-31 2020-05-26 北京指掌易科技有限公司 Network page loading method, device and system based on Ajax request
CN111198998B (en) * 2019-12-31 2023-08-08 北京指掌易科技有限公司 Method, device and system for loading network page based on Ajax request
CN111290912A (en) * 2020-01-22 2020-06-16 北京百度网讯科技有限公司 Single-page application performance monitoring method and device and electronic equipment
CN111338960A (en) * 2020-02-27 2020-06-26 中国平安人寿保险股份有限公司 Buried point data acquisition method and device
CN112528186A (en) * 2020-12-17 2021-03-19 上海优扬新媒信息技术有限公司 Webpage monitoring method, device and system
CN112631906A (en) * 2020-12-18 2021-04-09 湖南映客互娱网络信息有限公司 Page performance detection method and system based on server
CN112528206A (en) * 2020-12-25 2021-03-19 平安普惠企业管理有限公司 Webpage log collection method and device, electronic equipment and storage medium
CN113569168A (en) * 2021-06-17 2021-10-29 北京健康之家科技有限公司 Page performance data generation method and device, computer storage medium and terminal

Similar Documents

Publication Publication Date Title
CN106100936A (en) Webpage method for monitoring performance and device and the webserver, client
US10241901B2 (en) Web application performance testing
US8976955B2 (en) System and method for tracking web interactions with real time analytics
JP5511845B2 (en) A method for performing server-side logging of client browser status through markup languages
CN106897215A (en) A kind of method gathered based on WebView webpages loading performance and user behavior flow data
US8639743B1 (en) System and method for on-the-fly rewriting of JavaScript
CN108304498A (en) Webpage data acquiring method, device, computer equipment and storage medium
CN101877696B (en) Equipment and method for reconfiguring false response messages under network application environment
CN108650149A (en) Test method, device, equipment and the computer readable storage medium of server
CN104821954B (en) A kind of cross-platform remote procedure calling (PRC) method
US20150074647A1 (en) Testing system for an integrated software system
CN108628748B (en) Automatic test management method and automatic test management system
CN101217425A (en) Web testing method and device
CN103412890A (en) Webpage loading method and device
CN106294101A (en) The page gets method of testing and device ready
WO2020086969A1 (en) Methods and systems for performance testing
CN103647678A (en) Method and device for online verification of website vulnerabilities
CN106445509A (en) SDK batch quick access tool
CN105556505A (en) Legacy system
Durieux et al. Fully automated HTML and Javascript rewriting for constructing a self‐healing web proxy
US11829278B2 (en) Secure debugging in multitenant cloud environment
CN113220584A (en) Page testing method and device, computer equipment and readable storage medium
CN117370203A (en) Automatic test method, system, electronic equipment and storage medium
CN103677951A (en) Method and system for controlling executing process of JavaScript
CN114564382A (en) Mobile terminal user interface test method based on data simulation and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20161109

WD01 Invention patent application deemed withdrawn after publication