CN115729565A - Product capacity evaluation method, code deployment method, device and computer equipment - Google Patents

Product capacity evaluation method, code deployment method, device and computer equipment Download PDF

Info

Publication number
CN115729565A
CN115729565A CN202110989181.5A CN202110989181A CN115729565A CN 115729565 A CN115729565 A CN 115729565A CN 202110989181 A CN202110989181 A CN 202110989181A CN 115729565 A CN115729565 A CN 115729565A
Authority
CN
China
Prior art keywords
host
code
capacity evaluation
capacity
product
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
CN202110989181.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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202110989181.5A priority Critical patent/CN115729565A/en
Publication of CN115729565A publication Critical patent/CN115729565A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

A product capacity evaluation method, a code deployment method, a device and computer equipment are provided, wherein the product capacity evaluation method comprises the following steps: receiving a configuration file sent by a client, and analyzing the configuration file to obtain configuration information; the configuration file is used for carrying out capacity evaluation on the code product in the first host; constructing a simulation request and a simulation request rule interacted with the first host according to the configuration information; sending a simulation request to the first host based on a simulation request rule, and collecting index data of the first host; acquiring each index data of the first host, and obtaining a capacity evaluation result of the code product according to each index data; the capacity evaluation result is used for evaluating the request processing capacity of the code product running in the first host for processing the simulation request, so that the client determines whether to deploy the code corresponding to the code product in the second host or not based on the capacity evaluation result. According to the method, the product capacity evaluation process is completely automated, so that the cost is reduced; and meanwhile, the product quality can be improved by combining deployment and evaluation.

Description

Product capacity evaluation method, code deployment method, device and computer equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a product capacity assessment method, apparatus, computer device, and storage medium, and a code deployment method, apparatus, computer device, and storage medium.
Background
As computer technology has developed, more and more software applications have been developed for use by users. Artifacts refer to background services that the code has compiled and deployed on the host. Before a software application program is opened for a user to use, capacity evaluation is generally carried out on a background service part, so that whether the performance quality of the background service meets expectations under the scenes of large access amount and high concurrency is judged, and namely, the capacity evaluation is carried out on an application program product.
In the conventional technology, a background service is usually deployed on a host specially used for capacity evaluation, then request content is artificially created based on a function interface protocol simulation, simulation request rules are set according to possible access magnitude after an application program is online, and then the capacity of a product is evaluated according to relevant indexes of the host in the process of processing the request of the product. However, most of the steps in the current product capacity assessment method need to be performed manually, the automation degree is not high, and the cost is high.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a product capacity assessment method, a code deployment method, an apparatus, a computer device, and a storage medium, which can improve the degree of automation and reduce the cost.
A method of product capacity assessment, the method comprising:
receiving a configuration file sent by a client, and analyzing the configuration file to obtain configuration information; the configuration file is used for carrying out capacity evaluation on a code product running in the first host;
constructing a simulation request and a simulation request rule interacting with the first host according to the configuration information;
sending the simulation request to the first host based on the simulation request rule, and collecting each index data of the first host;
acquiring each index data of the first host, and obtaining a capacity evaluation result of the code product according to each index data; the capacity evaluation result is used for evaluating the request processing capacity of the code product running in the first host for processing the simulation request, so that the client determines whether to deploy the code corresponding to the code product in the second host or not based on the capacity evaluation result.
A method of product capacity assessment, the method comprising:
acquiring a code, and deploying the code in a first host to form a code product;
sending a configuration file corresponding to a capacity evaluation task to a server, wherein the configuration file is used for enabling the server to carry out capacity evaluation on a code product running in a first host;
after the server starts a capacity evaluation task based on the configuration file, obtaining a capacity evaluation result from the server; the capacity evaluation result is determined by the server based on each index data of the first host, each index data is obtained after the server sends a simulation request to the first host based on a simulation request rule, and the simulation request rule and the simulation request are constructed based on configuration information obtained by analyzing the configuration file;
determining whether to deploy the code in the second host according to the capacity evaluation result.
A product capacity assessment device, the device comprising:
the receiving module is used for receiving the configuration file sent by the client and analyzing the configuration file to obtain configuration information; the configuration file is used for carrying out capacity evaluation on a code product running in the first host;
the building module is used for building a simulation request and a simulation request rule interacted with the first host according to the configuration information;
the request sending module is used for sending the simulation request to the first host based on the simulation request rule and collecting all index data of the first host;
the evaluation module is used for obtaining a capacity evaluation result of the code product according to each index data; the capacity evaluation result is used for evaluating the request processing capacity of the code product running in the first host for processing the simulation request, so that the client determines whether to deploy the code corresponding to the code product in the second host or not based on the capacity evaluation result.
A code deploying apparatus, the apparatus comprising:
the first deployment module is used for acquiring a code and deploying the code in the first host to form a code product;
the system comprises a sending module, a capacity evaluation module and a capacity evaluation module, wherein the sending module is used for sending a configuration file corresponding to a capacity evaluation task to a server, and the configuration file is used for enabling the server to carry out capacity evaluation on a code product running in a first host;
an evaluation result obtaining module, configured to obtain a capacity evaluation result from the server after the server starts a capacity evaluation task based on the configuration file; the capacity evaluation result is determined by the server based on each index data of the first host, each index data is obtained after the server sends a simulation request to the first host based on a simulation request rule, and the simulation request rule and the simulation request are constructed based on configuration information obtained by analyzing the configuration file;
and the second deployment module is used for determining whether to deploy the code in the second host according to the capacity evaluation result.
A computer device comprising a memory storing a computer program and a processor implementing the steps of any one of the above methods when executing the computer program.
A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of any of the methods above.
According to the product capacity evaluation method, the code deployment method, the device, the computer equipment and the storage medium, when a configuration file which is sent by a client and used for carrying out capacity evaluation on a code product running in a first host is received, the configuration file is analyzed to obtain corresponding configuration information, a simulation request and a simulation request rule which are interacted with the first host are constructed based on the configuration information, the simulation request is sent to the first host according to the simulation request rule, each index data of the first host is collected, and then a capacity evaluation result of the product is obtained according to each index data; the capacity evaluation result is used for evaluating the request processing capacity of the product running in the first host for processing the simulation request, and meanwhile, the client determines whether to deploy the code corresponding to the product in the second host or not according to the capacity evaluation result. According to the method, in the process of capacity evaluation of the product, the steps of constructing the simulation request, sending the simulation request and collecting each index data are automatically completed according to the configuration file which is sent by the client and used for the capacity evaluation, so that the whole process of the capacity evaluation of the product is completely automated, and the cost is reduced; and simultaneously, the capacity evaluation result is used for determining whether to deploy the product in the second host, the deployment of the code and the capacity evaluation of the product are combined, and the code deployment process is interfered by the capacity evaluation result, so that the quality of the product deployed in the host is improved.
Drawings
FIG. 1 is a diagram of an application environment of a product capacity assessment method and a code deployment method in an embodiment;
FIG. 2 is a schematic flow chart of a product capacity assessment method in one embodiment;
FIG. 3 is a flow diagram of a state machine of a pipeline atom of a client in one embodiment;
FIG. 4 is a flowchart illustrating a method for code deployment in one embodiment;
FIG. 5 is a flowchart illustrating a method for code deployment in an exemplary embodiment;
FIG. 6 (1) is a flowchart illustrating a method for code deployment in an exemplary embodiment;
FIG. 6 (2) is a flowchart illustrating the code deployment method when the capacity assessment result is pass in one embodiment;
FIG. 6 (3) is a flowchart illustrating a code deployment method when a capacity assessment result is failed in an exemplary embodiment;
FIG. 7 (1) is a diagram illustrating capacity estimation results in one embodiment;
FIG. 7 (2) is a diagram illustrating one embodiment of a capacity estimation result;
FIG. 7 (3) is a diagram illustrating one example of the capacity estimation result according to another embodiment;
FIG. 7 (4) is a diagram showing the result of capacity estimation in another embodiment;
FIG. 7 (5) is a diagram illustrating a capacity estimation result according to another embodiment;
FIG. 7 (6) is a diagram illustrating a capacity estimation result according to another embodiment;
FIG. 7 (7) is a diagram illustrating one example of the capacity estimation result according to another embodiment;
FIG. 8 is a schematic flow chart diagram of a product capacity assessment method in one embodiment;
FIG. 9 is a timing diagram illustrating the interaction between the access stratum service module in the server and the client in one embodiment;
FIG. 10 is a timing diagram illustrating the interaction between the access stratum service module and the execution stratum service module in the server in one embodiment;
FIG. 11 is a block diagram showing the structure of a product capacity evaluating apparatus according to an embodiment;
FIG. 12 is a block diagram showing the structure of a code deployment apparatus in one embodiment;
FIG. 13 is a diagram showing an internal structure of a computer device in one embodiment;
fig. 14 is an internal structural view of a computer device in another embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of and not restrictive on the broad application.
The product capacity evaluation method and the code deployment method provided by the application can be applied to the application environment shown in fig. 1. The client 101 communicates with the server 102 and the host 103 through a network, and the server 102 communicates with the host 103 through the network. When receiving any configuration file sent by the client 101, the server 102 analyzes the configuration file to obtain corresponding configuration information, constructs a simulation request and a simulation request rule interacting with the first host based on the configuration information, sends the simulation request to the first host according to the simulation request rule, collects each index data of the first host, and then obtains a capacity evaluation result of a product according to each index data; the capacity evaluation result is used to evaluate the request processing capability of the artifact running in the first host for processing the simulated request, and meanwhile, the client 101 determines whether to deploy the code corresponding to the artifact in the second host according to the capacity evaluation result. The client 101 may be, but is not limited to, a terminal device such as various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and may also be, but is not limited to, a client application program running on the foregoing various terminal devices, the host 103 includes, but is not limited to, a mobile phone, a computer, an intelligent voice interaction device, an intelligent appliance, a vehicle-mounted terminal, and the like, and the server 102 may be implemented by an independent server or a server cluster formed by multiple servers.
In one embodiment, as shown in fig. 2, a product capacity evaluation method is provided, which is described by taking the method as an example applied to the server in fig. 1, and includes steps S210 to S240.
Step S210, receiving a configuration file sent by a client, and analyzing the configuration file to obtain configuration information; the configuration file is used to perform a capacity assessment of the code artifacts running in the first host.
In this embodiment, the client represents a user side corresponding to the product capacity evaluation task; and the client sends a configuration file corresponding to the capacity evaluation task to the server so that the server starts the capacity evaluation task according to the configuration file. In one embodiment, the client may further obtain a capacity evaluation result obtained after the server executes the capacity evaluation task, and intervene in the deployment process of the code corresponding to the product according to the capacity evaluation result; in another embodiment, after the client acquires the capacity evaluation result of the capacity evaluation task from the server, the capacity evaluation result may be further displayed in a display interface.
In the field of computer science, a configuration file is a computer file that can configure parameters and initial settings for some computer programs. In this embodiment, the configuration file is used to perform a capacity assessment of the code artifacts running in the first host. The configuration file defines the configuration information of the capacity evaluation task; in this embodiment, the configuration file is analyzed to obtain corresponding configuration information. In a specific embodiment, the configuration information includes common parameters of the capacity evaluation task, step parameters, expected index data, and the like, wherein the step parameters include parameters of steps of constructing request content, requesting a sending rule, and the like.
In one embodiment, the configuration file is manually defined and stored at a specified location; in this embodiment, the client acquires the configuration file from the designated location and transmits the configuration file to the server. In one embodiment, the configuration file is stored in a code repository.
Further, the format of the configuration file may be any one format; for example, in one embodiment, the configuration file is in the format of yaml. The design goal of YAML language is to facilitate the reading and writing of human beings; it is essentially a common data serialization format. Three formats are allowed in yaml, constant values, objects and arrays.
In one embodiment, the client triggers the capacity evaluation task through an interface provided by the server, and sends a configuration file corresponding to the capacity evaluation task to the server when the capacity evaluation task is triggered. Further, in an embodiment, the client may trigger the capacity evaluation task according to a manually issued start instruction, or trigger the capacity evaluation task after detecting that the step of deploying the code in the first host to form the code product in the pipeline is completed; this process will be described in detail in the following embodiments, and will not be described herein.
In this embodiment, the first host is a terminal where a product for performing capacity evaluation corresponds to, the product is deployed in the first host in advance, and after receiving the configuration file sent by the client, the server interacts with the first host according to configuration information obtained by analyzing the configuration file, so as to implement capacity evaluation on the product running in the first host. The deployment refers to compiling and packaging background service codes of the software, and distributing the background service codes to a host carrier to continuously run, wherein the deployed background service of the software can receive an access request of a client, perform corresponding processing according to the compiled code logic, and finally return a result to the client.
In one embodiment, determining the simulation request and each simulation request rule according to the configuration information is performed by an access stratum service module in the server; in this embodiment, the access stratum service module is responsible for interacting with the client, acquiring the configuration file sent by the client, and analyzing the configuration file to obtain the configuration information therein.
Step S220, a simulation request and a simulation request rule interacting with the first host are constructed according to the configuration information.
In one embodiment, the simulation request is sent by the server to the first host, and the first host needs to execute the content corresponding to the simulation request after receiving the simulation request. The simulation request rule represents a transmission rule of the simulation request, namely a rule to be followed when the server transmits the simulation request to the first host. Further, the specific contents of the simulation request and the simulation request rule may be predefined in the configuration file according to the actual situation. In one particular embodiment, the simulated request rules include a request magnitude per second and a request duration; the request magnitude per second represents the number of times that the server sends simulation requests to the first host computer per second; the request duration represents the total duration of the simulation request to be sent; in other embodiments, the simulation request rule may also be set to other contents, such as setting the transmission frequency of simulation requests, etc., the transmission time period of simulation requests, etc.
In one embodiment, the simulation request and the simulation request rule interacting with the first host are constructed according to the configuration information and are completed through an execution layer service module in the server; in this embodiment, before building the simulation request and the simulation request rule interacting with the first host according to the configuration information, the method further includes: and sending the configuration information to the execution layer service module through the access layer service module.
Step S230, sending a simulation request to the first host based on the simulation request rule.
After the simulation request and the simulation request rule are constructed according to the configuration information, the simulation request is sent to the first host according to the simulation request rule, and a product running in the first host executes the simulation request. The simulation request comprises the specific content of the simulation request, the simulation request rule defines the rule to be followed when the simulation request is sent to the first host, and the server determines how to send the simulation request according to the simulation request rule when the simulation request is sent to the first host.
In one embodiment, sending the emulation request to the first host based on the emulation request rule is accomplished by an execution layer service module in the server. Further, in one embodiment, the executive layer service module receives configuration information from the access layer service module, constructs a simulation request and simulation request rules based on the configuration information, and sends the simulation request to the first host based on the simulation request rules.
In one embodiment, the executive layer service module is communicated with the access layer service module through a message queue, that is, the access layer service module sends the simulation request and the simulation request rule to the executive layer service module through the message queue. Wherein, the message queue is a container for storing messages in the transmission process of the messages. The message queue manager acts as a man-in-the-middle in relaying a message from its source to its destination. The main purpose of the queues is to provide routing and guarantee delivery of messages; if the recipient is not available when the message is sent, the message queue will hold the message until it can be successfully delivered. In this embodiment, the emulation request and the emulation request rule are transferred between the access layer service module and the execution layer service module through a message queue.
Step S240, collecting each index data of the first host, and obtaining a capacity evaluation result of the code product according to each index data; the capacity evaluation result is used for evaluating the request processing capacity of the code product running in the first host for processing the simulation request, so that the client determines whether to deploy the code corresponding to the code product in the second host or not based on the capacity evaluation result.
Each index data represents index data expressed when the first host executes the simulation request. In one embodiment, the metric data includes a plurality of different types. In a particular embodiment, the types of metric data include: CPU occupancy, CPU occupancy float percentage, memory occupancy float percentage, network input, network output, request failure rate, request average delay, single core qps (a query Per Second is a query rate Per Second, is a number of Queries that a server can respond to Per Second, is a measure of how much traffic a particular query server processes within a specified time, i.e., the number of response requests Per Second, i.e., the maximum throughput capacity) target value, and so on.
In the process that the first host executes the simulation request, the server can acquire each index data in the first host in any mode. For example, the client may actively report each index data to the server, or the client may provide a corresponding interface, so that the server may obtain each index data from the client by calling the interface.
When a code product runs on a host to process a request of a client, resources such as a CPU (central processing unit) and a memory of the host need to be occupied, and the resources of the CPU and the memory of one host are limited, so that the code product cannot process excessive requests at the same time, namely the magnitude of the requests which can be processed by the code product is limited; in this embodiment, the evaluation of the capacity of the code product refers to that, in a short time, a simulation real user sends a large number of requests to a deployed product in the first host for processing, and then, in the process of processing the simulation request by the first host, whether the processing capacity of the code product meets expectations is determined according to index data such as resource consumption occupation of the first host.
In one embodiment, obtaining a capacity assessment result of the code product according to each index data comprises: and comparing each index data with the corresponding threshold value, determining whether the corresponding condition is met, and determining a capacity evaluation result according to the comparison result of each index data. In one embodiment, the threshold corresponding to each index data may be set according to an actual situation and stored in the designated path, and when the server acquires the index data of the first host, the server acquires each threshold from the designated path to judge each index data. In another embodiment, the threshold corresponding to each index data may also be determined according to configuration information obtained by parsing the configuration file.
Further, in a specific embodiment, the determination conditions for each index data and the corresponding threshold are as follows:
index data name Determination conditions
CPU utilization threshold Less than the corresponding threshold
CPU utilization float rate threshold Less than the corresponding threshold
Threshold of memory utilization Less than the corresponding threshold
Memory utilization float rate threshold Less than the corresponding threshold
Request failure rate threshold Less than the corresponding threshold
Request average elapsed time threshold Less than the corresponding threshold
Throughput threshold Greater than the corresponding threshold
In one embodiment, the capacity evaluation result includes a first evaluation result and a second evaluation result, the request processing capacity corresponding to the first evaluation result is better than the request processing capacity corresponding to the second evaluation result, and the first evaluation result is used for indicating the client to deploy the code corresponding to the code product to the second host.
In the present embodiment, the capacity evaluation result is divided into two cases, a first evaluation result and a second evaluation result, where the first evaluation result indicates that the request processing capability of the code product is better than the second evaluation result. In one embodiment, the first evaluation result corresponds to a code product being detected by a capacity evaluation and the second evaluation result corresponds to a code product not being detected by a capacity evaluation. Further, when the capacity evaluation result of the code artifact is a first evaluation result, that is, the code artifact passes the capacity evaluation detection, the first evaluation result instructs the client to deploy the code corresponding to the code artifact to the second host. It is understood that, if the obtained capacity evaluation result is the second evaluation result, the client will not deploy the code to the second host. It should be noted that, in the present embodiment, the references to "first" and "second" are only used for distinguishing and naming, and do not represent any actual meaning.
In this embodiment, the capacity evaluation result is divided into two cases, and when the capacity evaluation result is the first evaluation result, the first evaluation result indicates the client to continue to deploy the code corresponding to the code product to the second host, and the capacity evaluation of the code product and the code deployment are combined, so that the capacity evaluation result can intervene in the code deployment process, thereby improving the quality of the product deployed to the host.
In one embodiment, collecting each index data in the first host is completed by an execution layer service module in the server. Further, in an embodiment, after the execution layer service module collects the index data, the execution layer service module feeds back the index data to the access layer service module through the message queue.
In one embodiment, the capacity evaluation result of the product according to each index data is completed by a red line layer service module in the server. Further, in an embodiment, the red line layer service module obtains each index data in the first host from the access layer service module to perform capacity evaluation.
In another embodiment, after receiving the index data fed back by the executive layer service module through the message queue, the access layer service module further sends the index data to the client; in this embodiment, the red line layer service module of the server obtains each index data from the client, and then performs capacity evaluation. In this embodiment, each index data is sent to the client by the access layer service module, and then each index data is acquired from the client by the red line layer service module of the server, so that decoupling between each function module of the server can be realized. Here, the coupling refers to a phenomenon in which two or more systems or two types of motion interact with each other to be combined. Decoupling is to separate two motions to deal with the problem, and a common decoupling method is to ignore or simplify one motion which has little influence on the problem to be studied and only analyze the main motion.
In one embodiment, the capacity evaluation result of the code artifact may include an evaluation result corresponding to each index data, for example, the capacity evaluation result of the code artifact includes a CPU utilization rate pass (greater than a corresponding threshold), a CPU utilization floating value pass (greater than a corresponding threshold), a memory utilization rate pass (greater than a corresponding threshold), \8230. In another embodiment, the capacity evaluation result of the code product may be only the capacity of the code product passing or not passing; in this embodiment, if any one of the index data does not reach the corresponding judgment condition, it is determined that the capacity of the code product does not pass.
According to the product capacity evaluation method, when a configuration file which is sent by a client and used for carrying out capacity evaluation on a code product running in a first host is received, the configuration file is analyzed to obtain corresponding configuration information, a simulation request and a simulation request rule which are interacted with the first host are constructed based on the configuration information, the simulation request is sent to the first host according to the simulation request rule, all index data of the first host are collected, and then a capacity evaluation result of the product is obtained according to all the index data; the capacity evaluation result is used for evaluating the request processing capacity of the product running in the first host for simulating request processing, and meanwhile, the client determines whether to deploy the code corresponding to the product in the second host or not according to the capacity evaluation result. According to the method, in the process of capacity evaluation of the product, the steps of constructing the simulation request, sending the simulation request and collecting each index data are automatically completed according to the configuration file which is sent by the client and used for the capacity evaluation, so that the whole process of the whole capacity evaluation of the product is completely automated, and the cost is reduced; and simultaneously, the capacity evaluation result is used for determining whether to deploy the product in the second host, the deployment of the code and the capacity evaluation of the product are combined, and the code deployment process is interfered by the capacity evaluation result, so that the quality of the product deployed in the host is improved.
In one embodiment, after collecting each index data and obtaining the capacity evaluation result of the code product, the method further includes: and sending the capacity evaluation result to the client, so that the client displays the capacity evaluation result.
After the server obtains the capacity evaluation result according to the index data, the capacity evaluation result can be sent to the client, so that the client displays the capacity evaluation result in a display interface, and related personnel can conveniently and quickly check the evaluation result. The display of the capacity evaluation result by the client can be realized in any mode; for example, the capacity estimation result may be displayed only in text, or may be displayed in a form of a table, a graph, or the like.
In one embodiment, before sending a simulation request to the first host based on the simulation request rule and collecting various index data of the first host, the method further includes: and generating a task record of the capacity evaluation task, and storing the task record.
The task record is used for storing relevant information for executing the capacity evaluation task; in one embodiment, generating a task record for a capacity assessment task includes: and when receiving the configuration file sent by the client, acquiring information such as the current time, a requester of the task starting request and the like, and generating a task record. The requester is the user who starts the capacity estimation task.
Further, the task record is stored in the MDB of the server. MDB (message driver Bean) is an abbreviation for message driver Bean in EJB.
In this embodiment, after receiving the configuration file, before sending the simulation request to the first host according to the configuration information obtained by the parsing, a task record of a capacity evaluation task corresponding to the configuration file is generated and stored, and a test record of the capacity evaluation task can be recorded; and subsequently, the relevant information of the capacity evaluation task can be obtained by inquiring the task record.
Furthermore, after collecting the index data in the first host, the method further includes: the index data is stored. In one embodiment, each index data may be stored in the MDB of the server.
In another embodiment, after obtaining the capacity estimation result of the code product based on each index data, the capacity estimation result may be further stored.
In this embodiment, the index data and the capacity evaluation result obtained by the capacity evaluation task are stored, which is beneficial to searching and backtracking the capacity evaluation task.
In another embodiment, the client behaves as a pipeline atom; the pipeline refers to a carrier of a series of processes, a plurality of deployment related steps are integrated on the pipeline, a plurality of functions can be executed, for example, code deployment, request content creation, request rule setting, request sending, and product capacity standard assessment according to indexes, and each function can be an atom. And can automatically complete the assembly line of service deployment work. Each time the code changes, it is deployed through the pipeline.
In this embodiment, the pipeline atom needs to have various types of states, as well as state-flow functionality. In one embodiment, the various types of states of the pipeline atom are described as follows:
state of state Description of the preferred embodiment
ready Atomic ready state, start state
running Atomic executing state
fail/success Atomic execution end status, divided into success and failure
breakdown Atomic suspend suspended state
In one embodiment, the state flow of the pipeline atom may be represented as a state machine as shown in fig. 3, which is described in detail as follows:
path ID State transitions Circulation conditions
1 ready->running First start atom
2 running->fail/success The execution period is not suspended, and the normal end is
3 fail->running End of execution, failure, second start
4 success->running Finish, succeed, start for the second time
5 running->breakdown Is suspended during execution
Further, in this embodiment, after receiving the configuration file sent by the client, and after parsing the configuration file to obtain the configuration information, before sending the simulation request to the first host based on the simulation request rule, the method further includes: updating the state of the pipeline atom; specifically, the state of the pipeline atom is updated from the ready state to the execution state, i.e. ready- > running.
Further, in one embodiment, the pipeline atoms of the client are divided into a "performance test" atom and a "result determination" atom. Wherein, the atom of the 'performance test' includes: analyzing the configuration file to obtain configuration information, constructing a modeling request and a simulation request rule based on the configuration information, sending a simulation request to the first host according to the simulation request rule, and collecting index data of the first host. "result determines" atomic correspondence includes: and obtaining a capacity evaluation result of the code product based on each index data. In this embodiment, in the process of executing the simulation request by the first host, after acquiring each index data in the first host, the method further includes: the state of the pipeline atom is updated by the execution agent to an end state (success or failure) indicating that the "Performance test" atomic step execution is complete.
Similarly, for the "result determination" atom, after the red line layer service module acquires each index data from the client, the method further includes: the state of the "result predicate" atom is updated from the ready state to the execute state. After the red line layer service module determines a capacity evaluation result according to each index data, the method further comprises the following steps: the status of the "result predicate" atom is updated by the execution agent to an end status (success or failure) indicating that the "result predicate" atom step execution is complete.
In an embodiment, as shown in fig. 4, the present application further provides a code deployment method, which is described by taking the method as an example for being applied to the client in fig. 1, and includes steps S410 to S440.
Step S410, acquiring the code, and deploying the code in the first host to form a code product.
In this embodiment, the code represents code that needs to be deployed to the first host for capacity evaluation. In one embodiment, the code to be deployed may be obtained from a code repository. The first host represents a host for deploying the codes at this time, and after the codes are deployed in the first host to form code products, the capacity evaluation process of the products running in the first host is realized through interaction between the server and the first host. In one embodiment, the first host may be specified by a human or may be randomly selected. Further, deploying code in the host may be accomplished in any of a variety of ways.
Step S420, sending a configuration file corresponding to the capacity evaluation task to the server, where the configuration file is used to enable the server to perform capacity evaluation on the code product running in the first host.
The configuration file defines the configuration information of the capacity evaluation task; in this embodiment, the configuration file is analyzed to obtain corresponding configuration information. In a specific embodiment, the configuration information includes common parameters of the capacity evaluation task, step parameters, expected index data, and the like, wherein the step parameters include parameters of steps of constructing request content, requesting a sending rule, and the like.
In one embodiment, before sending the configuration file corresponding to the capacity evaluation task to the server, the method further includes: and when a capacity evaluation triggering event is monitored, acquiring a configuration file of a capacity evaluation task.
Wherein the capacity evaluation triggering event represents an event for starting execution of a capacity evaluation task; the capacity evaluation trigger event may be preset according to actual conditions. When a capacity evaluation triggering event is monitored, it means that a capacity evaluation task needs to be executed, and in this embodiment, the client sends a configuration file to the server when the capacity evaluation triggering event is monitored.
The client can acquire the configuration file from the code warehouse; the code repository is used for storing configuration files and code products. In one embodiment, the configuration file is manually stored to the code repository prior to sending the configuration file corresponding to the capacity assessment task to the server to cause the server to perform the capacity assessment task. When monitoring a capacity evaluation triggering event, the client acquires a configuration file of a capacity evaluation task from the code warehouse and sends the configuration file corresponding to the capacity evaluation task to the server.
In one embodiment, when a task starting instruction is received, a configuration file corresponding to a capacity evaluation task is sent to a server. Further, in one embodiment, the task start instruction may be a manually issued instruction for the client to start executing the capacity assessment task. In another embodiment, the task start instruction may also be issued automatically, for example, for a task executed regularly, it may be set in a program to issue the task start instruction automatically at preset time intervals, so that the client starts the capacity evaluation task, parses the configuration file to obtain the configuration information, and sends the simulation request to the first host based on the configuration information. In other embodiments, the task start instruction may be issued in other manners.
Step S430, after the server starts a capacity evaluation task based on the configuration file, obtaining a capacity evaluation result from the server; the capacity evaluation result is determined by the server based on each index data of the first host, each index data is obtained after the server sends a simulation request to the first host based on a simulation request rule, and the simulation request rule and the simulation request are obtained based on configuration information obtained by analyzing the configuration file.
The determination process of the server for the capacity estimation result may refer to the above embodiment of the product capacity estimation method, and is not described herein again.
Step S440 determines whether to deploy the code in the second host according to the capacity evaluation result.
In one embodiment, the capacity evaluation result includes a first evaluation result and a second evaluation result, the request processing capacity corresponding to the first evaluation result is better than the request processing capacity corresponding to the second evaluation result, and the first evaluation result is used for indicating the client to deploy the code corresponding to the code product to the second host.
In the present embodiment, the capacity evaluation result is divided into two cases, a first evaluation result and a second evaluation result, where the first evaluation result indicates that the request processing capability of the code product is better than the second evaluation result. In one embodiment, the first evaluation result corresponds to a code product being detected by a capacity evaluation and the second evaluation result corresponds to a code product not being detected by a capacity evaluation. Further, when the capacity evaluation result of the code artifact is a first evaluation result, that is, the code artifact passes the capacity evaluation detection, the first evaluation result instructs the client to deploy the code corresponding to the code artifact to the second host. It is understood that if the obtained capacity evaluation result is the second evaluation result, the client will not deploy the code to the second host. It should be noted that, in the present embodiment, the references to "first" and "second" are only used for distinguishing and naming, and do not represent any actual meaning.
In this embodiment, the capacity evaluation result is divided into two cases, and when the capacity evaluation result is the first evaluation result, the first evaluation result indicates the client to continue to deploy the code corresponding to the code product to the second host, and the capacity evaluation and the code deployment of the code product are combined, so that the capacity evaluation result can intervene in the code deployment process, thereby improving the quality of the product deployed to the host.
According to the code deployment method, the configuration file corresponding to the capacity evaluation task is sent to the server, so that the server starts the capacity evaluation task based on the configuration file, and the capacity evaluation result of the capacity evaluation task obtained by the server is obtained. The server obtains configuration information according to the analysis configuration file, constructs a modeling simulation request and a simulation request rule according to the configuration information, then sends a simulation request to the first host according to the simulation request rule, collects each index data in the first host, obtains a capacity evaluation result according to each index data, and enables the server to automatically complete the steps of constructing the simulation request and rule, sending the simulation request, collecting the index data and generating the capacity evaluation result according to the configuration file, so that the whole capacity evaluation process of the code product is completely automated, and the cost is reduced. Meanwhile, whether the code is deployed to the second host is determined by combining the capacity evaluation result of the code product, and the code deployment process is interfered by the capacity evaluation result by combining the product capacity evaluation and the code deployment, so that the quality of the product deployed to the host is improved.
In one embodiment, after obtaining the capacity estimation result from the server, the method further includes: and displaying the capacity evaluation result.
After the capacity evaluation result is obtained, the capacity evaluation result can be displayed in a display interface of the client, so that related personnel can conveniently and quickly check the evaluation result. The display of the capacity evaluation result can be realized in any mode; for example, the capacity estimation result may be displayed only in text, or may be displayed in a form of a table, a graph, or the like.
The application also provides an application scenario applying the code deployment method. Specifically, the application of the code deployment method in the application scenario is as follows, and in this embodiment, the code deployment method is implemented in a client in a pipeline atomic manner. As shown in fig. 5, the method comprises the following steps:
s1, pushing the configuration file of the written codes and product capacity evaluation to a remote warehouse by related personnel users to be stored in a code warehouse. The type of the configuration file is in a yaml format, the configuration file is analyzed to obtain configuration information, the configuration information comprises public parameters used for capacity evaluation, step parameters, expected index data and the like, and the step parameters comprise parameters of steps of request content construction, request sending rules and the like. And storing the written configuration file and the code together.
And S2, running an automatic deployment pipeline, deploying the code generation codes to a plurality of hosts in batches, and firstly deploying the codes to a first host to form code products. The "pressure measurement (capacity evaluation)" is selected to be performed after the step of "deploying one host (first host)", as shown in the interface of fig. 6 (1), that is, the configuration file is sent to the server corresponding to S3.
And S4, acquiring a capacity evaluation result, and controlling a deployment process according to the product capacity evaluation result. When each item of index data of the product capacity evaluation passes through, the step S5 is entered, the pipeline continues to execute, and the code is deployed to the second host; as shown in the interface of fig. 6 (2), the gradation of 5% represents the second host deployed to 5%. In this embodiment, when the capacity evaluation passes, only 5% of the second hosts are subjected to code deployment, and after the step of gray level 5%, other processes of evaluating or detecting the codes may be performed.
When the product capacity evaluation fails, the process proceeds to step S6, the pipeline stops running, and the deployment of the code to the second host is stopped, so as to ensure that the quality of the product deployed to the host is within the expected range, as shown in the interface of fig. 6 (3), and when the pressure measurement (capacity evaluation) fails, the deployment to the second host is stopped. Furthermore, when the capacity evaluation result fails, the evaluation report can be checked, and the code can be modified.
After obtaining the capacity evaluation result, checking a product capacity evaluation report, and reporting fluctuation of each evaluation index of the code product when processing the request during the period of simulating and sending the request, which is also a judgment basis for determining whether the code product capacity evaluation passes, for example, specifically includes a CPU utilization rate, a memory utilization rate, a number of processing requests per second, a duration of processing a single request, and the like, as shown in fig. 7 (1), 7 (2) to 7 (7).
The application further provides an application scenario, and the application scenario applies the product capacity assessment method. Specifically, the product capacity assessment method involves a client and a server in the application scenario, and includes the steps shown in fig. 8, which are described in detail as follows:
the client, in this embodiment, is represented as a "performance test" atom and a "result determination" atom in the pipeline. The performance test atom mainly interacts with an access layer service module of the server and is matched with an execution layer service module of the server to perform related work such as simulation sending request and the like. The atom for judging the pressure measurement result is mainly interacted with a red line layer service module of the server, capacity evaluation is carried out according to index data of each evaluation index generated in the process of processing the simulation request by the code product deployed on the target host, and whether the assembly line can continue to execute subsequent deployment work is further determined.
The server side mainly comprises three service modules: the system comprises an access layer service module, an execution layer service module and a red line layer service module. The access layer service module is mainly responsible for analyzing the configuration file transmitted by the pipeline atom of the client, and sending the analyzed configuration information to the execution layer service module through the message queue. And the execution layer service module executes corresponding operations according to the configuration information, wherein the operations comprise request content construction, request rule setting, request sending and the like, and the execution result of each step is sent to the access layer service module through the message queue. And meanwhile, the access layer service module controls the overall progress of the capacity evaluation task once according to the execution result of each step. And after the product finishes processing the request, the red line layer service module judges whether the product capacity evaluation passes through a certain algorithm according to each index data collected by the execution layer.
The access layer service module and the execution layer service module can automatically execute each step in the product capacity evaluation process, and the internal technical principle mainly depends on the control of the access layer service module on the whole process, and is shown in fig. 9. Wherein, the pipeline atom is a client, in particular to a performance test atom; the worker bee represents a code warehouse.
1. Triggering a product capacity evaluation task through a StartPTT () interface;
2. storing the initial data of the task into a database, updating the task state, and updating the initial data of the task into running from ready;
3. the content in the configuration file is analyzed into a step sequence, stepControl () can circularly generate configuration parameters of each step into a Message Queue (MQ), an execution layer service module continuously acquires step information from the Message Queue, corresponding operation is executed, an execution result is generated into the Message Queue, an access layer service module acquires the execution result of each step from the Message Queue, and the production of the step sequence is controlled according to the result of each step, so that the progress state of a capacity evaluation task is controlled, wherein the internal technical principle of stepControl () is shown in figure 10.
4. Providing a GetTaskStatus () interface for pipeline atoms to inquire the state and the result of a product capacity evaluation task for one time;
5. and providing a GetDataForRedline () interface for the pipeline atom to inquire data required by the 'result judgment' atom, wherein the data comprises a starting time interval and a stopping time interval of a sending request.
And the red line layer service module starts to collect index data of each evaluation index of the primary capacity evaluation task after the access layer service module and the execution layer service module finish sending requests, and judges whether the product capacity evaluation passes or not. In one embodiment, the access layer module feeds back various evaluation data to the pipeline atom of the client, and the client sends the various evaluation data to the red line layer service module.
According to the code deployment method and the product capacity evaluation method, the code product capacity evaluation process is automated, so that the manual operation cost of a user is greatly reduced; meanwhile, the product capacity evaluation and the code deployment process are fused on the same pipeline, and the deployed product quality is effectively controlled through the capacity evaluation result.
It should be understood that, although the steps in the flowcharts involved in the above embodiments are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a part of the steps in each flowchart involved in the above embodiments may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the steps or stages is not necessarily sequential, but may be performed alternately or alternately with other steps or at least a part of the steps or stages in other steps.
In one embodiment, as shown in fig. 11, there is provided a product capacity assessment apparatus, which may be a part of a computer device using a software module or a hardware module, or a combination of the two modules, and specifically includes: a receiving module 201, a constructing module 202, a request sending module 203 and an evaluating module 204, wherein:
a receiving module 201, configured to receive a configuration file sent by a client, and analyze the configuration file to obtain configuration information; the configuration file is used for carrying out capacity evaluation on a code product running in the first host;
the building module 202 is used for building a simulation request and a simulation request rule interacting with the first host according to the configuration information;
the request sending module 203 is configured to send a simulation request to the first host based on a simulation request rule, and collect each index data of the first host;
the evaluation module 204 is configured to collect each index data of the first host, and obtain a capacity evaluation result of the code product according to each index data; the capacity evaluation result is used for evaluating the request processing capacity of the code product running in the first host for processing the simulation request, so that the client determines whether to deploy the code corresponding to the code product in the second host or not based on the capacity evaluation result.
When the product capacity evaluation device receives a configuration file which is sent by a client and used for carrying out capacity evaluation on a code product running in a first host, the configuration file is analyzed to obtain corresponding configuration information, a simulation request and a simulation request rule which are interacted with the first host are constructed based on the configuration information, the simulation request is sent to the first host according to the simulation request rule, all index data of the first host are collected, and then a capacity evaluation result of the product is obtained according to all the index data; the capacity evaluation result is used for evaluating the request processing capacity of the product running in the first host for processing the simulation request, and meanwhile, the client determines whether to deploy the code corresponding to the product in the second host or not according to the capacity evaluation result. According to the device, in the process of capacity evaluation of the product, the steps of constructing the simulation request, sending the simulation request and collecting each index data are automatically completed according to the configuration file which is sent by the client and used for the capacity evaluation, so that the whole process of the whole capacity evaluation of the product is completely automated, and the cost is reduced; and meanwhile, the capacity evaluation result is used for determining whether a product is deployed in the second host, the deployment of the code and the capacity evaluation of the product are combined, and the code deployment process is interfered by the capacity evaluation result, so that the quality of the product deployed in the host is improved.
In one embodiment, the capacity evaluation result includes a first evaluation result and a second evaluation result, the request processing capacity corresponding to the first evaluation result is better than the request processing capacity corresponding to the second evaluation result, and the first evaluation result is used for indicating the client to deploy the code corresponding to the code product to the second host.
In one embodiment, the apparatus further comprises: and the result sending module is used for sending the capacity evaluation result to the client so that the client displays the capacity evaluation result.
In one embodiment, the apparatus includes an access layer service module and an execution layer service module, wherein the access layer service module includes the receiving module; the above-mentioned device still includes: the forwarding module is used for sending configuration information to the execution layer service module through the access layer service module; the execution layer service module comprises a construction module and a request sending module of the device.
In one embodiment, the device further comprises a red line layer service module, and the red line layer service module comprises the evaluation module.
The present application also provides a code deployment apparatus, as shown in fig. 12, the apparatus including: a first deployment module 301, a sending module 302, an evaluation result obtaining module 303, and a second deployment module 304. Wherein:
the first deployment module 301 is configured to obtain a code and deploy the code in a first host to form a code product;
a sending module 302, configured to send a configuration file corresponding to the capacity assessment task to the server, where the configuration file is used to enable the server to perform capacity assessment on a code product running in the first host;
an evaluation result obtaining module 303, configured to obtain a capacity evaluation result from the server after the server starts a capacity evaluation task based on the configuration file; the capacity evaluation result is that the server is determined based on each index data of the first host, each index data is obtained after the server sends a simulation request to the first host based on a simulation request rule, and the simulation request rule and the simulation request are obtained based on configuration information obtained by analyzing a configuration file;
and a second deployment module 304, configured to determine whether to deploy the code in the second host according to the capacity evaluation result.
In the code deployment device, the client acquires the code and deploys the code to the first host to form a code product, sends the configuration file to the server, enables the server to start a capacity evaluation task according to the configuration file, and acquires a capacity evaluation result of the code product from the server; the capacity evaluation result is determined by the server according to each index data of the first host, each index data is acquired after the server sends a simulation rule to the first host according to a simulation request rule, and the simulation request rule and the simulation request are obtained by constructing configuration information obtained by analyzing the configuration file; the capacity evaluation result is used for evaluating the request processing capacity of the code product running in the first host for processing the simulation request, and meanwhile, the client determines whether to deploy the code corresponding to the product in the second host or not according to the capacity evaluation result. According to the device, in the process of carrying out capacity evaluation on the code product, the client sends the configuration file for capacity evaluation to the server, so that the server automatically completes the steps of constructing the simulation request, sending the simulation request and collecting each index data according to the configuration file, the whole process of capacity evaluation on the product is completely automated, and the cost is reduced; and simultaneously, the capacity evaluation result is used for determining whether to deploy the product in the second host, the deployment of the code and the capacity evaluation of the product are combined, and the code deployment process is interfered by the capacity evaluation result, so that the quality of the product deployed in the host is improved.
In one embodiment, the above apparatus further comprises: and the display module is used for displaying the capacity evaluation result.
For specific embodiments of the product capacity evaluation device and the code deployment device, reference may be made to the above embodiments of the product capacity evaluation method and the code deployment method, which are not described herein again. The modules in the product capacity evaluation device and the code deployment device can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 13. The computer device includes a processor 131, memory (including non-volatile storage medium 132, internal memory 133), and a network interface 134 connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The non-volatile storage medium 132 stores an operating system 1321, computer programs 1322, and a database 1323. The internal memory 133 provides an environment for the operating system 1321 and computer programs 1322 in the non-volatile storage medium 132 to run. The database 1323 of the computer device is used for storing data such as capacity estimation results. The network interface 134 of the computer device is used for communicating with an external terminal through a network connection. The computer program 1322 is executed by a processor to implement a product volume assessment method.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 14. The computer apparatus includes a processor 141, memory (including non-volatile storage medium 142, internal memory 143), a communication interface 144, a display 145, and an input device 146 connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The non-volatile storage medium 142 stores an operating system 1421 and computer programs 1422. The internal memory 143 provides an environment for the operation of an operating system 1421 and computer programs 1422 in the nonvolatile storage medium 142. The communication interface 144 of the computer device is used for performing wired or wireless communication with an external terminal, and the wireless communication may be implemented by WIFI, an operator network, NFC (near field communication), or other technologies. The computer program 1422 is executed by a processor to implement a product code deployment method. The display 145 of the computer device may be a liquid crystal display or an electronic ink display, and the input device 146 of the computer device may be a touch layer covered on the display, a key, a trackball or a touch pad arranged on a housing of the computer device, or an external keyboard, a touch pad or a mouse.
It will be appreciated by those skilled in the art that the configurations shown in fig. 13 and 14 are only block diagrams of partial configurations relevant to the present application, and do not constitute a limitation on the computer device to which the present application is applied, and a specific computer device may include more or less components than those shown in the figures, or may combine some components, or have different arrangements of components.
In one embodiment, a computer device is further provided, which includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above method embodiments when executing the computer program.
In an embodiment, a computer-readable storage medium is provided, in which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
In one embodiment, a computer program product or computer program is provided that includes computer instructions stored in a computer-readable storage medium. The computer instructions are read by a processor of a computer device from a computer-readable storage medium, and the computer instructions are executed by the processor to cause the computer device to perform the steps in the above-mentioned method embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
All possible combinations of the technical features in the above embodiments may not be described for the sake of brevity, but should be considered as being within the scope of the present disclosure as long as there is no contradiction between the combinations of the technical features.
The above examples only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method for product capacity assessment, the method comprising:
receiving a configuration file sent by a client, and analyzing the configuration file to obtain configuration information; the configuration file is used for carrying out capacity evaluation on a code product running in the first host;
constructing a simulation request and a simulation request rule interacting with the first host according to the configuration information;
sending the simulation request to the first host based on the simulation request rule, and collecting each index data of the first host;
acquiring each index data of the first host, and obtaining a capacity evaluation result of the code product according to each index data; the capacity evaluation result is used for evaluating the request processing capacity of the code product running in the first host for processing the simulation request, so that the client determines whether to deploy the code corresponding to the code product in the second host or not based on the capacity evaluation result.
2. The product capacity assessment method according to claim 1, wherein the capacity assessment result comprises a first assessment result and a second assessment result, the request processing capability of the first assessment result is better than the request processing capability of the second assessment result, and the first assessment result is used to instruct the client to deploy the code corresponding to the code product to the second host.
3. The product capacity assessment method according to claim 1, further comprising, after the collecting each index data to obtain a capacity assessment result of the code product:
and sending the capacity evaluation result to the client so that the client displays the capacity evaluation result.
4. The product capacity assessment method according to claim 1, wherein the parsing the configuration file to obtain configuration information comprises: analyzing the configuration file through an access layer service module to obtain configuration information;
before the constructing the simulation request and the simulation request rule interacting with the first host according to the configuration information, the method further includes: sending the configuration information to an execution layer service module through the access layer service module;
the constructing of the simulation request and the simulation request rule interacting with the first host according to the configuration information comprises: constructing, by the executive layer service module, a simulation request and simulation request rules for interaction with the first host based on the configuration information;
the sending the simulation request to the first host based on the simulation request rule and collecting the index data of the first host comprises: and sending the simulation request to the first host through the execution layer service module based on the simulation request rule, and collecting each index data of the first host.
5. The product capacity estimation method according to claim 4, wherein obtaining the capacity estimation result of the code product based on each of the index data includes:
and evaluating each index data according to the evaluation index in the configuration information through a red line layer service module to obtain a capacity evaluation result of the code product.
6. A method for code deployment, the method comprising:
acquiring a code, and deploying the code in a first host to form a code product;
sending a configuration file to a server, wherein the configuration file is used for enabling the server to carry out capacity evaluation on code products running in a first host;
after the server starts a capacity evaluation task based on the configuration file, obtaining a capacity evaluation result from the server; the capacity evaluation result is determined by the server based on each index data of the first host, each index data is obtained after the server sends a simulation request to the first host based on a simulation request rule, and the simulation request rule and the simulation request are constructed based on configuration information obtained by analyzing the configuration file;
and determining whether to deploy the code in the second host according to the capacity evaluation result.
7. The code deployment method of claim 6, further comprising, after the obtaining the capacity evaluation result from the server:
and displaying the capacity evaluation result.
8. A product volume assessment apparatus, the apparatus comprising:
the receiving module is used for receiving the configuration file sent by the client and analyzing the configuration file to obtain configuration information; the configuration file is used for carrying out capacity evaluation on a code product running in the first host;
the building module is used for building a simulation request and a simulation request rule interacted with the first host according to the configuration information;
the request sending module is used for sending the simulation request to the first host based on the simulation request rule and collecting each index data of the first host;
the evaluation module is used for obtaining a capacity evaluation result of the code product according to each index data; the capacity evaluation result is used for evaluating the request processing capacity of the code product running in the first host for processing the simulation request, so that the client determines whether to deploy the code corresponding to the code product in the second host or not based on the capacity evaluation result.
9. A code deployment apparatus, the apparatus comprising:
the first deployment module is used for acquiring a code and deploying the code in the first host to form a code product;
the system comprises a sending module, a capacity evaluation module and a capacity evaluation module, wherein the sending module is used for sending a configuration file corresponding to a capacity evaluation task to a server, and the configuration file is used for enabling the server to carry out capacity evaluation on a code product running in a first host;
an evaluation result obtaining module, configured to obtain a capacity evaluation result from the server after the server starts a capacity evaluation task based on the configuration file; the capacity evaluation result is determined by the server based on each index data of the first host, each index data is obtained after the server sends a simulation request to the first host based on a simulation request rule, and the simulation request rule and the simulation request are constructed based on configuration information obtained by analyzing the configuration file;
and the second deployment module is used for determining whether to deploy the code in the second host according to the capacity evaluation result.
10. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
CN202110989181.5A 2021-08-26 2021-08-26 Product capacity evaluation method, code deployment method, device and computer equipment Pending CN115729565A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110989181.5A CN115729565A (en) 2021-08-26 2021-08-26 Product capacity evaluation method, code deployment method, device and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110989181.5A CN115729565A (en) 2021-08-26 2021-08-26 Product capacity evaluation method, code deployment method, device and computer equipment

Publications (1)

Publication Number Publication Date
CN115729565A true CN115729565A (en) 2023-03-03

Family

ID=85290018

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110989181.5A Pending CN115729565A (en) 2021-08-26 2021-08-26 Product capacity evaluation method, code deployment method, device and computer equipment

Country Status (1)

Country Link
CN (1) CN115729565A (en)

Similar Documents

Publication Publication Date Title
US9323599B1 (en) Time series metric data modeling and prediction
CN109586952B (en) Server capacity expansion method and device
US9167028B1 (en) Monitoring distributed web application transactions
US9811356B2 (en) Automated software configuration management
CN108256118B (en) Data processing method, device, system, computing equipment and storage medium
WO2017131774A1 (en) Log event summarization for distributed server system
US9515901B2 (en) Automatic asynchronous handoff identification
CN108111554B (en) Control method and device for access queue
JP2017514218A (en) Running third-party applications
CN109408375A (en) The generation method and device of interface document
CN113672441B (en) Method and device for testing intelligent equipment
CN109324962A (en) A kind of test method and equipment of the application program based on cloud internet of things technology
WO2017074471A1 (en) Tracking contention in a distributed business transaction
CN108733545B (en) Pressure testing method and device
US9577900B1 (en) Application centric network experience monitoring
CN112313627A (en) Mapping mechanism of events to serverless function workflow instances
CN110941486A (en) Task management method and device, electronic equipment and computer readable storage medium
CN112506791A (en) Application program testing method and device, computer equipment and storage medium
US11334476B2 (en) Client-side survey control
US20150301877A1 (en) Naming of nodes in net framework
CN112052015A (en) Version release method and device, computer equipment and storage medium
CN116662132A (en) Evaluation method, virtual deployment method, computer device, and storage medium
CN112631577B (en) Model scheduling method, model scheduler and model safety test platform
CN115729565A (en) Product capacity evaluation method, code deployment method, device and computer equipment
WO2017131777A1 (en) Application aware cluster monitoring

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