CN117573491A - Positioning method, device, equipment and storage medium for performance bottleneck - Google Patents

Positioning method, device, equipment and storage medium for performance bottleneck Download PDF

Info

Publication number
CN117573491A
CN117573491A CN202311528295.5A CN202311528295A CN117573491A CN 117573491 A CN117573491 A CN 117573491A CN 202311528295 A CN202311528295 A CN 202311528295A CN 117573491 A CN117573491 A CN 117573491A
Authority
CN
China
Prior art keywords
running
module
time period
performance bottleneck
log
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
CN202311528295.5A
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.)
Beijing Youtejie Information Technology Co ltd
Original Assignee
Beijing Youtejie Information Technology 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 Beijing Youtejie Information Technology Co ltd filed Critical Beijing Youtejie Information Technology Co ltd
Priority to CN202311528295.5A priority Critical patent/CN117573491A/en
Publication of CN117573491A publication Critical patent/CN117573491A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • G06F11/3419Recording 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 by assessing time
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses a positioning method, a positioning device, positioning equipment and a storage medium for performance bottlenecks. The method comprises the following steps: collecting each running log in real time, and carrying out structural analysis on each running log to obtain service module information of a running log set in a target time period; analyzing each running log to obtain the running time matched with each running log, and sequencing each running log according to the length of the running time; searching the information of each historical time period of the target number matched with the target time period in the historical running time set, and judging whether performance bottlenecks exist in the target time period or not based on the information of each historical time period and the running time of each running log after sequencing; and when judging that the performance bottleneck exists, positioning the position of the performance bottleneck according to the service module information. By the technical scheme, the position of the performance bottleneck can be positioned based on the operation log, the resource consumption of the performance bottleneck positioning work is reduced, and the efficiency and the accuracy of the performance bottleneck positioning are improved.

Description

Positioning method, device, equipment and storage medium for performance bottleneck
Technical Field
The present invention relates to the field of data processing, and in particular, to a method, an apparatus, a device, and a storage medium for locating a performance bottleneck.
Background
App, an application, is typically made up of a series of functional modules, each of which is served externally by a series of Web pages, API interfaces.
Because of the requirement of high availability, the functional modules are usually deployed in multiple virtual machines or containers in a distributed cluster manner, and the operation and maintenance problems caused by unavailable or bad user access service may be a client problem of a certain user, a problem of a certain functional module, a problem of an entire App, an application program, or a problem of an operating environment such as a virtual machine and a container.
At present, when the performance bottleneck of the operation and maintenance problem is located, one-to-one monitoring is performed on each functional module used by a user, after operation information of all users is collected, the slowest operation is analyzed according to the use condition of each function by the user, finally, the performance bottleneck is analyzed and checked one by one according to indexes, the method is low in locating speed and locating accuracy of the performance bottleneck, and the consumption of system resources is increased in a one-to-one monitoring mode on the functional modules of the user, so that the user equipment cannot exert the maximum performance, and performance and resource waste and other conditions are caused.
Disclosure of Invention
The invention provides a method, a device, equipment and a storage medium for positioning performance bottlenecks, which can solve the problems of high resource consumption and low efficiency and accuracy of performance bottleneck positioning work when positioning the performance bottlenecks in the prior art.
In a first aspect, an embodiment of the present invention provides a method for positioning a performance bottleneck, where the method includes:
collecting each running log in real time, and carrying out structural analysis on each running log to obtain service module information of a running log set in a target time period; the service module information comprises module calling relations in a target time period, calling times of each module calling relation and module structure information;
analyzing each running log to obtain the running time matched with each running log, and sequencing each running log according to the length of the running time;
searching the information of each historical time period of the target number matched with the target time period in the historical running time set, and judging whether performance bottlenecks exist in the target time period or not based on the information of each historical time period and the running time of each running log after sequencing;
And when judging that the performance bottleneck exists, positioning the position of the performance bottleneck according to the service module information.
In a second aspect, an embodiment of the present invention provides a positioning device for a performance bottleneck, where the device includes:
the system comprises an operation log collection module, a service module information acquisition module and a control module, wherein the operation log collection module is used for collecting each operation log in real time and carrying out structural analysis on each operation log to obtain service module information of an operation log set in a target time period; the service module information comprises module calling relations in a target time period, calling times of each module calling relation and module structure information;
the running log sorting module is used for obtaining the running time matched with each running log by analyzing each running log and sorting each running log according to the length of the running time;
the performance bottleneck judging module is used for searching the information of each historical time period of the target number matched with the target time period in the historical running time set and judging whether the performance bottleneck exists in the target time period or not based on the information of each historical time period and the running time of each running log after sequencing;
and the performance bottleneck positioning module is used for positioning the position of the performance bottleneck according to the service module information when judging that the performance bottleneck exists.
In a third aspect, an embodiment of the present invention provides an electronic device, including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform a performance bottleneck localization method according to any one of the embodiments of the present invention.
In a fourth aspect, an embodiment of the present invention provides a computer readable storage medium, where computer instructions are stored, where the computer instructions are configured to cause a processor to execute a method for positioning a performance bottleneck according to any one of the embodiments of the present invention.
According to the technical scheme, the service module information of the operation log set in the target time period is obtained by collecting the operation logs in real time and carrying out structural analysis on the operation logs, then the operation time matched with the operation logs is obtained by analyzing the operation logs, the operation logs are ordered according to the length of the operation time, then the history time period information of the target number matched with the target time period is searched in the history operation time set, whether the performance bottleneck exists in the target time period is judged based on the history time period information and the operation time of the ordered operation logs, and finally when the performance bottleneck exists, the position of the performance bottleneck is positioned according to the service module information, so that the problems that the resource consumption of the performance bottleneck positioning work is high, the efficiency and the accuracy of the performance bottleneck positioning are low in the positioning of the performance bottleneck in the prior art are solved, the resource consumption of the performance bottleneck positioning work is reduced based on the position of the operation logs, and the efficiency and the accuracy of the performance bottleneck positioning work are improved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for locating a performance bottleneck according to a first embodiment of the present invention;
FIG. 2 is a flowchart of a method for locating a performance bottleneck according to a second embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a positioning device for performance bottlenecks according to a third embodiment of the invention;
fig. 4 is a schematic structural diagram of an electronic device implementing a positioning method for a performance bottleneck according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a positioning method for a performance bottleneck according to an embodiment of the present invention, where the method may be performed by a positioning device for a performance bottleneck, and the positioning device for a performance bottleneck may be implemented in hardware and/or software, and the positioning device for a performance bottleneck may be configured in a terminal or a server having a performance bottleneck positioning function.
As shown in fig. 1, the method includes:
s110, collecting each running log in real time, and carrying out structural analysis on each running log to obtain service module information of a running log set in a target time period.
The service module information comprises a module calling relation in a target time period, calling times of each module calling relation and module structure information.
The module calling relation can be a calling relation obtained by sequencing all service modules called by a certain thread of the current interface for executing thread service in a target time period according to a calling sequence; for example, if the current thread first responds to a call command to the thread when completing the current service, then the static module calls the packages module, the bootstrap module is called by the packages module, then the bootstrap module calls newcss, and finally the newcss module calls bootstrap. Css to complete the current service, then the module call relationship is: static-assets-bootstrap-newcss-bootstrap. Css; it should be noted that the above situation is only one specific implementation scenario provided in this embodiment, and in practical application, the module call relationship is determined by the practical situation of the thread implementation service, which is not limited in this embodiment.
Further, in the target time period, there may be a case of calling a plurality of service modules, that is, there are a plurality of module calling relationships or the same module calling relationship is called a plurality of times in the target time period, where the number of times each module calling relationship is called is the number of times each module calling relationship is called.
The module structure information is determined by the access behavior of the current module; specifically, if only out characteristics appear in all access behaviors of the current module, module structure information of the module is assigned as out type; if only in characteristics appear in all access behaviors of the current module, assigning the module structure information of the module as in type; if in and out values appear in all the access behaviors of the current module at the same time, the module structure information of the current module is assigned as in/out type; further, the module structure information may be obtained by analyzing each running log according to the access behavior of the current module.
Wherein, each operation log is collected in real time specifically comprises: all log files generated through a specific interface in a target time period are collected.
Specifically, the performing structural analysis on each running log to obtain service module information of the running log set in the target time period includes: judging whether each running log is in a standard coding format or not, and converting the running log in a non-standard coding format into the standard coding format based on a preset model; performing word segmentation on the running logs in each standard coding format based on a preset rule to obtain each standard word segmentation matched with each running log; and layering the standard word according to the position sequence of the standard word in each running log, and obtaining a module calling relation matched with the running log according to the layering result.
S120, obtaining the running time matched with each running log by analyzing each running log, and sequencing each running log according to the length of the running time.
The running time of each running log can be regarded as the total time from creation to editing of the current log file; further, the running time of the running log may be obtained by analyzing the specific data content of the current running log, and the running time corresponding to the obtained running log according to the data content of the running log is mature prior art, which is not described in detail in this embodiment.
S130, searching the historical time period information of the target number matched with the target time period in the historical operation time set, and judging whether performance bottlenecks exist in the target time period or not based on the historical time period information and the operation time of each ordered operation log.
Wherein the performance bottleneck may be a performance defect of the software or the system; for example, a developer develops a payment processing program, and discovers that when the payment processing program processes a concurrent payment request sent by a user, the payment processing program can only perform serial processing and cannot perform parallel processing, so that the processing response time of a payment transaction is very long, and then the performance bottleneck can be considered to appear on an application program.
In this embodiment, specifically, the historical time set includes a plurality of historical time periods and historical time values that match each of the historical time periods.
Wherein determining whether a performance bottleneck exists in the target time period based on the historical time period information and the running time of the ordered running logs comprises: analyzing the information of each historical time period to obtain each historical time value matched with each historical time period; extracting a target time value matched with the target time period based on the running time of each running log; calculating the ratio of the target time value to each historical time value respectively, and judging whether the target historical time value with the ratio exceeding a preset threshold range exists or not; and counting the number of target historical time values with the ratio exceeding a preset threshold range when judging that the historical time values with the ratio exceeding the preset threshold range exist, and judging that the performance bottleneck exists in the target time period when the number of the target historical time values exceeds the threshold value.
Illustratively, after sequencing the running logs according to the length of the running time, extracting the median of the running time corresponding to all the running logs according to a preset rule as a target time value; after that, if the target time period is 2023, 11, 3, and 09:00-09:05, searching for 31 segments from 2023, 10, 3, 09:00-09:05 to 2023, 11, 2, 09:00-09:05 in the historical time set as the historical time period; respectively matching 31 historical time values matched with the 31 historical time periods in the historical time set, respectively calculating the ratio of the target time value to each historical time value, and judging whether the target historical time value with the ratio exceeding a preset threshold range exists or not; and counting the number of target historical time values with the ratio exceeding a preset threshold range when judging that the historical time values with the ratio exceeding the preset threshold range exist, and judging that the performance bottleneck exists in the target time period when the number of the target historical time values exceeds the threshold value.
Optionally, after sequencing the running logs according to the length of the running time, the preset rule may be manually adjusted according to the actual accuracy requirement; illustratively, in addition to extracting the median of the running times corresponding to all the running logs as the target time value, it may be: the running time corresponding to the running log ranked 500 is set as the target time value, etc., which is not limited in this embodiment.
Optionally, in this embodiment, after each running log is ordered according to the length of the running time, the running time corresponding to a certain running log may be extracted as the historical time value corresponding to the target time period according to a preset rule; for example, if the current target time period is 2023, 11, 3, 09, 00-09, 05, and a specific log running time corresponding to the time period extracted according to a preset rule is 0.003, the target time period 2023, 11, 3, 09, 00-09, 05 is updated to a historical time period, and 0.003 is updated to a historical time value matched with the historical time period and stored in a historical time set.
The method comprises the steps of respectively calculating the ratio of a target time value to each historical time value, and judging whether the target historical time value with the ratio exceeding a preset threshold range exists or not; counting the number of target historical time values with the ratio exceeding a preset threshold range when judging that the historical time values with the ratio exceeding the preset threshold range exist, and judging that the performance bottleneck exists in the target time period when the number of the target historical time values exceeds the threshold value, wherein the step of judging that the performance bottleneck exists in the target time period comprises the following steps:
Wherein the threshold value can be set and adjusted manually, which is typically defined as 3 in the prior art. In a specific implementation manner of this embodiment, the threshold range of the ratio is set to be 3, the threshold number of the historical time values is set to be 3, and the current target time period is as follows: 1000 requests are generated in the time period of 2023, 10, 7, 9:00-9:05, the target time value corresponding to the target time period obtained according to the preset rule is 0.003, and the historical time period is as follows: from day 9 of 2023, day 6 of 9 to day 10 of 2023, day 9:00-9:05, 30 historical time values respectively matching the 30 historical time periods can be obtained through a historical time set; and if more than 3 preset threshold values exist in the 30 historical time values and are smaller than or equal to 0.001, namely more than 3 historical time values with the ratio to the target time value exceeding the preset threshold value range 3 exist in the 30 historical time values, triggering a performance bottleneck alarm and judging that the performance bottleneck occurs.
And S140, when judging that the performance bottleneck exists, positioning the position of the performance bottleneck according to the service module information.
Specifically, when it is determined that a performance bottleneck exists, locating a location of the performance bottleneck according to the service module information includes: sequencing the calling relations of the modules according to the calling times of the calling relations of the modules in the service module information; and identifying the module calling relation with the largest calling times and outputting the module calling relation as a positioning result of the performance bottleneck.
The method includes the steps that after a module calling relation with the largest calling times is identified and output as a positioning result of a performance bottleneck, all running logs matched with the module calling relation can be obtained, data content of the running logs is analyzed through a preset model, ISP, region and terminal types of access sources of the running logs corresponding to the performance bottleneck can be obtained, three attribute fields, grouping ranking statistics are carried out, and affected client or server characteristics when the performance bottleneck occurs are positioned; wherein the ISP is used for locating which operator is affected, including the value ranges of Unicom, telecom, att.com, verizon.com and the like; the region is used for locating which city is affected, and comprises the value ranges of los Angeles, jincheng, nanjing, beijing and the like; the terminal type is used for locating which type of client or server is affected, and the terminal type comprises a value range of Windows7, windows10, android, iOS and the like; further, the method for grouping ranking statistics specifically may be: and taking a running log related to the performance bottleneck in a corresponding target time period, arranging the running log in descending order of up stream_resp_time field values based on the file content of the running log, and grouping and counting the ranking according to the three fields of ISP, region and terminal types, wherein the top 10 statistics values are the characteristic distribution of the client or the server generated by the performance bottleneck, namely the positioning result of the performance bottleneck.
In this embodiment, optionally, after identifying the module calling relationship with the largest calling number as the positioning result of the performance bottleneck, the method further includes: analyzing the positioning result, generating a module influence report matched with the positioning result, and pushing the module influence report to display equipment for display; and: based on the module structure information matched with the positioning result, generating an external providing mode report and pushing the report to display equipment for display.
The module influence report can display that the module calling relation with the performance bottleneck can influence other modules; the external providing mode report can display the types of access behaviors influenced by the modules with the matched module calling relations of the performance bottleneck, and is convenient for related personnel to maintain the modules with the matched module calling relations according to the positioning of the performance bottleneck.
According to the technical scheme, the service module information of the operation log set in the target time period is obtained by collecting the operation logs in real time and carrying out structural analysis on the operation logs, then the operation time matched with the operation logs is obtained by analyzing the operation logs, the operation logs are ordered according to the length of the operation time, then the history time period information of the target number matched with the target time period is searched in the history operation time set, whether the performance bottleneck exists in the target time period is judged based on the history time period information and the operation time of the ordered operation logs, and finally when the performance bottleneck exists, the position of the performance bottleneck is positioned according to the service module information, so that the resource consumption of the performance bottleneck positioning work is reduced, and the efficiency and the accuracy of the performance bottleneck positioning are improved.
Example two
Fig. 2 is a flowchart of a positioning method for performance bottlenecks according to a second embodiment of the present invention, which is based on the foregoing embodiment, and in this embodiment, specifically, a method for performing structural analysis on each operation log to obtain service module information of an operation log set in a target period of time is refined.
As shown in fig. 2, the method includes:
s210, collecting each running log in real time, judging whether each running log is in a standard coding format, and converting the running log in a non-standard coding format into the standard coding format based on a preset model.
Specifically, the URL information in the running log may have three situations of normal encoding, URL encoding and Base64 encoding, and in this embodiment, the normal encoding is set to be a standard format encoding; further, when the running log is detected to be URL encoded, converting the non-standard encoding format into a standard encoding format based on a URLdecode function; further, when the running log is detected to be Base64 coded, the non-standard coding format is converted into a standard coding format based on a Base64 function.
S220, word segmentation is carried out on the running logs in the standard coding formats based on preset rules, and standard word segmentation matched with the running logs is obtained.
It should be appreciated by those skilled in the art that the normal code is a structure comprising "/string"/, ", string", there is at least one structure content; further, when the running logs in the standard coding formats are segmented based on preset rules, word segmentation processing is carried out according to the mark of '/', and the word sequence number after each word segmentation is marked; for example, if the specific data content of a certain row of the running log is: request_path=/static/packages/bootstrap/newcss/bootstrap. Css, the word segmentation process is performed according to the "/" mark, and each standard word segmentation result obtained after the word sequence number is marked is: req_l1=static; req_l2=assets; req_l3=boottrap; req_l4=newcss;
req_L5=bootstrap.css。
s230, layering the standard word fragments based on the position sequence of the standard word fragments in the running logs, and obtaining a module calling relation matched with the running logs based on layering results.
Optionally, after layering the standard word according to the position sequence of the standard word in each running log and obtaining the module calling relation matched with the running log according to the layering result, the method further includes: and according to all module calling relations of all running logs, acquiring the calling times of each module calling relation corresponding to the running log set in an aggregation mode.
In this embodiment, before layering the standard word according to the position order of the standard word in each running log and obtaining the module calling relationship matched with the running log according to the layering result, the method further includes: and filtering and re-layering the standard word fragments based on preset rules.
Specifically, on the basis of the above steps, when the L1 field value is a domain name structure (e.g., liuxiaodo. U. Rizhiyi. Com) or an IP address, the L1 field value is expressed as a service name provided externally, and the subsequent L1 field value is divided into layers without participating in the deduction calculation of the service module level, that is, L2 is changed into L1, L3 is changed into L2, and L4 is changed into L3; for example, if the current word segmentation result is req_l1=liuxiaodo.u.rizhiyi.com; req_l2=assets; req_l3=boottrap; req_l4=newcss; req_l5=bootstrap.css, then the new layering result obtained after filtering and re-layering is req_l1=assets; req_l2=boottrap; req_l3=newcss;
req_L4=bootstrap.css。
further, on the basis of the filtering and re-layering, if the non-L1 field accords with the preset characteristics, judging the current layering as a leaf node, deleting the layering, and after extracting the module calling relation through standard word segmentation, not extracting the module included in the layering; wherein, the preset characteristics are: 1) The character length is greater than 50 characters; 2) Conforming to a file name feature, such as mysq.rar; 3) Comprises? Structures consisting of =,%, & etc. characters, e.g
Type=timeline & filters= & exist_fields= = 1506043471376, etc.
Based on the steps, layering the standard word according to the position sequence of the standard word in each operation log, and obtaining a module calling relation matched with the operation log according to the layering result, wherein the module calling relation comprises the following steps: obtaining a module calling relation matched with the operation log based on the final word segmentation result of each log file, namely calling a lower module by an upper module; for example, if the layering result of a certain running log obtained on the basis of the steps is: req_l1=assets; req_l2=boottrap; req_l3=newcss; req_l4=bootstrapping.css, then the module call relationship corresponding to the current running log is assets-bootstrapping-newcss-bootstrapping.css.
Optionally, after layering the standard word according to the position sequence of the standard word in each running log and obtaining the module calling relation matched with the running log according to the layering result, the method further includes: analyzing each running log to obtain characteristic attributes of each module matched with each running log; and obtaining the module structure information of the running log set based on the characteristic attribute of each module.
S240, obtaining the running time matched with each running log by analyzing each running log, and sequencing each running log according to the length of the running time.
S250, searching the historical time period information of the target number matched with the target time period in the historical operation time set, and judging whether performance bottlenecks exist in the target time period or not based on the historical time period information and the operation time of each ordered operation log.
And S260, when judging that the performance bottleneck exists, positioning the position of the performance bottleneck according to the service module information.
According to the technical scheme, whether the running logs are in a standard coding format or not is judged by collecting the running logs in real time, the running logs in a non-standard coding format are converted into the standard coding format based on a preset model, then the running logs in the standard coding format are segmented based on a preset rule to obtain standard segmented words matched with the running logs, then the standard segmented words are layered based on the position sequence of the standard segmented words in the running logs, the module calling relation matched with the running logs is obtained based on the layering result, then the running logs are analyzed to obtain the running time matched with the running logs, the running logs are ordered according to the length of the running time, then historical running time sets are searched for the information of the historical time segments of the target number matched with the target time segments, whether the performance bottleneck exists in the target time segments or not is judged based on the running time of the historical time segment information and the ordered running logs, and finally when the performance bottleneck exists is judged, the performance bottleneck is positioned according to the service module information, the performance positioning work resource consumption is reduced, and the performance positioning efficiency and the accuracy rate are improved.
Example III
Fig. 3 is a schematic structural diagram of a positioning device for performance bottlenecks according to a third embodiment of the present invention.
As shown in fig. 3, the apparatus includes:
the running log collecting module 310 is configured to collect each running log in real time, and perform structural analysis on each running log to obtain service module information of a running log set in a target time period; the service module information comprises module calling relations in a target time period, calling times of each module calling relation and module structure information;
the running log sorting module 320 is configured to obtain a running time matched with each running log by parsing each running log, and sort each running log according to the length of the running time;
a performance bottleneck judging module 330, configured to search, in a historical running time set, for each historical time period information of a target number that matches the target time period, and judge whether a performance bottleneck exists in the target time period based on each historical time period information and the running time of each running log after sorting;
and the performance bottleneck positioning module 340 is configured to, when it is determined that a performance bottleneck exists, position the performance bottleneck according to the service module information.
According to the technical scheme, the service module information of the operation log set in the target time period is obtained by collecting the operation logs in real time and carrying out structural analysis on the operation logs, then the operation time matched with the operation logs is obtained by analyzing the operation logs, the operation logs are ordered according to the length of the operation time, then the history time period information of the target number matched with the target time period is searched in the history operation time set, whether the performance bottleneck exists in the target time period is judged based on the history time period information and the operation time of the ordered operation logs, and finally when the performance bottleneck exists, the position of the performance bottleneck is positioned according to the service module information, so that the resource consumption of the performance bottleneck positioning work is reduced, and the efficiency and the accuracy of the performance bottleneck positioning are improved.
Based on the above embodiment, the performance bottleneck determination module 330 further includes:
the historical time analysis unit is used for analyzing the information of each historical time period to obtain each historical time value matched with each historical time period;
a target time value matching unit for extracting a target time value matched with the target time period based on the running time of each running log;
The ratio calculating unit is used for calculating the ratio of the target time value to each historical time value respectively and judging whether the target historical time value with the ratio exceeding a preset threshold range exists or not;
and the threshold judging unit is used for counting the number of target historical time values with the ratio exceeding a preset threshold range when judging that the historical time values with the ratio exceeding the preset threshold range exist, and judging that the performance bottleneck exists in the target time period when the number of the target historical time values exceeds the threshold value.
Based on the above embodiment, the performance bottleneck positioning module 340 further includes:
the module ordering unit is used for ordering the calling relations of the modules according to the calling times of the calling relations of the modules in the service module information;
and the performance bottleneck output unit is used for identifying the module calling relation with the largest calling times and outputting the module calling relation as a positioning result of the performance bottleneck.
Based on the above embodiment, the performance bottleneck positioning module 340 is further configured to: after identifying and outputting a module calling relation with the largest calling times as a positioning result of a performance bottleneck, analyzing the positioning result, generating a module influence report matched with the positioning result, and pushing the module influence report to display equipment for display; and: based on the module structure information matched with the positioning result, generating an external providing mode report and pushing the report to display equipment for display.
On the basis of the above embodiment, the operation log collection module 310 further includes:
the transcoding unit is used for judging whether each running log is in a standard coding format or not, and converting the running log in a non-standard coding format into the standard coding format based on a preset model;
the word segmentation unit is used for segmenting the running logs in each standard coding format based on a preset rule to obtain each standard word matched with each running log;
and the layering unit is used for layering the standard word according to the position sequence of the standard word in each operation log and obtaining a module calling relation matched with the operation log according to the layering result.
On the basis of the above embodiment, the operation log collection module 310 is further configured to: layering the standard segmentation words based on the position sequence of the standard segmentation words in each running log, obtaining a module calling relation matched with the running log based on layering results, and then aggregating the calling times of the module calling relations corresponding to the running log set according to all the module calling relations of all the running logs.
On the basis of the above embodiment, the operation log collection module 310 is further configured to: the method is characterized in that based on the position sequence of each standard word in each operation log, each standard word is layered, and after a module calling relation matched with the operation log is obtained based on the layering result, each operation log is analyzed to obtain each module characteristic attribute matched with each operation log; and obtaining the module structure information of the running log set based on the characteristic attribute of each module.
The positioning device for the performance bottleneck provided by the embodiment of the invention can execute the positioning method for the performance bottleneck provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example IV
Fig. 4 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 4, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as a performance bottleneck locating method.
Accordingly, the method comprises the following steps:
collecting each running log in real time, and carrying out structural analysis on each running log to obtain service module information of a running log set in a target time period; the service module information comprises module calling relations in a target time period, calling times of each module calling relation and module structure information;
Analyzing each running log to obtain the running time matched with each running log, and sequencing each running log according to the length of the running time;
searching the information of each historical time period of the target number matched with the target time period in the historical running time set, and judging whether performance bottlenecks exist in the target time period or not based on the information of each historical time period and the running time of each running log after sequencing;
and when judging that the performance bottleneck exists, positioning the position of the performance bottleneck according to the service module information.
In some embodiments, a method of locating a performance bottleneck may be implemented as a computer program tangibly embodied on a computer readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of one of the above-described performance bottleneck locating methods may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform a performance bottleneck localization method in any other suitable way (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.

Claims (10)

1. A method for locating a performance bottleneck, comprising:
collecting each running log in real time, and carrying out structural analysis on each running log to obtain service module information of a running log set in a target time period; the service module information comprises module calling relations in a target time period, calling times of each module calling relation and module structure information;
analyzing each running log to obtain the running time matched with each running log, and sequencing each running log according to the length of the running time;
searching the information of each historical time period of the target number matched with the target time period in the historical running time set, and judging whether performance bottlenecks exist in the target time period or not based on the information of each historical time period and the running time of each running log after sequencing;
And when judging that the performance bottleneck exists, positioning the position of the performance bottleneck according to the service module information.
2. The method of claim 1, wherein determining whether a performance bottleneck exists within the target time period based on each historical time period information and the running time of each ordered running log comprises:
analyzing the information of each historical time period to obtain each historical time value matched with each historical time period;
extracting a target time value matched with the target time period based on the running time of each running log;
calculating the ratio of the target time value to each historical time value respectively, and judging whether the target historical time value with the ratio exceeding a preset threshold range exists or not;
and counting the number of target historical time values with the ratio exceeding a preset threshold range when judging that the historical time values with the ratio exceeding the preset threshold range exist, and judging that the performance bottleneck exists in the target time period when the number of the target historical time values exceeds the threshold value.
3. The method of claim 1, wherein locating the location of the performance bottleneck based on the service module information when it is determined that the performance bottleneck exists comprises:
Sequencing the calling relations of the modules according to the calling times of the calling relations of the modules in the service module information;
and identifying the module calling relation with the largest calling times and outputting the module calling relation as a positioning result of the performance bottleneck.
4. A method according to claim 3, wherein after identifying the module calling relationship with the largest number of calls for output as the positioning result of the performance bottleneck, further comprising:
analyzing the positioning result, generating a module influence report matched with the positioning result, and pushing the module influence report to display equipment for display;
and: based on the module structure information matched with the positioning result, generating an external providing mode report and pushing the report to display equipment for display.
5. The method of claim 1, wherein performing structural analysis on each running log to obtain service module information of the running log set in the target time period includes:
judging whether each running log is in a standard coding format or not, and converting the running log in a non-standard coding format into the standard coding format based on a preset model;
performing word segmentation on the running logs in each standard coding format based on a preset rule to obtain each standard word segmentation matched with each running log;
And layering the standard word according to the position sequence of the standard word in each running log, and obtaining a module calling relation matched with the running log according to the layering result.
6. The method according to claim 5, further comprising, after layering the standard words based on the order of the positions of the standard words in the running logs, and obtaining the module calling relationship matched with the running log based on the layering result:
and according to all module calling relations of all running logs, acquiring the calling times of each module calling relation corresponding to the running log set in an aggregation mode.
7. The method according to claim 5, further comprising, after layering the standard words based on the order of the positions of the standard words in the running logs, and obtaining the module calling relationship matched with the running log based on the layering result:
analyzing each running log to obtain characteristic attributes of each module matched with each running log;
and obtaining the module structure information of the running log set based on the characteristic attribute of each module.
8. A performance bottleneck positioning device, comprising:
the system comprises an operation log collection module, a service module information acquisition module and a control module, wherein the operation log collection module is used for collecting each operation log in real time and carrying out structural analysis on each operation log to obtain service module information of an operation log set in a target time period; the service module information comprises module calling relations in a target time period, calling times of each module calling relation and module structure information;
The running log sorting module is used for obtaining the running time matched with each running log by analyzing each running log and sorting each running log according to the length of the running time;
the performance bottleneck judging module is used for searching the information of each historical time period of the target number matched with the target time period in the historical running time set and judging whether the performance bottleneck exists in the target time period or not based on the information of each historical time period and the running time of each running log after sequencing;
and the performance bottleneck positioning module is used for positioning the position of the performance bottleneck according to the service module information when judging that the performance bottleneck exists.
9. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform a performance bottleneck localization method as claimed in any one of claims 1-7.
10. A computer readable storage medium storing computer instructions for causing a processor to perform a method of locating a performance bottleneck as claimed in any one of claims 1 to 7.
CN202311528295.5A 2023-11-16 2023-11-16 Positioning method, device, equipment and storage medium for performance bottleneck Pending CN117573491A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311528295.5A CN117573491A (en) 2023-11-16 2023-11-16 Positioning method, device, equipment and storage medium for performance bottleneck

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311528295.5A CN117573491A (en) 2023-11-16 2023-11-16 Positioning method, device, equipment and storage medium for performance bottleneck

Publications (1)

Publication Number Publication Date
CN117573491A true CN117573491A (en) 2024-02-20

Family

ID=89861872

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311528295.5A Pending CN117573491A (en) 2023-11-16 2023-11-16 Positioning method, device, equipment and storage medium for performance bottleneck

Country Status (1)

Country Link
CN (1) CN117573491A (en)

Similar Documents

Publication Publication Date Title
CN116225769B (en) Method, device, equipment and medium for determining root cause of system fault
CN116010220A (en) Alarm diagnosis method, device, equipment and storage medium
CN112560461A (en) News clue generation method and device, electronic equipment and storage medium
CN116471174B (en) Log data monitoring system, method, device and storage medium
CN115509797A (en) Method, device, equipment and medium for determining fault category
CN113032251B (en) Method, device and storage medium for determining service quality of application program
CN117573491A (en) Positioning method, device, equipment and storage medium for performance bottleneck
CN114969444A (en) Data processing method and device, electronic equipment and storage medium
CN113656731A (en) Advertisement page processing method and device, electronic equipment and storage medium
CN115858325B (en) Project log adjusting method, device, equipment and storage medium
CN117369816A (en) Page partitioning method, device, equipment and medium
CN116455999A (en) Application state management method and device, electronic equipment and storage medium
CN117609311A (en) Service degradation method, device, equipment and storage medium
CN115794744A (en) Log display method, device, equipment and storage medium
CN115292606A (en) Information pushing method, device, equipment and medium
CN116070127A (en) Operation and maintenance statement classification method, device, equipment and storage medium
CN115757869A (en) Video processing method, video processing device, electronic equipment and medium
CN114416678A (en) Resource processing method, device, equipment and storage medium
CN116801001A (en) Video stream processing method and device, electronic equipment and storage medium
CN117540718A (en) Intelligent inspection result statistical method based on document object model
CN117650967A (en) Multi-cluster index processing method, system, electronic equipment and storage medium
CN117806764A (en) Data collection method, device, equipment and storage medium of user interface
CN117851599A (en) Method, device, equipment and medium for extracting text of other elements of investment supervision
CN117786453A (en) Method, device, equipment and storage medium for identifying type of cabinet
CN117411922A (en) Requester identification method, requester identification device, requester identification equipment and storage medium

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