CN116521546A - Interface performance adjusting method and device, computer equipment and storage medium - Google Patents
Interface performance adjusting method and device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN116521546A CN116521546A CN202310484114.7A CN202310484114A CN116521546A CN 116521546 A CN116521546 A CN 116521546A CN 202310484114 A CN202310484114 A CN 202310484114A CN 116521546 A CN116521546 A CN 116521546A
- Authority
- CN
- China
- Prior art keywords
- interface
- processed
- performance
- time consumption
- operation request
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 64
- 230000002159 abnormal effect Effects 0.000 claims abstract description 94
- 238000001514 detection method Methods 0.000 claims abstract description 94
- 230000005856 abnormality Effects 0.000 claims abstract description 13
- 238000004590 computer program Methods 0.000 claims description 22
- 238000012545 processing Methods 0.000 claims description 13
- 238000011161 development Methods 0.000 abstract description 9
- 230000003068 static effect Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 238000013500 data storage Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- OKTJSMMVPCPJKN-UHFFFAOYSA-N Carbon Chemical compound [C] OKTJSMMVPCPJKN-UHFFFAOYSA-N 0.000 description 1
- 230000002547 anomalous effect Effects 0.000 description 1
- 229910021389 graphene Inorganic materials 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/362—Software debugging
- G06F11/3648—Software debugging using additional hardware
- G06F11/3656—Software debugging using additional hardware using a specific debug interface
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE 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/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- General Engineering & Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The application relates to an interface performance adjusting method, an interface performance adjusting device, computer equipment and a storage medium. The method comprises the following steps: acquiring operation data of an interface to be processed; determining the execution time consumption of various operation requests executed by the interface to be processed according to the operation data; performing performance detection on the interface to be processed according to the execution time consumption of the various operation requests and the configuration information of the interface to be processed, and determining a performance detection result of the interface to be processed; if the performance detection result indicates that the performance of the interface to be processed is abnormal, determining an operation request with time consuming abnormality from the various operation requests, and adjusting the performance of the interface to be processed according to the operation request with time consuming abnormality. The method can automatically adjust the performance of the interface to be processed, avoids manual detection of the interface performance, and improves the development efficiency.
Description
Technical Field
The present invention relates to the field of information technologies, and in particular, to a method and apparatus for adjusting interface performance, a computer device, and a storage medium.
Background
With the development of network technology, the internet is widely applied and has become an indispensable tool in people's work and life. Each enterprise typically establishes various types of system servers to provide various resources and services to the outside; people can access the system server of the enterprise through the Internet to acquire various resources and services required by the enterprise.
In the process of accessing the system server, the access is usually performed in the form of interface call, and the more the number of times of access is, the more the number of times of call to the interface is; for some system servers with large access quantity, the performance requirement on the interface is high, so that the interface performance needs to be detected and adjusted in the development process.
However, in the related art, the detection and adjustment of the interface performance requires a lot of manpower for manual detection, which greatly reduces the development efficiency.
Disclosure of Invention
In view of the above, it is necessary to provide a method, an apparatus, a computer device, and a storage medium for adjusting interface performance, which can improve development efficiency.
In a first aspect, the present application provides a method for adjusting interface performance. The method comprises the following steps:
Acquiring operation data of an interface to be processed;
determining the execution time consumption of various operation requests executed by the interface to be processed according to the operation data;
performing performance detection on the interface to be processed according to the execution time consumption of the various operation requests and the configuration information of the interface to be processed, and determining a performance detection result of the interface to be processed, wherein the configuration information is used for indicating target time consumption corresponding to the various operation requests and target total time consumption corresponding to the interface to be processed;
if the performance detection result indicates that the performance of the interface to be processed is abnormal, determining an operation request with time consuming abnormality from the various operation requests;
and adjusting the performance of the interface to be processed according to the operation request with abnormal time consumption.
In one embodiment, the adjusting the performance of the interface to be processed according to the operation request with abnormal time consumption includes:
acquiring execution data of the operation request with abnormal time consumption;
identifying target detection characteristics corresponding to the time-consuming abnormal operation request in the execution data;
determining a performance adjustment program of the interface to be processed according to the identification result of the target detection feature;
And executing the performance adjustment program to adjust the performance of the interface to be processed.
In one embodiment, before the identifying, in the execution data, the object detection feature corresponding to the time-consuming abnormal operation request, the method further includes:
and determining target detection characteristics to be identified corresponding to the operation request with time consuming abnormality according to the type of the operation request with time consuming abnormality.
In one embodiment, the performing performance detection on the to-be-processed interface according to the execution time consumption of the various operation requests and the configuration information of the to-be-processed interface, and determining the performance detection result of the to-be-processed interface includes:
determining the total execution time consumption of the interface to be processed according to the execution time consumption of the various operation requests;
if the execution time consumption of the target operation request is greater than the corresponding target time consumption of the target operation request and/or the total execution time consumption of the interface to be processed is greater than the total target time consumption of the interface to be processed, determining that the performance detection result of the processing interface indicates that the performance of the interface to be processed is abnormal, wherein the target operation request is any type of operation request executed by the interface to be processed;
If the execution time consumption of the target operation request is smaller than or equal to the target time consumption corresponding to the target operation request and the total execution time consumption of the interface to be processed is smaller than or equal to the target total time consumption of the interface to be processed, determining that the performance detection result of the processing interface indicates that the performance of the interface to be processed is normal.
In one embodiment, the determining the operation request with abnormal time consumption from the operation requests of various types includes:
and determining the operation request with the time consumption greater than the target time consumption and the operation request with the highest time consumption from the operation requests of the various types as the operation request with the time consumption abnormality.
In one embodiment, after determining that the execution of the various types of operation requests performed by the pending interface is time consuming according to the operation data, the method further includes:
generating a time consumption schedule of the interface to be processed according to the execution time consumption of the various operation requests;
and sending the time-consuming time schedule to terminal equipment so as to instruct the terminal equipment to display the time-consuming time schedule.
In a second aspect, the present application further provides an apparatus for adjusting interface performance. The device comprises:
The acquisition module acquires operation data of the interface to be processed;
the detection module is used for determining the execution time consumption of various operation requests executed by the interface to be processed according to the operation data; performing performance detection on the interface to be processed according to the execution time consumption of the various operation requests and the configuration information of the interface to be processed, and determining a performance detection result of the interface to be processed, wherein the configuration information is used for indicating target time consumption corresponding to the various operation requests and target total time consumption corresponding to the interface to be processed;
the adjusting module is used for determining time-consuming abnormal operation requests from the various operation requests if the performance detection result indicates that the performance of the interface to be processed is abnormal; and adjusting the performance of the interface to be processed according to the operation request with abnormal time consumption.
In one embodiment, the adjusting module is specifically configured to obtain execution data of the operation request with abnormal time consumption; identifying target detection characteristics corresponding to the time-consuming abnormal operation request in the execution data; determining a performance adjustment program of the interface to be processed according to the identification result of the target detection feature; and executing the performance adjustment program to adjust the performance of the interface to be processed.
In one embodiment, the adjusting module is further configured to determine, according to the type of the time-consuming abnormal operation request, a target detection feature corresponding to the time-consuming abnormal operation request.
In one embodiment, the detection module is specifically configured to determine total execution time of the interface to be processed according to execution time of the various types of operation requests; if the execution time consumption of the target operation request is greater than the corresponding target time consumption of the target operation request and/or the total execution time consumption of the interface to be processed is greater than the total target time consumption of the interface to be processed, determining that the performance detection result of the processing interface indicates that the performance of the interface to be processed is abnormal, wherein the target operation request is any type of operation request executed by the interface to be processed; if the execution time consumption of the target operation request is smaller than or equal to the target time consumption corresponding to the target operation request and the total execution time consumption of the interface to be processed is smaller than or equal to the target total time consumption of the interface to be processed, determining that the performance detection result of the processing interface indicates that the performance of the interface to be processed is normal.
The adjusting module is specifically configured to determine an operation request with a time consumption greater than a target time consumption and an operation request with a highest time consumption from the various operation requests as the operation request with the abnormal time consumption.
The interface performance adjusting device further comprises:
the form generation module is used for generating a time consumption time table of the interface to be processed according to the execution time consumption of the various operation requests; and sending the time-consuming time schedule to terminal equipment so as to instruct the terminal equipment to display the time-consuming time schedule.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method for adjusting the interface performance according to the first aspect.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the method for adjusting the performance of an interface according to the first aspect.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the method for adjusting the performance of the interface according to the first aspect.
The method, the device, the computer equipment and the storage medium for adjusting the interface performance firstly acquire the operation data of the interface to be processed. And secondly, determining the time consumption of executing various operation requests executed by the interface to be processed according to the operation data. And thirdly, performing performance detection on the interface to be processed according to the execution time consumption of the operation requests of various types and the configuration information of the interface to be processed, and determining a performance detection result of the interface to be processed, wherein the configuration information is used for indicating the target time consumption corresponding to the operation requests of various types and the target total time consumption corresponding to the interface to be processed. And finally, if the performance detection result indicates that the performance of the interface to be processed is abnormal, determining an operation request with abnormal time consumption from the various operation requests, and adjusting the performance of the interface to be processed according to the operation request with abnormal time consumption. By the method for adjusting the performance of the interface, whether the performance of the interface is abnormal or not can be automatically determined according to the execution time consumption of various operation requests, and the performance of the interface to be processed is automatically adjusted according to the operation request with abnormal time consumption, so that the manual detection of the performance of the interface is avoided, and the development efficiency is improved.
Drawings
Fig. 1 is an application environment diagram of a method for adjusting interface performance according to an embodiment of the present application;
fig. 2 is a flow chart of a method for adjusting interface performance according to an embodiment of the present application;
fig. 3 is a flowchart illustrating another method for adjusting interface performance according to an embodiment of the present application;
fig. 4 is a flowchart of another method for adjusting interface performance according to an embodiment of the present application;
fig. 5 is a block diagram of an interface performance adjusting device according to an embodiment of the present application;
fig. 6 is an internal structure diagram of a computer device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The method for adjusting the interface performance provided by the embodiment of the application can be applied to an application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on a cloud or other network server.
The server 104 may obtain the operation data of each interface when the system is running, and then determine, according to the operation data, the time-consuming execution of various types of operation requests performed by the interface. The operation request may be a database request, a local request of the server 104, or an external request sent by the terminal device 102 to the server 104. Server 104 may detect interface performance based on time consuming execution of various types of operation requests and pre-configured configuration information. When an interface performance anomaly is detected, server 104 may adjust the interface performance according to the time-consuming anomalous operation request.
The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices, and portable wearable devices, where the internet of things devices may be smart speakers, smart televisions, smart air conditioners, smart vehicle devices, and the like. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. The server 104 may be implemented as a stand-alone server or as a server cluster of multiple servers.
In one embodiment, as shown in fig. 2, a method for adjusting interface performance is provided, and the method is applied to the server in fig. 1 for illustration, and includes steps S201 to S205.
S201, acquiring operation data of an interface to be processed.
In the step, when the system is running, the server can acquire the running data of the interface to be processed of the system.
The system running on the server may be a service system, a customer service system, a digital transaction system, an international settlement system, etc., which is not limited in this embodiment of the present application. In some embodiments, the interface to be processed may be a certain interface or a plurality of interfaces to be monitored preset in the system, or may be all interfaces in the system.
It should be understood that the embodiments of the present application do not limit how to obtain the operation data of the interface to be processed, and in some embodiments, the server may obtain a log of the system at intervals of a preset time, and extract the operation data of the interface to be processed from the log.
The preset time interval may be 5 minutes, 10 minutes, 30 minutes, 1 hour, etc., and may be specifically set according to practical situations, which is not limited in this embodiment of the present application.
It should be understood that the embodiments of the present application are not limited to the information contained in the operation data, and in some embodiments, the operation data may include the time consuming execution of each call to the pending interface to execute the operation request, and the type of the operation request.
S202, determining the execution time consumption of various operation requests executed by the interface to be processed according to the operation data.
In this step, after the server obtains the operation data of the interface to be processed, it may be determined that the execution of the various types of operation requests executed by the interface to be processed is time-consuming according to the operation data.
The operation request types may include a database operation request, an external operation request, and a local operation request, where the local operation request may be further divided into a local logic operation request and a local call interface operation request, where the local logic operation request is used to execute a local related logic process, and the local call interface operation request is used to call a local other interface.
In some embodiments, the server may add the execution time of each execution of the same type of operation request by the pending interface to obtain the execution time of each type of operation request executed by the pending interface.
For example, if in the running data, the interface to be processed executes the database operation request twice, it takes 1 second and 2 seconds respectively; the interface to be processed executes the external operation request and executes the database operation request five times, and the time is respectively 1 second, 1.5 seconds and 2 seconds; the interface to be processed performs the local operation request three times, taking 1 second, 1.5 seconds, 2 seconds respectively. Correspondingly, the server can sum the execution time of the operation requests of the same type based on the operation data, and statistics is carried out that the execution time of the database operation requests of the interface to be processed is 3 seconds, the execution time of the external operation requests of the interface to be processed is 7 seconds, and the execution time of the local operation requests of the interface to be processed is 4.5 seconds.
The local operation request may be further divided into a local logic operation request and a local call interface operation request, and accordingly, when the execution consumption is counted, the local logic operation request and the local call interface operation request may be counted respectively.
In some embodiments, after determining the time consumption of the execution of the various types of operation requests performed by the interface to be processed, the server may further generate a time consumption schedule of the interface to be processed according to the time consumption of the execution of the various types of operation requests, and then send the time consumption schedule to the terminal device to instruct the terminal device to display the time consumption schedule.
The time consumption schedule can display not only the execution time consumption of various operation requests, but also the time consumption of each operation request, and when the time consumption of the operation request is obviously abnormal, warning information can be attached to the time consumption schedule so as to remind a user even.
It should be understood that the embodiment of the present application does not limit the terminal device, and may be preset according to practical situations, for example, a display terminal in a specific location, and a smart phone of a specific user.
S203, performing performance detection on the interface to be processed according to the execution time consumption of various operation requests and the configuration information of the interface to be processed, and determining a performance detection result of the interface to be processed, wherein the configuration information is used for indicating target time consumption corresponding to various operation requests and target total time consumption corresponding to the interface to be processed.
In the application, after determining that the execution time of the various types of operation requests executed by the to-be-processed interface is consuming, the server may perform performance detection on the to-be-processed interface according to the execution time of the various types of operation requests and the configuration information of the to-be-processed interface.
It should be understood that the embodiments of the present application do not limit how performance detection is performed on the interface to be processed, and in some embodiments, the server may simply compare the execution time of various types of operation requests with the target time of the types of operation requests, so as to determine the performance detection result of the interface to be processed.
In other embodiments, the server may first determine the total time consuming execution of the pending interface based on the time consuming execution of various types of operation requests. Then, the server compares the execution time consumption of various types of operation requests with the target time consumption of the types of operation requests, and compares the total execution time consumption of the interface to be processed with the total target time consumption corresponding to the interface to be processed, so that the performance detection result of the interface to be processed is determined according to the comparison result.
For example, the server may also add the execution time of all types of operation requests to obtain the total execution time of the operation requests by the pending interface.
For example, if the execution time of the target operation request is greater than the target time consumption corresponding to the target operation request and/or the total execution time of the interface to be processed is greater than the target total time consumption of the interface to be processed, it is determined that the performance detection result of the processing interface indicates that the performance of the interface to be processed is abnormal.
If the execution time consumption of the target operation request is less than or equal to the target time consumption corresponding to the target operation request and the total execution time consumption of the interface to be processed is less than or equal to the target total time consumption of the interface to be processed, determining that the performance detection result of the processing interface indicates that the performance of the interface to be processed is normal.
The target operation request is any type of operation request executed by the interface to be processed.
It should be noted that, the above configuration information may be preset by a user, and the embodiments of the present application do not limit the corresponding target time consumption of various types of operation requests indicated by the configuration information and the total target time consumption corresponding to the interface to be processed, and may be specifically set according to practical situations.
By way of example, the total target time for the processing interface may be set to 25 seconds, 30 seconds, 40 seconds, etc. By way of example, the corresponding target time periods for the various types of operation requests may be set to be the same, for example, 10 seconds each, or may be set to be different.
S204, if the performance detection result indicates that the performance of the interface to be processed is abnormal, determining an operation request with time consuming abnormality from various operation requests.
In this step, after the server determines the performance detection result of the interface to be processed, if the performance detection result indicates that the performance of the interface to be processed is abnormal, a time-consuming abnormal operation request is determined from various operation requests.
It should be appreciated that embodiments of the present application are not limited in how the time-consuming abnormal operation request is determined. In some embodiments, the server may determine an operation request with a time consumption greater than the target time consumption and an operation request with the highest time consumption among the various types of operation requests as an operation request with an abnormal time consumption.
In other embodiments, the server may first determine whether there is an operation request that is more time consuming to execute than the target based on the performance detection results. If so, the server may determine that the operation request that is more time consuming to execute than the target is an operation request that is time consuming exception. If the operation request does not exist, the server can determine the operation request with the highest execution time from various operation requests, and determine the operation request with the highest execution time as the operation request with abnormal time consumption.
Wherein, the operation request with the execution time consumption greater than the target time consumption can be indicated in the performance detection result.
S205, according to the operation request with abnormal time consumption, the performance of the interface to be processed is adjusted.
In this step, after the server determines the operation request with abnormal time consumption from the various operation requests, the performance of the interface to be processed may be adjusted according to the operation request with abnormal time consumption.
In some embodiments, the server may first obtain execution data of the operation request with abnormal time consumption, and second, the server may identify, in the execution data, a target detection feature corresponding to the operation request with abnormal time consumption. And thirdly, the server can determine a performance adjustment program of the interface to be processed according to the identification result of the target detection feature. Preferably, the server may execute a performance adjustment program to adjust the performance of the interface to be processed.
The above execution data may correspond to a type of the operation request with abnormal time consumption, and for example, if the operation request with abnormal time consumption is a database request, the execution data is a database execution plan, and if the operation request with abnormal time consumption is an external operation request, the execution data is an external request execution plan.
The target detection feature corresponding to the operation request with abnormal time consumption can be determined according to the type of the operation request with abnormal time consumption. For example, if the type of time-consuming abnormal operation request is a database request, the object detection feature may include an index feature and a structured query language (Structured Query Language, SQL) write feature; if the type of time-consuming abnormal operation request is a local request, the object detection feature may include a static data feature and a repeat execution feature.
It should be appreciated that the performance adjustment procedure described above corresponds to the recognition result of the target detection feature, and that different target detection features may be used to characterize different causes of interface performance anomalies, and accordingly, different performance adjustment procedures may be employed to make the adjustment.
According to the method for adjusting the interface performance, operation data of an interface to be processed is obtained first. Secondly, according to the operation data, the time consumption for executing various operation requests executed by the interface to be processed is determined. And thirdly, performing performance detection on the interface to be processed according to the execution time consumption of various operation requests and the configuration information of the interface to be processed, and determining a performance detection result of the interface to be processed, wherein the configuration information is used for indicating the target time consumption corresponding to various operation requests and the target total time consumption corresponding to the interface to be processed. And finally, if the performance detection result indicates that the performance of the interface to be processed is abnormal, determining an operation request with abnormal time consumption from various operation requests, and adjusting the performance of the interface to be processed according to the operation request with abnormal time consumption. By the method for adjusting the performance of the interface, whether the performance of the interface is abnormal or not can be automatically determined according to the execution time consumption of various operation requests, and the performance of the interface to be processed is automatically adjusted according to the operation request with abnormal time consumption, so that the manual detection of the performance of the interface is avoided, and the development efficiency is improved.
In one embodiment, another method for adjusting the performance of an interface is further provided in the embodiments of the present application, as shown in fig. 3, where the method for adjusting the performance of an interface includes:
s301, if the performance detection result indicates that the performance of the interface to be processed is abnormal, determining an operation request with time consuming abnormality from various operation requests.
In some embodiments, the server may determine an operation request with a time consumption greater than the target time consumption and an operation request with the highest time consumption among the various types of operation requests as an operation request with an abnormal time consumption.
S302, acquiring execution data of the operation request with abnormal time consumption.
It should be appreciated that the execution data of the time-consuming abnormal operation request corresponds to the type of the time-consuming abnormal operation request.
For example, if the time-consuming abnormal operation request is a database request, the execution data is a database execution plan, and if the time-consuming abnormal operation request is an external operation request, the execution data is an external request execution plan.
S303, identifying target detection characteristics corresponding to the operation request with abnormal time consumption in the execution data.
The target detection feature corresponding to the operation request with abnormal time consumption can be determined according to the type of the operation request with abnormal time consumption. For example, if the type of the time-consuming abnormal operation request is a database request, the object detection feature may include an index feature and an SQL writing feature; if the type of time-consuming abnormal operation request is a local request, the object detection feature may include a static data feature and a repeat execution feature.
S304, determining a performance adjustment program of the interface to be processed according to the identification result of the target detection feature.
It should be appreciated that the performance adjustment procedure described above corresponds to the recognition result of the target detection feature, and that different target detection features may be used to characterize different causes of interface performance anomalies, and accordingly, different performance adjustment procedures may be employed to make the adjustment.
For example, if the time-consuming abnormal operation request is a database operation request, the server may detect an index feature in the execution data, and when the server detects that there is no index feature in the execution data, the server may determine a corresponding performance adjustment procedure for adding the index.
For example, if the time-consuming abnormal operation request is a database operation request, the server may detect an SQL writing feature in the execution data, and when the server detects that the SQL writing feature in the execution data is abnormal, the server may determine a corresponding performance adjustment program, where the performance adjustment program is used to modify the SQL writing of the database.
For example, if the time-consuming abnormal operation request is a local operation request, the server may detect a static data feature in the execution data, and when the server detects that there is static data in the execution data, the server may determine a corresponding performance adjustment program, where the performance adjustment program is used to set up a multi-level or hierarchical cache.
For example, if the time-consuming abnormal operation request is a local operation request, the server may detect a repeated execution feature in the execution data, and when the server detects that the execution data is repeatedly executed for the same operation request, the server may determine a corresponding performance adjustment procedure, where the performance adjustment procedure is used to optimize the relevant code.
It should be noted that, the performance adjustment program in the embodiment of the present application may be generated based on the history interface adjustment data, or may be generated based on a code example input in advance by the user, which is not limited in the embodiment of the present application.
In other embodiments, if the performance adjustment program of the interface to be processed cannot be determined, the relevant text description may be output to the user, so that the user generates the relevant performance adjustment program based on the text description.
S305, executing a performance adjustment program to adjust the performance of the interface to be processed.
The interface performance adjusting method provided by the embodiment of the application can automatically access the system to analyze the performance of each interface of the system in real time, and can automatically adjust the interface performance by matching the performance adjusting program corresponding to the interface with abnormal performance. Through the mode, the overall performance of the system can be improved, the system can run more stably, a large amount of manpower is saved for analysis, the problem of interface performance is solved, and the development efficiency is improved.
In one embodiment, the embodiment of the present application further provides a method for adjusting the performance of an interface, as shown in fig. 4, where the method for adjusting the performance of an interface includes:
s401, acquiring operation data of an interface to be processed.
S402, determining the execution time consumption of various operation requests executed by the interface to be processed according to the operation data.
S403, determining the total time consumption of the execution of the interface to be processed according to the time consumption of the execution of various operation requests.
S404, determining whether the execution time consumption of the target operation request is less than or equal to the target time consumption corresponding to the target operation request, wherein the target operation request is any type of operation request executed by the interface to be processed.
If yes, S405 is executed, and if no, S406 is executed.
S405, determining whether the total execution time consumption of the interface to be processed is less than or equal to the target total time consumption of the interface to be processed.
If yes, S401 is executed, and if no, S406 is executed.
S406, determining the performance abnormality of the interface to be processed.
S407, determining an operation request with time consumption greater than the target time consumption and an operation request with highest time consumption from various operation requests as an operation request with abnormal time consumption.
S408, acquiring execution data of the operation request with abnormal time consumption.
S409, identifying the target detection feature corresponding to the time-consuming abnormal operation request in the execution data.
S410, determining a performance adjustment program of the interface to be processed according to the identification result of the target detection feature.
S411, executing a performance adjustment program to adjust the performance of the interface to be processed.
According to the method for adjusting the interface performance, operation data of an interface to be processed is obtained first. Secondly, according to the operation data, the time consumption for executing various operation requests executed by the interface to be processed is determined. And thirdly, performing performance detection on the interface to be processed according to the execution time consumption of various operation requests and the configuration information of the interface to be processed, and determining a performance detection result of the interface to be processed, wherein the configuration information is used for indicating the target time consumption corresponding to various operation requests and the target total time consumption corresponding to the interface to be processed. And finally, if the performance detection result indicates that the performance of the interface to be processed is abnormal, determining an operation request with abnormal time consumption from various operation requests, and adjusting the performance of the interface to be processed according to the operation request with abnormal time consumption. By the method for adjusting the performance of the interface, whether the performance of the interface is abnormal or not can be automatically determined according to the execution time consumption of various operation requests, and the performance of the interface to be processed is automatically adjusted according to the operation request with abnormal time consumption, so that the manual detection of the performance of the interface is avoided, and the development efficiency is improved.
It should be understood that, although the steps in the flowcharts related to the above embodiments are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides an interface performance adjusting device for realizing the above related interface performance adjusting method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of the device for adjusting the performance of one or more interfaces provided below may be referred to the limitation of the method for adjusting the performance of an interface hereinabove, which is not repeated here.
In one embodiment, as shown in fig. 5, there is provided an interface performance adjustment apparatus 500, including: an acquisition module 501, a detection module 502, an adjustment module 503, and a form generation module 504, wherein:
the obtaining module 501 obtains operation data of the interface to be processed.
The detection module 502 is configured to determine, according to the operation data, time consumption for executing various types of operation requests executed by the interface to be processed; and detecting the performance of the interface to be processed according to the execution time consumption of various operation requests and the configuration information of the interface to be processed, and determining the performance detection result of the interface to be processed, wherein the configuration information is used for indicating the target time consumption corresponding to various operation requests and the target total time consumption corresponding to the interface to be processed.
An adjusting module 503, configured to determine an operation request with abnormal time consumption from various types of operation requests if the performance detection result indicates that the performance of the interface to be processed is abnormal; and adjusting the performance of the interface to be processed according to the operation request with abnormal time consumption.
In one embodiment, the adjusting module 503 is specifically configured to obtain execution data of the operation request with abnormal time consumption; identifying target detection characteristics corresponding to the operation request with abnormal time consumption in the execution data; determining a performance adjustment program of the interface to be processed according to the identification result of the target detection feature; and executing a performance adjustment program to adjust the performance of the interface to be processed.
In one embodiment, the adjusting module 503 is further configured to determine, according to the type of the operation request with abnormal time consumption, a target detection feature corresponding to the operation request with abnormal time consumption.
In one embodiment, the detection module 502 is specifically configured to determine total execution time of the interface to be processed according to execution time of various types of operation requests; if the execution time consumption of the target operation request is greater than the corresponding target time consumption of the target operation request and/or the total execution time consumption of the interface to be processed is greater than the total target time consumption of the interface to be processed, determining that the performance detection result of the processing interface indicates that the performance of the interface to be processed is abnormal, wherein the target operation request is any type of operation request executed by the interface to be processed; if the execution time consumption of the target operation request is less than or equal to the target time consumption corresponding to the target operation request and the total execution time consumption of the interface to be processed is less than or equal to the target total time consumption of the interface to be processed, determining that the performance detection result of the processing interface indicates that the performance of the interface to be processed is normal.
The adjustment module 503 is specifically configured to determine, as an operation request with abnormal time consumption, an operation request with time consumption greater than the target time consumption and an operation request with highest time consumption.
The interface performance adjusting device further comprises:
a form generation module 504, configured to generate a time-consuming schedule of the interface to be processed according to execution time consumption of various types of operation requests; and sending the time-consuming time schedule to the terminal equipment to instruct the terminal equipment to display the time-consuming time schedule.
The above-mentioned various modules in the interface performance adjusting device may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 6. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is for storing data. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of adjusting interface performance.
It will be appreciated by those skilled in the art that the structure shown in fig. 6 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided that includes a memory having a computer program stored therein and a processor that implements the method of adjusting the performance of the interface described above when the computer program is executed.
In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, which when executed by a processor implements the above-described method of adjusting the interface performance.
In one embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the above-described method of adjusting interface performance.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples represent only a few embodiments of the present application, which are described in more detail and are not thereby to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.
Claims (10)
1. A method for adjusting performance of an interface, the method comprising:
acquiring operation data of an interface to be processed;
determining the execution time consumption of various operation requests executed by the interface to be processed according to the operation data;
performing performance detection on the interface to be processed according to the execution time consumption of the various operation requests and the configuration information of the interface to be processed, and determining a performance detection result of the interface to be processed, wherein the configuration information is used for indicating target time consumption corresponding to the various operation requests and target total time consumption corresponding to the interface to be processed;
If the performance detection result indicates that the performance of the interface to be processed is abnormal, determining an operation request with time consuming abnormality from the various operation requests;
and adjusting the performance of the interface to be processed according to the operation request with abnormal time consumption.
2. The method of claim 1, wherein adjusting the performance of the pending interface according to the time-consuming abnormal operation request comprises:
acquiring execution data of the operation request with abnormal time consumption;
identifying target detection characteristics corresponding to the time-consuming abnormal operation request in the execution data;
determining a performance adjustment program of the interface to be processed according to the identification result of the target detection feature;
and executing the performance adjustment program to adjust the performance of the interface to be processed.
3. The method of claim 2, wherein prior to identifying the object detection feature corresponding to the time-consuming abnormal operation request in the execution data, the method further comprises:
and determining target detection characteristics to be identified corresponding to the operation request with time consuming abnormality according to the type of the operation request with time consuming abnormality.
4. The method according to claim 1, wherein the performing performance detection on the to-be-processed interface according to the execution time consumption of the various types of operation requests and the configuration information of the to-be-processed interface, and determining the performance detection result of the to-be-processed interface, includes:
determining the total execution time consumption of the interface to be processed according to the execution time consumption of the various operation requests;
if the execution time consumption of the target operation request is greater than the corresponding target time consumption of the target operation request and/or the total execution time consumption of the interface to be processed is greater than the total target time consumption of the interface to be processed, determining that the performance detection result of the processing interface indicates that the performance of the interface to be processed is abnormal, wherein the target operation request is any type of operation request executed by the interface to be processed;
if the execution time consumption of the target operation request is smaller than or equal to the target time consumption corresponding to the target operation request and the total execution time consumption of the interface to be processed is smaller than or equal to the target total time consumption of the interface to be processed, determining that the performance detection result of the processing interface indicates that the performance of the interface to be processed is normal.
5. The method of claim 1, wherein determining a time-consuming abnormal operation request from the various types of operation requests comprises:
And determining the operation request with the time consumption greater than the target time consumption and the operation request with the highest time consumption from the operation requests of the various types as the operation request with the time consumption abnormality.
6. The method of claim 1, wherein after said determining from said operational data that execution of various types of operation requests performed by said pending interface is time consuming, said method further comprises:
generating a time consumption schedule of the interface to be processed according to the execution time consumption of the various operation requests;
and sending the time-consuming time schedule to terminal equipment so as to instruct the terminal equipment to display the time-consuming time schedule.
7. An apparatus for adjusting performance of an interface, the apparatus comprising:
the acquisition module acquires operation data of the interface to be processed;
the detection module is used for determining the execution time consumption of various operation requests executed by the interface to be processed according to the operation data; performing performance detection on the interface to be processed according to the execution time consumption of the various operation requests and the configuration information of the interface to be processed, and determining a performance detection result of the interface to be processed, wherein the configuration information is used for indicating target time consumption corresponding to the various operation requests and target total time consumption corresponding to the interface to be processed;
The adjusting module is used for determining time-consuming abnormal operation requests from the various operation requests if the performance detection result indicates that the performance of the interface to be processed is abnormal; and adjusting the performance of the interface to be processed according to the operation request with abnormal time consumption.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310484114.7A CN116521546A (en) | 2023-04-28 | 2023-04-28 | Interface performance adjusting method and device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310484114.7A CN116521546A (en) | 2023-04-28 | 2023-04-28 | Interface performance adjusting method and device, computer equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116521546A true CN116521546A (en) | 2023-08-01 |
Family
ID=87393662
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310484114.7A Pending CN116521546A (en) | 2023-04-28 | 2023-04-28 | Interface performance adjusting method and device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116521546A (en) |
-
2023
- 2023-04-28 CN CN202310484114.7A patent/CN116521546A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN117033424A (en) | Query optimization method and device for slow SQL (structured query language) statement and computer equipment | |
CN114089921A (en) | Power system data storage method and device, computer equipment and storage medium | |
CN112506490A (en) | Interface generation method and device, electronic equipment and storage medium | |
CN116401238A (en) | Deviation monitoring method, apparatus, device, storage medium and program product | |
CN116185774A (en) | Log monitoring installation method, device, computer equipment and storage medium | |
CN116521546A (en) | Interface performance adjusting method and device, computer equipment and storage medium | |
CN114201271A (en) | Node determination method and device, computer equipment and storage medium | |
CN113778996A (en) | Large data stream data processing method and device, electronic equipment and storage medium | |
CN116610664B (en) | Data monitoring method, device, computer equipment, storage medium and product | |
CN112528327B (en) | Data desensitization method and device, and data restoration method and device | |
CN118113530A (en) | Chip fault positioning method, device, computer equipment and storage medium | |
CN117455501A (en) | Request processing method, apparatus, computer device and storage medium | |
CN116483658A (en) | Method, device, system, equipment and storage medium for monitoring server performance | |
CN117216164A (en) | Financial data synchronous processing method, apparatus, device, medium and program product | |
CN116433422A (en) | Service processing method, device and computer equipment | |
CN117221250A (en) | Method and device for determining resource utilization rate and computer equipment | |
CN115456583A (en) | Questionnaire data processing method, questionnaire data processing device, computer device, and storage medium | |
CN117076721A (en) | Data query method, device, equipment, medium and product | |
CN116521343A (en) | Resource interaction information processing method, device, computer equipment and storage medium | |
CN116451965A (en) | Service request processing method and device, computer equipment and storage medium | |
CN116880927A (en) | Rule management method, device, computer equipment and storage medium | |
CN116339777A (en) | System patch processing method, device, computer equipment and storage medium | |
CN116450240A (en) | Text file loading method, text file loading device, computer equipment and storage medium | |
CN117635105A (en) | Method, device, computer equipment and storage medium for determining rush repair scheme | |
CN117271445A (en) | Log data processing method, device, server, storage medium and program product |
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 |