CN111459792A - WEB front-end performance monitoring method and device, electronic equipment and storage medium - Google Patents

WEB front-end performance monitoring method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111459792A
CN111459792A CN202010113188.6A CN202010113188A CN111459792A CN 111459792 A CN111459792 A CN 111459792A CN 202010113188 A CN202010113188 A CN 202010113188A CN 111459792 A CN111459792 A CN 111459792A
Authority
CN
China
Prior art keywords
monitoring
link
parameter
instruction
web front
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
CN202010113188.6A
Other languages
Chinese (zh)
Inventor
李巧巧
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202010113188.6A priority Critical patent/CN111459792A/en
Publication of CN111459792A publication Critical patent/CN111459792A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3452Performance evaluation by statistical analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Probability & Statistics with Applications (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a method and a device for monitoring WEB front-end performance, electronic equipment and a storage medium, wherein the method comprises the following steps: when a construction instruction is received, constructing a monitoring content display interface; when a setting instruction is received, displaying the newly added sub-interface and setting a monitoring link and a threshold value of a plurality of monitoring parameters corresponding to the monitoring link; when a monitoring instruction is received, an automatic test script is established according to the monitoring link and the monitoring parameters; automatically executing the test script every other first designated time and acquiring a return parameter; calling a specified tool based on a Python instruction to obtain the performance data in the return parameter. The WEB front-end performance monitoring method can self-define the monitoring link and realize automatic scanning, thereby reducing the manual operation cost and saving the time.

Description

WEB front-end performance monitoring method and device, electronic equipment and storage medium
Technical Field
The invention relates to a method and a device for monitoring WEB front-end performance, electronic equipment and a storage medium.
Background
With the continuous development of the software industry, the software development generally adopts a front-end independent design and a back-end independent design. The front end is an application program that establishes a connection for the purpose of sending a request, and is mainly used for designing and developing logic, debugging pages, and the like. Before software is released, various performance indexes of the front end of the software need to be monitored so as to ensure the running of the software. In the prior art, monitoring is usually carried out in a mode of manually setting plug-in units, and a large amount of time is needed for coding operation. Meanwhile, the form of the manual plug-in cannot automatically perform monitoring scanning, so that the monitoring efficiency is low, the maintenance cost is high, and the software development process is greatly reduced.
Disclosure of Invention
In view of the above, it is necessary to provide a method, an apparatus, an electronic device and a storage medium for monitoring performance of a WEB front end, which aim to solve the problem in the prior art that the front end performance cannot be automatically monitored.
A method for monitoring the performance of a WEB front end,
when a construction instruction is received, constructing a monitoring content display interface;
when a setting instruction is received, displaying the newly added sub-interface and setting a monitoring link and a threshold value of a plurality of monitoring parameters corresponding to the monitoring link;
when a monitoring instruction is received, an automatic test script is established according to the monitoring link and the monitoring parameters;
automatically executing the test script every other first designated time and acquiring a return parameter;
calling a specified tool based on a Python instruction to obtain the performance data in the return parameter.
Preferably, the specified tool is a plugin. entries in the HTTPwatch tool.
Preferably, the method for monitoring the performance of the WEB front end further includes:
setting a white list corresponding to the monitoring link and a threshold value of a corresponding parameter of the white list;
the new adding sub-interface comprises a white list setting area; the white list setting area is used for setting parameters corresponding to the white list.
Preferably, the method for monitoring the performance of the WEB front end further includes:
when an analysis instruction is received, analyzing and identifying the performance data;
when a collection instruction is received, collecting the analysis result of the performance data to form a performance test report;
and sending the performance test report to appointed personnel every other second appointed time.
Preferably, the performance test report is sent to a designated person in a designated mail manner; the specified mail comprises a plurality of mail parameters; the WEB front end performance monitoring method further comprises the following steps:
setting the mail parameters according to the input of the user in the newly added sub-interface; the newly added sub-interface comprises a mail setting area; the mail setting area is used for setting the mail parameters.
Preferably, the step of analyzing and identifying the performance data comprises:
obtaining values of the monitoring parameters in the performance data;
judging whether the numerical value of the monitoring parameter is larger than a threshold value corresponding to the monitoring parameter;
when the numerical value of the monitoring parameter is larger than the threshold value corresponding to the monitoring parameter, identifying that the monitoring link has a problem, and identifying the monitoring link by using a first identifier;
and when the numerical value of the monitoring parameter is less than or equal to the threshold value corresponding to the monitoring parameter, identifying that the performance of the monitoring link is good, and identifying the monitoring link by using a second identifier.
Preferably, the step of obtaining the value of the monitoring parameter in the performance data further comprises:
acquiring a return code in the performance data;
judging whether the return code has a specified parameter;
when the return code has the specified parameters, identifying the monitoring link as a trustable link, and incorporating the monitoring link into the white list;
and when the return code does not have the designated parameters, identifying the monitoring link as a risk link, and carrying out risk identification on the monitoring link.
In addition, in order to achieve the above object, the present invention further provides a WEB front-end performance monitoring apparatus, where the WEB front-end performance monitoring apparatus includes:
the WEB front end performance monitoring device comprises:
the construction module is used for constructing a monitoring content display interface when a construction instruction is received;
the setting module is used for displaying the newly added sub-interface and setting the monitoring link and the threshold value of the monitoring parameters corresponding to the monitoring link when receiving the setting instruction;
and the monitoring module is used for establishing an automatic test script according to the monitoring link and the monitoring parameters when a monitoring instruction is received, automatically executing the test script and acquiring return parameters at intervals of a first designated time, and calling a designated tool based on a Python instruction to acquire performance data in the return parameters.
Furthermore, in order to achieve the above object, the present invention further provides an electronic device, which includes a processor and a memory, wherein the processor is configured to execute the following steps when executing the computer program stored in the memory:
when a construction instruction is received, constructing a monitoring content display interface;
when a setting instruction is received, displaying the newly added sub-interface and setting a monitoring link and a threshold value of a plurality of monitoring parameters corresponding to the monitoring link;
when a monitoring instruction is received, an automatic test script is established according to the monitoring link and the monitoring parameters;
automatically executing the test script every other first designated time and acquiring a return parameter;
calling a specified tool based on a Python instruction to obtain the performance data in the return parameter.
In addition, in order to achieve the above object, the present invention further provides a storage medium, which is a computer-readable storage medium and stores at least one instruction, and when the at least one instruction is executed by a processor, the at least one instruction implements the following steps:
when a construction instruction is received, constructing a monitoring content display interface;
when a setting instruction is received, displaying the newly added sub-interface and setting a monitoring link and a threshold value of a plurality of monitoring parameters corresponding to the monitoring link;
when a monitoring instruction is received, an automatic test script is established according to the monitoring link and the monitoring parameters;
automatically executing the test script every other first designated time and acquiring a return parameter;
calling a specified tool based on a Python instruction to obtain the performance data in the return parameter.
According to the WEB front-end performance monitoring method, the WEB front-end performance monitoring device, the electronic equipment and the storage medium, the self-defined monitoring link is adopted, the automatic scanning at regular time is realized, the scanning result is analyzed, the manual operation cost is reduced, and the time is saved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic diagram of a WEB front-end performance monitoring method according to the present invention.
Fig. 2 is a schematic diagram of the monitoring content display interface in fig. 1.
Fig. 3 is a detailed flowchart of step S11 in fig. 1.
Fig. 4 is a detailed flowchart of step S15 in fig. 1.
Fig. 5 is a functional block diagram of the WEB front-end performance monitoring apparatus according to the present invention.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the invention.
Description of the main elements
WEB front end performance monitoring device 1
Building block 10
Monitoring content display interface 200
Display area 201
Search area 203
Edit area 205
Setting module 20
Monitoring module 30
Analysis module 40
Finishing module 50
Report sending module 60
Memory 102
Communication bus 104
Processor 106
The following detailed description will further illustrate the invention in conjunction with the above-described figures.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," and "third," etc. in the description and claims of the present invention and the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "comprises" and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or modules is not limited to the listed steps or modules but may alternatively include other steps or modules not listed or inherent to such process, method, article, or apparatus.
The following describes a specific embodiment of the method for monitoring the performance of the WEB front end according to the present invention with reference to the accompanying drawings.
In at least one embodiment of the present invention, the WEB front-end performance monitoring method is applied to a front-end performance monitoring system composed of at least one electronic device and a server, wherein the electronic device and the server perform data transmission according to a preset Protocol, preferably, the preset Protocol includes, but is not limited to, any one of a HTTP Protocol (Hyper Text Transfer Protocol), a HTTPs Protocol (Hyper Text Transfer Protocol over secure Socket L eye, HTTP Protocol targeted for security), and the like.
Please refer to fig. 1, which is a schematic diagram of a WEB front-end performance monitoring method.
And S10, constructing a monitoring content display interface when the construction instruction is received.
In at least one embodiment of the present invention, the server is a Jenkins persistent integration server. The monitoring content display interface is used for providing a man-machine interaction interface for a user, and the user can be connected to the front-end performance monitoring system through electronic equipment such as a mobile phone or a computer.
In at least one embodiment of the present invention, as shown in fig. 2, the monitoring content display interface includes a display area, a retrieval area, and an editing area. The display area is used for displaying the link website and the threshold value of the related monitoring parameter. The monitoring parameters may include the picture size, the number of the picture size BUGs, the number of JS warnings, the single link loading time, the number of the single link size BUGs, the full loading time, the number of the full loading time BUGs, the number of http requests, and the number of the http requests.
And S11, when the setting instruction is received, displaying the new sub-interface and setting the monitoring link and the threshold value of the plurality of monitoring parameters corresponding to the monitoring link.
In at least one embodiment of the present invention, the new sub-interface includes a monitoring parameter setting area, a black and white list setting area, and a mail setting area.
Referring to fig. 3, in at least one embodiment of the present invention, the step of displaying the new sub-interface and setting the monitoring link and the threshold of the plurality of monitoring parameters corresponding to the new sub-interface further includes:
s111, setting a threshold value of the monitoring parameter;
s112, setting a white list corresponding to the monitoring link and a threshold value of a corresponding parameter of the white list;
and S113, setting mail parameters according to the input of the user in the newly added sub-interface.
In at least one embodiment of the present invention, the parameters corresponding to the white list include more than 1 of the repeat link-return code 200, repeat link existence-ported, repeat link-other, redirection, HTM L file-uncompressed, and Content Delivery Network (CDN).
And S12, when receiving the monitoring instruction, establishing an automatic test script according to the monitoring link and the monitoring parameters.
In at least one embodiment of the invention, the automated test script may include a plurality of test cases.
And S13, automatically executing the test script at intervals of first designated time and acquiring return parameters.
S14, calling a specified tool based on the Python instruction to acquire the performance data in the return parameter.
In at least one embodiment of the present invention, the specifying tool is a plug in.entries in an http watch tool, where the http watch is a powerful webpage data analysis plug-in, and during a browser accessing a webpage, the http watch can record each http (hypertext Transfer Protocol, abbreviation of hypertext Transfer Protocol) request and response time, count the loading time of the whole page, and support to save these loading time data into XM L (Extensible Markup language, abbreviation of Extensible Markup language L schema), CSV (character separation value, abbreviation of Comma-separable variables), and other files.
In at least one embodiment of the present invention, the performance data includes, but is not limited to, a picture file size, a return code, a whole page load time, a whole page request, a JS file, an HTM L file, a CSS file, a cache, and CDN acceleration.
And S15, analyzing and identifying the performance data when the analysis instruction is received.
Referring also to fig. 4, in at least one embodiment of the present invention, the step of analyzing and identifying the performance data may further include:
s151, acquiring a return code in the performance data;
s152, judging whether the return code has specified parameters;
s153, when the return code has the specified parameters, identifying the monitoring link as a trustable link, and incorporating the monitoring link into the white list;
s154, when the return code does not have the designated parameters, identifying the monitoring link as a risk link, and carrying out risk identification on the monitoring link;
s155, obtaining the numerical value of the monitoring parameter in the performance data;
s156, judging whether the numerical value of the monitoring parameter is larger than the threshold value corresponding to the monitoring parameter;
s157, when the numerical value of the monitoring parameter is larger than the threshold value corresponding to the monitoring parameter, identifying that the monitoring link has a problem, and identifying the monitoring link by using a first identifier;
and S158, when the numerical value of the monitoring parameter is less than or equal to the threshold value corresponding to the monitoring parameter, identifying that the performance of the monitoring link is good, and identifying the monitoring link by using a second identifier.
In at least one embodiment of the present invention, the specified parameters may include a first type of specified parameter, a second type of specified parameter, a third type of specified parameter, a fourth type of specified parameter, and a fifth type of specified parameter, wherein the first type of specified parameter is a repeat link return code parameter by detecting whether there are 404, 500, 503 and "abort" characters in the return code, the second type of specified parameter is a redirection parameter by detecting whether there is a value with a beginning of 3 in the return code, the third type of specified parameter is a repeat link-Other parameter by detecting whether there are 200 and an "Other" character in the return code, the fourth type of specified parameter is an HTM L file uncompressed parameter, the fifth type of specified parameter is a CDN acceleration parameter, the first identifier is a font modification of the monitoring link to red, and the second identifier is a font modification of the monitoring link to black.
And S16, when the collection instruction is received, collecting the analysis result of the performance data to form a performance test report.
In at least one embodiment of the invention, the performance test report is stored to a specified server in a specified format. The specified format is a CSV format. The appointed server is a Jenkins continuous integration server.
And S17, sending the performance test report to appointed personnel every other appointed time.
In at least one embodiment of the present invention, all of the above instructions may be data request instructions received by the electronic device. The electronic device may include a keyboard input, a touch screen input, etc., but the user input manner in the example embodiments of the present disclosure is not limited thereto. Can be generated for the user through specific operations on the visual interface. Specifically, the user's operations include, but are not limited to: sliding operation, clicking operation (such as single clicking operation, double clicking operation, etc.). Specifically, the preset key may be an entity key on the electronic device, or may be a virtual key on the electronic device (for example, the virtual key may be a virtual icon on a display of the electronic device, etc.), and the present invention is not limited herein.
According to the WEB front-end performance monitoring method, the automatic scanning is realized at regular time and the scanning result is analyzed through self-defining monitoring links, so that the manual operation cost is reduced, and the time is saved. Meanwhile, the analysis result is sent to relevant personnel after forming a detection report, and the analysis result is displayed in an intuitive form, so that developers can conveniently check the performance of the WEB link in real time.
Referring to fig. 5, the present invention provides a WEB front-end performance monitoring apparatus 1, which is applied to one or more devices. In at least one embodiment of the present invention, the WEB front-end performance monitoring apparatus 1 is applied to a WEB front-end performance monitoring system formed by at least one electronic device and a server. And data transmission is carried out between the electronic equipment and the server according to a preset protocol. The WEB front-end performance monitoring device 1 is used for setting a monitoring link according to the requirement of a user, automatically scanning the performance of the set monitoring link at regular time for monitoring, and displaying the monitoring result to the user after summarizing.
In an embodiment of the present invention, the WEB front-end performance monitoring apparatus 1 includes:
and the building module 10 is configured to build the monitoring content display interface 200 when the building instruction is received.
In at least one embodiment of the present invention, the server is a Jenkins persistent integration server. The monitoring content display interface is used for providing a man-machine interaction interface for a user, and the user can be connected to the front-end performance monitoring system through electronic equipment such as a mobile phone or a computer.
In at least one embodiment of the present invention, the monitoring content presentation interface 200 includes a presentation area 201, a retrieval area 203, and an editing area 205. The display area is used for displaying the link website and the threshold value of the related monitoring parameter. The monitoring parameters may include the picture size, the number of the picture size BUGs, the number of JS warnings, the single link loading time, the number of the single link size BUGs, the full loading time, the number of the full loading time BUGs, the number of http requests, and the number of the http requests.
The setting module 20 is configured to display the new sub-interface and set the monitoring link and the threshold of the plurality of monitoring parameters corresponding to the monitoring link when receiving the setting instruction.
In at least one embodiment of the present invention, the new sub-interface includes a monitoring parameter setting area, a black and white list setting area, and a mail setting area.
The setting module 20 further sets a threshold of the monitoring parameter, sets a white list corresponding to the monitoring link and a threshold of a corresponding parameter thereof, and sets a mail parameter according to an input of the user in the new sub-interface.
In at least one embodiment of the present invention, the parameters corresponding to the white list include more than 1 of the repeat link-return code 200, repeat link existence-ported, repeat link-other, redirection, HTM L file-uncompressed, and Content Delivery Network (CDN).
And the monitoring module 30 is configured to establish an automatic test script according to the monitoring link and the monitoring parameter when receiving a monitoring instruction, automatically execute the test script and obtain a return parameter at intervals of the first specified time, and call a specified tool based on a Python instruction to obtain performance data in the return parameter.
In at least one embodiment of the present invention, the automatic test script may include a plurality of test cases, where the specified tool is plug-in http watch tool, where http watch is a powerful web page data analysis plug-in, and during the process of accessing a web page by a browser, it may record each http (HyperText Transfer Protocol) request and response time, count the loading time of the whole page, and support to save these loading time data into XM L (Extensible Markup language, abbreviated to Extensible Markup L) file, CSV (character separation value, abbreviated to Comma-Separated Values), etc. in this embodiment, the first specified time may be set by user according to the user's requirements.
In at least one embodiment of the present invention, the performance data includes, but is not limited to, a picture file size, a return code, a whole page load time, a whole page request, a JS file, an HTM L file, a CSS file, a cache, and CDN acceleration.
And the analysis module 40 is used for analyzing and identifying the performance data when an analysis instruction is received.
The analysis module 40 further obtains a return code in the performance data and determines whether the return code has a specified parameter. When the return code has the specified parameter, the analysis module 40 identifies the monitoring link as a trusted link, and includes the monitoring link in the white list. When the return code does not have the designated parameter, the analysis module 40 identifies the monitoring link as a risk link, and performs risk identification on the monitoring link.
The analysis module 40 further obtains the value of the monitoring parameter in the performance data and determines whether the value of the monitoring parameter is greater than the threshold corresponding to the monitoring parameter. When the value of the monitoring parameter is greater than the threshold corresponding to the monitoring parameter, it is identified that the monitoring link has a problem, and the analysis module 40 further identifies the monitoring link by using a first identifier. When the value of the monitoring parameter is less than or equal to the threshold corresponding to the monitoring parameter, it is identified that the performance of the monitoring link is good, and the analysis module 40 further identifies the monitoring link by using a second identifier.
In at least one embodiment of the present invention, the specified parameters may include a first type of specified parameter, a second type of specified parameter, a third type of specified parameter, a fourth type of specified parameter, and a fifth type of specified parameter, wherein the first type of specified parameter is a repeat link return code parameter by detecting whether there are 404, 500, 503 and "abort" characters in the return code, the second type of specified parameter is a redirection parameter by detecting whether there is a value with a beginning of 3 in the return code, the third type of specified parameter is a repeat link-Other parameter by detecting whether there are 200 and an "Other" character in the return code, the fourth type of specified parameter is an HTM L file uncompressed parameter, the fifth type of specified parameter is a CDN acceleration parameter, the first identifier is a font modification of the monitoring link to red, and the second identifier is a font modification of the monitoring link to black.
And a collecting module 50, configured to collect the analysis result of the performance data to form a performance test report when a collecting instruction is received.
In at least one embodiment of the invention, the performance test report is stored to a specified server in a specified format. The specified format is a CSV format. The appointed server is a Jenkins continuous integration server.
And a report sending module 60, configured to send the performance test report to a designated person every second designated time.
The WEB front-end performance monitoring device realizes timing automatic scanning and analysis of scanning results through self-defined monitoring links, reduces the manual operation cost and saves time. Meanwhile, the analysis result is sent to relevant personnel after forming a detection report, and the analysis result is displayed in an intuitive form, so that developers can conveniently check the performance of the WEB link in real time.
Please refer to fig. 6, which is a schematic diagram of an electronic device according to an embodiment of the present invention. The electronic device includes a processor 106, a memory 102, and a communication bus 104.
The memory 102 is used to store program code. The Memory 102 may be a circuit without any physical form in the integrated circuit and having a Memory function, such as a RAM (Random-Access Memory), a FIFO (First in First Out), and the like. Alternatively, the memory 102 may be a memory in a physical form, such as a memory device including a memory stick, a TF Card (Trans-flash Card), a smart media Card (smart media Card), a secure digital Card (secure digital Card), and a flash memory Card (flash Card). The memory 102 may be in data communication with the processor 106 via a communication bus 104. The memory 102 may include an operating system, a network communication module, and a WEB front-end performance monitoring program. The operating system is a program for managing and controlling hardware and software resources of the electronic equipment and supports the operation of a WEB front-end performance monitoring program and other software and/or programs. The network communication module is used for realizing communication among components in the memory 102 and communication with other hardware and software in the WEB front-end performance monitoring equipment.
The processor 106 may include one or more microprocessors, digital processors. The processor 106 may call program code stored in the memory 102 to perform the associated functions. For example, the modules illustrated in fig. 5 are program codes stored in the memory 102 and executed by the processor 106 to implement a WEB front-end performance monitoring method. The processor 106 is also called a Central Processing Unit (CPU), and is an ultra-large scale integrated circuit, which is an operation Core (Core) and a Control Core (Control Unit).
The processor 106 is configured to execute a plurality of computer instructions stored in the memory 102 to implement a WEB front-end performance monitoring method, and the processor 106 may execute a plurality of instructions to implement the following steps:
and S10, constructing a monitoring content display interface when the construction instruction is received.
In at least one embodiment of the present invention, the server is a Jenkins persistent integration server. The monitoring content display interface is used for providing a man-machine interaction interface for a user, and the user can be connected to the front-end performance monitoring system through electronic equipment such as a mobile phone or a computer.
In at least one embodiment of the present invention, as shown in fig. 2, the monitoring content display interface includes a display area, a retrieval area, and an editing area. The display area is used for displaying the link website and the threshold value of the related monitoring parameter. The monitoring parameters may include the picture size, the number of the picture size BUGs, the number of JS warnings, the single link loading time, the number of the single link size BUGs, the full loading time, the number of the full loading time BUGs, the number of http requests, and the number of the http requests.
And S11, when the setting instruction is received, displaying the new sub-interface and setting the monitoring link and the threshold value of the plurality of monitoring parameters corresponding to the monitoring link.
In at least one embodiment of the present invention, the new sub-interface includes a monitoring parameter setting area, a black and white list setting area, and a mail setting area.
Referring to fig. 3, in at least one embodiment of the present invention, the step of displaying the new sub-interface and setting the monitoring link and the threshold of the plurality of monitoring parameters corresponding to the new sub-interface further includes:
s111, setting a threshold value of the monitoring parameter;
s112, setting a white list corresponding to the monitoring link and a threshold value of a corresponding parameter of the white list;
and S113, setting mail parameters according to the input of the user in the newly added sub-interface.
In at least one embodiment of the present invention, the parameters corresponding to the white list include more than 1 of the repeat link-return code 200, repeat link existence-ported, repeat link-other, redirection, HTM L file-uncompressed, and Content Delivery Network (CDN).
And S12, when receiving the monitoring instruction, establishing an automatic test script according to the monitoring link and the monitoring parameters.
In at least one embodiment of the invention, the automated test script may include a plurality of test cases.
And S13, automatically executing the test script at intervals of first designated time and acquiring return parameters.
S14, calling a specified tool based on the Python instruction to acquire the performance data in the return parameter.
In at least one embodiment of the present invention, the specifying tool is a plug in.entries in an http watch tool, where the http watch is a powerful webpage data analysis plug-in, and during a browser accessing a webpage, the http watch can record each http (hypertext Transfer Protocol, abbreviation of hypertext Transfer Protocol) request and response time, count the loading time of the whole page, and support to save these loading time data into XM L (Extensible Markup language, abbreviation of Extensible Markup language L schema), CSV (character separation value, abbreviation of Comma-separable variables), and other files.
In at least one embodiment of the present invention, the performance data includes, but is not limited to, a picture file size, a return code, a whole page load time, a whole page request, a JS file, an HTM L file, a CSS file, a cache, and CDN acceleration.
And S15, analyzing and identifying the performance data when the analysis instruction is received.
Referring also to fig. 4, in at least one embodiment of the present invention, the step of analyzing and identifying the performance data may further include:
s151, acquiring a return code in the performance data;
s152, judging whether the return code has specified parameters;
s153, when the return code has the specified parameters, identifying the monitoring link as a trustable link, and incorporating the monitoring link into the white list;
s154, when the return code does not have the designated parameters, identifying the monitoring link as a risk link, and carrying out risk identification on the monitoring link;
s155, obtaining the numerical value of the monitoring parameter in the performance data;
s156, judging whether the numerical value of the monitoring parameter is larger than the threshold value corresponding to the monitoring parameter;
s157, when the numerical value of the monitoring parameter is larger than the threshold value corresponding to the monitoring parameter, identifying that the monitoring link has a problem, and identifying the monitoring link by using a first identifier;
and S158, when the numerical value of the monitoring parameter is less than or equal to the threshold value corresponding to the monitoring parameter, identifying that the performance of the monitoring link is good, and identifying the monitoring link by using a second identifier.
In at least one embodiment of the present invention, the specified parameters may include a first type of specified parameter, a second type of specified parameter, a third type of specified parameter, a fourth type of specified parameter, and a fifth type of specified parameter, wherein the first type of specified parameter is a repeat link return code parameter by detecting whether there are 404, 500, 503 and "abort" characters in the return code, the second type of specified parameter is a redirection parameter by detecting whether there is a value with a beginning of 3 in the return code, the third type of specified parameter is a repeat link-Other parameter by detecting whether there are 200 and an "Other" character in the return code, the fourth type of specified parameter is an HTM L file uncompressed parameter, the fifth type of specified parameter is a CDN acceleration parameter, the first identifier is a font modification of the monitoring link to red, and the second identifier is a font modification of the monitoring link to black.
And S16, when the collection instruction is received, collecting the analysis result of the performance data to form a performance test report.
In at least one embodiment of the invention, the performance test report is stored to a specified server in a specified format. The specified format is a CSV format. The appointed server is a Jenkins continuous integration server.
And S17, sending the performance test report to appointed personnel every other appointed time.
When the WEB front-end performance monitoring method is operated, the storage medium realizes timing automatic scanning and analysis of scanning results by self-defining monitoring links, so that the manual operation cost is reduced, and the time is saved. Meanwhile, the analysis result is sent to relevant personnel after forming a detection report, and the analysis result is displayed in an intuitive form, so that developers can conveniently check the performance of the WEB link in real time.
According to the embodiment, the performance monitoring method for the WEB front end adopts the Nginx as the load balancer, so that the user can be prevented from re-inputting the user information in the switching process of the application environments, and the gray application environment, the main application environment and the backup application environment are distinguished, so that pre-release and quick rollback can be better realized, the workload is less, and the manual intervention is reduced.
The invention also provides a storage medium. The storage medium is a computer-readable storage medium. The computer readable storage medium has stored thereon computer instructions. The computer instructions may be stored in the memory 102, and when executed by the one or more processors 106, may implement the WEB front-end performance monitoring method according to the above method embodiments, such as S10-S17 shown in fig. 1, which is not described herein again.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and in actual implementation, there may be other divisions, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or modules through some interfaces, and may be in an electrical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processor, or each module may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention.
It should also be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A WEB front end performance monitoring method is characterized by comprising the following steps:
when a construction instruction is received, constructing a monitoring content display interface;
when a setting instruction is received, displaying the newly added sub-interface and setting a monitoring link and a threshold value of a plurality of monitoring parameters corresponding to the monitoring link;
when a monitoring instruction is received, an automatic test script is established according to the monitoring link and the monitoring parameters;
automatically executing the test script every other first designated time and acquiring a return parameter;
calling a specified tool based on a Python instruction to obtain the performance data in the return parameter.
2. The WEB front-end performance monitoring method according to claim 1, wherein the specifying tool is a plugin. entries in an HTTPwatch tool.
3. The WEB front-end performance monitoring method according to claim 1, wherein the WEB front-end performance monitoring method further comprises:
setting a white list corresponding to the monitoring link and a threshold value of a corresponding parameter of the white list;
the new adding sub-interface comprises a white list setting area; the white list setting area is used for setting a threshold value of the parameter corresponding to the white list.
4. The WEB front-end performance monitoring method according to any one of claims 1 to 3, wherein the WEB front-end performance monitoring method further comprises:
when an analysis instruction is received, analyzing and identifying the performance data;
when a collection instruction is received, collecting the analysis result of the performance data to form a performance test report;
and sending the performance test report to appointed personnel every other second appointed time.
5. The WEB front-end performance monitoring method according to claim 3, wherein the performance test report is sent to a designated person by a designated mail; the specified mail comprises a plurality of mail parameters; the WEB front end performance monitoring method further comprises the following steps:
setting the mail parameters according to the input of the user in the newly added sub-interface; the newly added sub-interface comprises a mail setting area; the mail setting area is used for setting the mail parameters.
6. The WEB front-end performance monitoring method according to claim 3, wherein the step of analyzing and identifying the performance data comprises:
obtaining values of the monitoring parameters in the performance data;
judging whether the numerical value of the monitoring parameter is larger than a threshold value corresponding to the monitoring parameter;
when the numerical value of the monitoring parameter is larger than the threshold value corresponding to the monitoring parameter, identifying that the monitoring link has a problem, and identifying the monitoring link by using a first identifier;
and when the numerical value of the monitoring parameter is less than or equal to the threshold value corresponding to the monitoring parameter, identifying that the performance of the monitoring link is good, and identifying the monitoring link by using a second identifier.
7. The WEB front-end performance monitoring method according to claim 6, wherein the step of obtaining the values of the monitoring parameters in the performance data further comprises:
acquiring a return code in the performance data;
judging whether the return code has a specified parameter;
when the return code has the specified parameters, identifying the monitoring link as a trustable link, and incorporating the monitoring link into the white list;
and when the return code does not have the designated parameters, identifying the monitoring link as a risk link, and carrying out risk identification on the monitoring link.
8. A WEB front end performance monitoring device, characterized in that the WEB front end performance monitoring device comprises:
the construction module is used for constructing a monitoring content display interface when a construction instruction is received;
the setting module is used for displaying the newly added sub-interface and setting the monitoring link and the threshold value of the monitoring parameters corresponding to the monitoring link when receiving the setting instruction;
and the monitoring module is used for establishing an automatic test script according to the monitoring link and the monitoring parameters when a monitoring instruction is received, automatically executing the test script and acquiring return parameters at intervals of a first designated time, and calling a designated tool based on a Python instruction to acquire performance data in the return parameters.
9. An electronic device, wherein the electronic device comprises a processor and a memory, and the processor is configured to implement the WEB front-end performance monitoring method according to any one of claims 1 to 7 when executing the computer program stored in the memory.
10. A storage medium, characterized in that the storage medium is a computer-readable storage medium, and stores at least one instruction, and the at least one instruction is executed by a processor to implement the WEB front-end performance monitoring method according to any one of claims 1 to 7.
CN202010113188.6A 2020-02-24 2020-02-24 WEB front-end performance monitoring method and device, electronic equipment and storage medium Pending CN111459792A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010113188.6A CN111459792A (en) 2020-02-24 2020-02-24 WEB front-end performance monitoring method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010113188.6A CN111459792A (en) 2020-02-24 2020-02-24 WEB front-end performance monitoring method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111459792A true CN111459792A (en) 2020-07-28

Family

ID=71679190

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010113188.6A Pending CN111459792A (en) 2020-02-24 2020-02-24 WEB front-end performance monitoring method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111459792A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112631868A (en) * 2020-12-28 2021-04-09 浙江中控技术股份有限公司 Performance monitoring method and device of CentOS system
CN114785723A (en) * 2022-04-07 2022-07-22 平安资产管理有限责任公司 Performance monitoring method and system of web system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104581806A (en) * 2014-12-19 2015-04-29 联动优势电子商务有限公司 Method and terminal for monitoring service system
CN104750471A (en) * 2013-12-30 2015-07-01 上海格尔软件股份有限公司 WEB page performance detection and analysis plug-in and method based on browser

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104750471A (en) * 2013-12-30 2015-07-01 上海格尔软件股份有限公司 WEB page performance detection and analysis plug-in and method based on browser
CN104581806A (en) * 2014-12-19 2015-04-29 联动优势电子商务有限公司 Method and terminal for monitoring service system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
佚名: "利用python和httpwatch实现自动监控网页", pages 1 - 2, Retrieved from the Internet <URL:http://www.javashuo.com/article/p-aqpchnve-bd.html> *
李琰: "Web性能自动化测试和监控PerfHub的设计与实现", 中国优秀硕士学位论文全文数据库 信息科技辑, no. 2015, 15 December 2015 (2015-12-15), pages 138 - 102 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112631868A (en) * 2020-12-28 2021-04-09 浙江中控技术股份有限公司 Performance monitoring method and device of CentOS system
CN112631868B (en) * 2020-12-28 2023-06-16 浙江中控技术股份有限公司 Performance monitoring method and device of CentOS system
CN114785723A (en) * 2022-04-07 2022-07-22 平安资产管理有限责任公司 Performance monitoring method and system of web system

Similar Documents

Publication Publication Date Title
CN109683953B (en) Method and device for processing configuration file based on visual interface
CN111130987A (en) Automatic acquisition method and device for AWR report, electronic equipment and storage medium
CN106815524B (en) Malicious script file detection method and device
CN109981322B (en) Method and device for cloud resource management based on label
CN110874307B (en) Method and device for collecting and reporting event buried points
CN112685671A (en) Page display method, device, equipment and storage medium
CN110196790A (en) The method and apparatus of abnormal monitoring
CN111459792A (en) WEB front-end performance monitoring method and device, electronic equipment and storage medium
CN112631924A (en) Automatic testing method and device, computer equipment and storage medium
CN107766224B (en) Test method and test device
CN115033876A (en) Log processing method, log processing device, computer device and storage medium
US20220245120A1 (en) Automated generation of audit log with application-level metadata using replication log of a database
CN113821254A (en) Interface data processing method, device, storage medium and equipment
CN113157480A (en) Error information processing method, device, storage medium and terminal
CN113821406A (en) Method, device and equipment for monitoring webpage and storage medium
CN109684156B (en) Monitoring method, device, terminal and storage medium based on mixed mode application
CN116204428A (en) Test case generation method and device
CN113515715B (en) Buried point event code generation method, buried point event code processing method and related equipment
CN115328764A (en) Test code optimization method based on automatic test and related equipment thereof
CN111796878B (en) Resource splitting and loading method and device applied to single-page application
KR102198789B1 (en) Server for generating integrated usage log data and operating method thereof
CN114329149A (en) Detection method and device for automatically capturing page information, electronic equipment and readable storage medium
CN112003833A (en) Abnormal behavior detection method and device
CN112417324A (en) Chrome-based URL (Uniform resource locator) interception method and device and computer equipment
CN116720023B (en) Browser operation data processing method and device and electronic equipment

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