CN112199218A - A pressure measurement method, device, electronic device and storage medium - Google Patents
A pressure measurement method, device, electronic device and storage medium Download PDFInfo
- Publication number
- CN112199218A CN112199218A CN202011159880.9A CN202011159880A CN112199218A CN 112199218 A CN112199218 A CN 112199218A CN 202011159880 A CN202011159880 A CN 202011159880A CN 112199218 A CN112199218 A CN 112199218A
- Authority
- CN
- China
- Prior art keywords
- request message
- dyeing
- mark
- pressure measurement
- 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 134
- 238000009530 blood pressure measurement Methods 0.000 title claims abstract description 86
- 238000003860 storage Methods 0.000 title claims abstract description 23
- 238000004043 dyeing Methods 0.000 claims abstract description 151
- 238000004519 manufacturing process Methods 0.000 claims abstract description 38
- 230000008569 process Effects 0.000 claims abstract description 29
- 239000003550 marker Substances 0.000 claims description 23
- 230000005540 biological transmission Effects 0.000 claims description 16
- 238000004590 computer program Methods 0.000 claims description 14
- 238000004040 coloring Methods 0.000 claims description 10
- 238000005259 measurement Methods 0.000 claims 1
- 238000000691 measurement method Methods 0.000 claims 1
- 238000012546 transfer Methods 0.000 description 13
- 238000010586 diagram Methods 0.000 description 10
- 238000012545 processing Methods 0.000 description 10
- 238000012360 testing method Methods 0.000 description 9
- 238000005516 engineering process Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 5
- 238000002955 isolation Methods 0.000 description 5
- 230000009471 action Effects 0.000 description 3
- 239000003795 chemical substances by application Substances 0.000 description 3
- 238000010186 staining Methods 0.000 description 3
- 238000011144 upstream manufacturing Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000013404 process transfer Methods 0.000 description 2
- 238000004891 communication Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000011143 downstream manufacturing Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002085 persistent effect Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 238000013515 script Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000010998 test method Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/546—Message passing systems or structures, e.g. queues
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/547—Remote procedure calls [RPC]; Web services
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/54—Indexing scheme relating to G06F9/54
- G06F2209/547—Messaging middleware
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- General Factory Administration (AREA)
Abstract
The embodiment of the application provides a pressure measurement method and device, electronic equipment and a storage medium, and relates to the technical field of pressure measurement. The method comprises the following steps: receiving a request message sent by a client; intercepting the request message through a preset interception site and acquiring at least one request message with a dyeing mark from the request message; correspondingly transmitting the dyeing mark in the process of executing the request message in a cross-thread and/or cross-process manner and generating the pressure measurement flow; the method has the advantages that the pressure measurement flow generated by the request message is stored in the shadow table, the dyeing data and the production data are distinguished through the dyeing marks and are stored in an isolated mode, and the problems that dirty data generated by pressure measurement in the production table needs to be manually cleaned in the existing method, and a large amount of workload is increased for pressure measurement personnel are solved.
Description
Technical Field
The present disclosure relates to the field of pressure measurement technologies, and in particular, to a pressure measurement method, an apparatus, an electronic device, and a storage medium.
Background
In order to deal with large-scale traffic access, modern enterprise application services need to frequently perform pressure tests to evaluate traffic carrying capacity of the application services, and when the application services are subjected to the pressure tests, pressure test data are generally constructed through scripts, and then the pressure tests are performed through a pressure test engine.
The existing pressure measurement method not only generates a large amount of dirty data in the pressure measurement process, but also needs to manually remove the dirty data generated by pressure measurement in a production table after the pressure measurement is finished, so that a large amount of workload is increased for pressure measurement personnel.
Disclosure of Invention
An object of the embodiment of the application is to provide a pressure measurement method, a pressure measurement device, electronic equipment and a storage medium, dyeing data and production data are distinguished through dyeing marks and are stored in an isolated mode, and the problems that dirty data generated in pressure measurement in a production table needs to be manually cleaned in the existing method, and a large amount of workload is increased for pressure measurement personnel are solved.
The embodiment of the application provides a pressure measurement method, which comprises the following steps:
receiving a request message sent by a client;
intercepting the request message through a preset interception site and acquiring at least one request message with a dyeing mark from the request message;
correspondingly transmitting the dyeing mark in the process of executing the request message in a cross-thread and/or cross-process manner and generating the pressure measurement flow;
and storing the pressure measurement flow generated by the request message into a shadow table.
In the implementation process, the dyeing mark is added in the pressure measurement flow, and the dyeing mark is transmitted across threads and across threads, so that full-link transparent transmission is realized, and the dyeing data and the production data are isolated (the dyeing data are dynamically stored in a shadow table, and the production data are stored in a production table), so that the operation of clearing dirty data in the production table after pressure measurement is completed by a pressure measurement worker each time is avoided, the working time is saved, the efficiency is improved, and the problems that the dirty data generated by pressure measurement in the production table needs to be manually cleared away by the existing method, and a large amount of workload is increased for the pressure measurement worker are solved; and the dynamic isolation of the production data and the dyeing data is realized through the dyeing marks, and the dyeing data does not influence the production data, so that the pressure measurement can be carried out in an online cluster environment at any time without influencing the normal operation of actual services.
Further, the intercepting the request message through a preset interception site and acquiring at least one request message with a dyeing mark from the request message includes:
intercepting through a preset interception locus before the thread pool acquires a method for executing asynchronous calling by the thread so as to transmit a dyeing mark of the current thread to a sub-thread;
adding the dyeing indicia to a thread context of the child thread prior to execution of the child thread.
In the implementation process, the dyeing mark of the current thread is transmitted to the sub-thread, and the dyeing mark is added to the sub-thread, so that the cross-thread transmission of the dyeing mark is realized.
Further, the intercepting the request message through a preset interception site and acquiring at least one request message with a dyeing mark from the request message includes:
intercepting through a preset interception site before the current service sends an http cross-process request to obtain a request object;
adding a dyeing mark of a current thread in a current service into a request header of the request object to transfer the dyeing mark into a downstream service;
after the downstream service receives the request, acquiring a dyeing mark in the request header through an interception site preset in the downstream service;
adding the dyeing token to a thread context of the downstream service.
In the implementation process, when the services are called in a http cross-process mode, the dyeing mark is transmitted from the current service to the downstream service in a cross-process mode through the interception site, and the http cross-process transmission of the dyeing mark is achieved.
Further, the intercepting the request message through a preset interception site and acquiring at least one request message with a dyeing mark from the request message includes:
intercepting through a preset interception site before a current service sends rpc a cross-process request to obtain rpc a request;
adding the dyeing marks of the current thread in the current service to rpc requested attributes to deliver the dyeing marks to the downstream service;
after the downstream service receives the rpc request, acquiring the dyeing marks in the attributes through the preset interception sites in the downstream service;
adding the dyeing token to a thread context of the downstream service.
In the implementation process, when rpc cross-process calling is carried out between services, cross-process transmission of the dyeing marker from the current service to the downstream service is realized through a preset interception site, and cross-process transmission of the dyeing marker rpc is realized.
Further, the intercepting the request message through a preset interception site and acquiring at least one request message with a dyeing mark from the request message includes:
before asynchronous message sending, obtaining the message through a preset interception site;
adding a dyeing mark of a current thread of a current service to a header of the message;
after the downstream service receives the message, acquiring the dyeing mark from a header of the message through an interception site preset in the downstream service;
adding the dyeing token to a thread context of the downstream service.
In the implementation process, before the asynchronous message is sent, the message is acquired through the interception site, and the dyeing mark of the current thread is stored in the header of the message, so that the downstream service acquires the message and then simultaneously obtains the dyeing mark, and the cross-process transmission of the message of the dyeing mark is realized.
Further, the storing the piezometric flow generated by the request message into a shadow table includes:
before the dyeing data corresponding to the pressure measurement flow are stored, modifying the table name of the sql execution statement into a shadow table name, and storing the dyeing data into a shadow table.
In the implementation process, before the dyeing data is stored, the table name of the sql execution statement is dynamically modified into the shadow table name, and the dyeing data is automatically stored in the shadow table, so that the dyeing data is isolated from the production data, and the dynamic isolation of the production data and the dyeing data is realized.
Further, when the cache data is called, whether the data corresponding to the current thread contains a dyeing mark is judged;
if yes, adding a setting character string to the key value parameter to distinguish dyeing data from production data.
In the implementation process, dyeing data and production data are distinguished through the dyeing marks, execution parameters corresponding to the dyeing data are modified, and set character strings are added to the key value parameters to distinguish the dyeing data from the production data.
The embodiment of the present application further provides a pressure measurement device, and the device includes:
the message receiving module is used for receiving a request message sent by a client;
the mark acquisition module is used for intercepting the request message through a preset interception site and acquiring at least one request message with a dyeing mark from the request message;
the dyeing mark transmission module is used for correspondingly transmitting the dyeing mark in the process of executing the request message in a cross-thread and/or cross-process manner and generating the pressure measurement flow;
and the storage module is used for storing the pressure measurement flow generated by the request message into a shadow table.
In the process, the pressure measurement flow is marked by the dyeing mark, the full-link transparent transmission of the cross process and the cross line is realized, the dyeing data and the production data are isolated (the dyeing data are stored in the shadow table, and the production data are stored in the production table), the operation of clearing dirty data in the production table after the pressure measurement is finished by the pressure measurement personnel at every time is avoided, the working time is saved, the efficiency is improved, the problem that the dirty data generated by the pressure measurement in the production table needs to be manually cleared by the existing method is solved, and a large amount of workload is increased for the pressure measurement personnel.
An embodiment of the present application further provides an electronic device, where the electronic device includes a memory and a processor, where the memory is used to store a computer program, and the processor runs the computer program to enable the computer device to execute the pressure measurement method described in any one of the above.
An embodiment of the present application further provides a readable storage medium, where computer program instructions are stored, and when the computer program instructions are read and executed by a processor, the method for pressure measurement is performed.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a flowchart of a pressure measurement method according to an embodiment of the present disclosure;
fig. 2 is a block diagram of an implementation of a pressure measurement method provided in an embodiment of the present application;
FIG. 3 is a flowchart of cross-thread transfer provided by an embodiment of the present application;
FIG. 4 is a flowchart of the http cross-process dyed mark delivery provided by an embodiment of the present application;
FIG. 5 is a flow chart illustrating rpc cross-process dyed tag delivery provided by an embodiment of the present application;
FIG. 6 is a flowchart of cross-process dyed mark delivery in message middle provided by an embodiment of the present application;
FIG. 7 is a flowchart of a process for storing staining data provided by an embodiment of the present application;
fig. 8 is a block diagram of a pressure measurement device according to an embodiment of the present disclosure;
fig. 9 is a specific structural block diagram of a pressure measurement device according to an embodiment of the present application.
Icon:
100-a message receiving module; 200-a marker acquisition module; 300-a staining marker transfer module; 310-a cross-thread transfer module; 311-child thread marking module; 320-request object acquisition module; 321-a first marker adding module; 322-a first indicia acquisition module; 323-a second mark adding module; 330-rpc request acquisition module; 331-a third tag addition module; 332-a second marker acquisition module; 333-a fourth tag addition module; 340-a message acquisition module; 341-fifth tag addition module; 342-a third marker acquisition module; 343-a sixth tag addition module; 400-a storage module; 401-a judging module; 402-staining data saving module.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
Example 1
Referring to fig. 1, fig. 1 is a flowchart of a pressure measurement method according to an embodiment of the present disclosure. The method is used for performing a pressure test on an application service, and is applied to a server, for example, as one implementation manner, the method may be a plug-in which a dyeing mark in a request is transmitted in a full link for pressure test, and the use of the plug-in has the advantages that the function of the application service itself is not changed or affected while the application service is subjected to the pressure test, and the convenience of the use of the application service is improved, as shown in fig. 2, the method is an implementation block diagram of the pressure test method according to the embodiment of the present application, and specifically may include the following steps:
step S100: receiving a request message sent by a client;
illustratively, before a request message is sent by a client, the request message needs to be preprocessed to have a pressure measurement mark; the normal pressure measurement request is based on the http request, and a pressure-measurement mark (dyeing-mark) key value pair (bag-flow) is added to the http request to mark the request message as a pressure measurement flow, specifically, identification information such as a dyeing mark (usually, a key value pair) is usually added to a request header of the http request; therefore, when the client terminal sends the request message, the received request message is the request message with the coloring mark.
Step S200: intercepting the request message through a preset interception site and acquiring at least one request message with a dyeing mark from the request message;
step S300: correspondingly transmitting the dyeing mark in the process of executing the request message in a cross-thread and/or cross-process manner and generating the pressure measurement flow;
the interception site is responsible for acquiring whether the request message has the dyeing mark or not, if so, the dyeing mark is placed in the thread context, and is acquired from the thread context and delivered to the cross-process request or the sub-thread when the next cross-process or cross-thread occurs, so that the dyeing mark is continuously transmitted, and finally the purpose of full-link transmission of the dyeing mark is achieved.
The interception site is a predefined universal point, for example, an http request or a certain name can be used as the interception site, in a specific application process, interception starts when the predefined universal point is met, and the selection of the interception site is one of the methods inevitably called by the thread pool starting sub-thread execution, so that the interception site does not need to be set for each service independently, and the method has universality.
In the cross-thread and/or cross-process execution process of the request message, the dyeing mark in the request message is obtained through the interception site, and the dyeing mark is correspondingly transmitted in a cross-thread and/or cross-process mode, and the process does not affect the execution of the request message, so that the normal operation of production data is not affected.
The application is based on Java _ agent technology, the application service is enhanced without intruding by mounting a software package (agent plugin package) when the application service is started, the application service is unaware, when a flow request reaches service processing, a processing method corresponding to a method-level interception service container is intercepted, specifically, a method for receiving a processing request by tomcat (Java Web server) is intercepted, and a dyeing mark is placed in the context of a processing thread before the method is executed, so that the marking of the current thread is realized; in the processing process of the request message after adding the coloring mark, there may be a cross-thread processing flow within the same service, or a cross-service processing flow may occur, or both, where, as shown in fig. 3, the cross-thread transfer is a flowchart of cross-thread transfer, and the cross-thread transfer specifically may include:
step S310: intercepting through a preset interception locus before the thread pool acquires a method for executing asynchronous calling by the thread so as to transmit a dyeing mark of the current thread to a sub-thread;
step S311: a dyeing marker is added to the thread context of the child thread prior to its execution.
The dyed tag is added to the thread context of the sub-thread, ensuring cross-thread transfer of the dyed tag.
Illustratively, based on two thread pools common to java: the method comprises the steps that a thread pool of a jdk (Java Development kit) self-carrying and a thread pool packaged by a Spring framework realize interception before a method for executing asynchronous calling by a thread is obtained, a dyeing mark in the thread context of the current thread is transferred to a sub-thread, and the dyeing mark is stored in the thread context of the sub-thread before the sub-thread is executed, so that cross-thread transfer of the dyeing mark is realized.
For implementation of cross-process Transfer, for example, the application service cross-process Call mainly includes a http (HyperText Transfer Protocol) cross-process, rpc (Remote Procedure Call Protocol) cross-process, a message middle cross-process, and the like, where as shown in fig. 4, the http cross-process Call mainly includes the following steps:
step S320: intercepting through a preset interception site before the current service sends an http cross-process request to obtain a request object;
step S321: adding the dyeing mark of the current thread in the current service to the request header of the request object so as to transfer the dyeing mark to the downstream service;
step S322: after receiving the request by the downstream service, acquiring a dyeing mark in a request header through an interception site preset in the downstream service;
step S323: a dyeing marker is added to the thread context of the downstream service.
When http cross-process calling is carried out between services, illustratively, when a request is sent by an http client technology, a request object is acquired by setting an interception site before the current service sends a cross-process request, a dyeing mark in the context of the current thread is set in a request header of the request object, and the dyeing mark is transmitted to a downstream service; before processing the request, the downstream service acquires the dyeing mark from the request header through the interception site and puts the dyeing mark into the context of the current thread of the downstream service, so that the dyeing mark is transferred from the upstream service to the downstream service in a cross-process manner.
As shown in fig. 5, rpc flowchart for cross-process dye marker delivery, rpc cross-process call between services mainly includes the following steps:
step S330: intercepting through a preset interception site before a current service sends rpc a cross-process request to obtain rpc a request;
step S331: adding the dyeing marks of the current thread in the current service to the attributes requested by rpc to deliver the dyeing marks to the downstream service;
step S232: after the downstream service receives rpc request, acquiring dyeing marks in attributes through the preset interception sites in the downstream service;
step S333: a dyeing marker is added to the thread context of the downstream service.
When rpc cross-process calling is carried out between services, for example, rpc calling is realized through grpc and dubbo and other technologies, and by setting an interception site, before the current service sends a cross-process request, a dyeing mark in the current thread context is put into attributes (attachment) of a rpc request; the downstream service puts the dyeing marks in the attributes into the context of the processing request thread of the downstream service when passing through the interception site before processing the received rpc request, thereby realizing that the dyeing marks are transmitted from the upstream service to the downstream service in a cross-process manner.
As shown in fig. 6, which is a flowchart of the dyed mark transfer of inter-message cross-process, inter-message cross-process invocation between services mainly includes the following steps:
step S340: before asynchronous message sending, obtaining a message through a preset interception site;
step S341: adding a dyeing mark of a current thread of a current service to a header of a message;
step S342: after receiving the message by the downstream service, acquiring the dyeing mark from a header of the message through an interception site preset in the downstream service;
step S343: a dyeing marker is added to the thread context of the downstream service.
In the process of asynchronous message sending, the service commonly used message middleware comprises kafka, rockmq, activeMQ and the like, and the message middleware is a middleware technology for realizing asynchronous cross-process message transmission. Before sending the message, acquiring the message through the interception site, storing the dyeing mark in the context of the current thread in the header of the message, and before receiving the message, the downstream service acquires the dyeing mark from the header of the message through the interception site of the plug-in and puts the dyeing mark into the context of the downstream processing thread, so that the dyeing mark is transferred to the downstream service from the upstream service in a cross-process manner.
Through the transmission of the cross-thread and cross-process dyeing marks, the whole service cluster can transmit the pressure measurement marks, and the dyeing of the whole link to the pressure measurement flow is realized; by adding the pressure measurement mark in the request head, the transparent transmission of the pressure measurement mark in the full link of the service cluster is realized in a non-invasive manner.
For the processing of the pressure measurement flow in the storage layer, the storage layer includes a redis cache and storage of a persistent database MySQL, and for the storage of the database MySQL, as shown in FIG. 7, the storage process flow chart of the dyeing data specifically includes the following steps:
step S400: and storing the pressure measurement flow generated by the request message into a shadow table.
During storage, judging whether the current flow has a dyeing mark, if so, storing the current flow into a shadow table, and if not, storing the current flow into a production table, wherein the method specifically comprises the following steps:
step S401: judging whether the current flow has a dyeing mark;
step S402: if the current flow is the pressure measurement flow, modifying the table name of the sql execution statement into the shadow table name before storing the dyeing data corresponding to the pressure measurement flow, so as to store the dyeing data into the shadow table.
For the storage of the database MySQL, if the data is dyeing data, the plug-in dynamically modifies the table name (table) of the sql execution statement into a shadow table name (table _ ptest), and the dyeing data is automatically stored in a shadow table and isolated from production data; and the pressure measurement flow is dynamically identified, and the dyeing data is stored in a shadow table of a database, so that the generation of dirty data in a production table is avoided, and the workload of pressure measurement personnel is reduced.
For the redis cache, when the current thread inserts data before calling the redis method, the plug-in unit can judge whether the current thread contains a dyeing mark so as to judge whether the current thread is a link of dyeing flow, and if the current thread does not contain the dyeing mark, the current thread is indicated as production flow and is not processed; if the dyeing flow is the dyeing flow, the plug-in unit is used for modifying parameters executed by the method, and setting character strings are spliced on the key value parameters so as to distinguish production data; when data is acquired, the data is acquired by judging whether a set character string is added to the key value parameter or not according to the dyeing mark.
According to the pressure measurement method, the dyeing marks are added in the test flow, full-link transparent transmission is achieved, isolation of dyeing data and production data can be achieved (the dyeing data enter a shadow table, the production data enter a production table), operation that pressure measurement personnel finish pressure measurement every time and dirty data in the production table are cleared is avoided, working time is saved, and efficiency is improved.
In addition, not only is the dynamic isolation of the production data and the dyeing data realized, but also the dyeing data does not influence the production data, so the pressure measurement is carried out in an online cluster environment at any time, and the normal operation of the actual service is not influenced.
The method is modified on the basis of the skywalking plug-in, the skywalking plug-in enhances the byte codes of the application services through java agents and byteuddy implementation method-level interception sites, so that interception can be implemented through other byte code enhancement technologies, and the method is not limited herein.
Example 2
An embodiment of the present application provides a pressure measurement device, which is applied to a server in embodiment 1, as shown in fig. 8, and is a structural block diagram of the pressure measurement device, where the pressure measurement device specifically includes:
a message receiving module 100, configured to receive a request message sent by a client;
a marker obtaining module 200, configured to intercept the request message through a preset interception site and obtain at least one request message with a dyeing marker from the request message;
the dyeing mark transmission module 300 is configured to correspondingly transmit the dyeing mark in the process of executing the request message in a cross-thread and/or cross-process manner and generating the pressure measurement flow;
the storage module 400 is configured to store the piezometric flow generated by the request message into a shadow table.
As shown in fig. 9, which is a block diagram of a specific structure of a pressure measuring apparatus, the dyeing mark transmission module 300 specifically includes:
the cross-thread transfer module 310 is configured to intercept the dyeing mark of the current thread to a sub-thread through a preset interception site before the thread pool acquires the method for executing the asynchronous call by the thread;
a sub-thread marking module 311 for adding a dyeing mark to a sub-thread before the sub-thread is executed.
The http cross-process transfer may specifically include:
a request object obtaining module 320, configured to intercept, through a preset interception site, before a current service sends an http cross-process request, to obtain a request object;
a first tag adding module 321, configured to add a dyed tag of a current thread in a current service to a request header of a request object, so as to deliver the dyed tag to a downstream service;
a first mark obtaining module 322, configured to obtain, after the downstream service receives the request, a dyeing mark in the request header through an interception site preset in the downstream service;
a second tag adding module 323 configured to add a dyed tag to a current thread of the downstream service.
rpc Cross-process communication may specifically include:
rpc, a request obtaining module 330, configured to, before the current service sends rpc cross-process requests, perform interception through a preset interception site to obtain rpc requests;
a third tag adding module 331, configured to add the dyed tag of the current thread in the current service to the attributes requested by rpc, so as to deliver the dyed tag to the downstream service;
a second marker obtaining module 332, configured to obtain, after the downstream service receives the rpc request, a dyeing marker in attributes through an interception site preset in the downstream service;
the fourth tag adding module 333 adds a dyed tag to the current thread of the downstream service.
The inter-message cross-process delivery may specifically include:
a message obtaining module 340, configured to obtain a message through a preset interception site before sending an asynchronous message;
a fifth tag adding module 341, configured to add a dyed tag of the current thread of the current service to the header of the message;
a third marker obtaining module 342, configured to, after receiving a message in a downstream service, obtain a dyeing marker from a header of the message through an interception site preset in the downstream service;
a sixth tag adding module 343, configured to add the dyed tag to the current thread of the downstream service.
Illustratively, the memory module 400 includes:
the judging module 401 judges whether the current flow has a dyeing mark;
a dyeing data saving module 402, configured to, if the current flow has a dyeing marker, determine that the current flow is a pressure measurement flow, modify a table name of an sql execution statement into a shadow table name before saving dyeing data corresponding to the pressure measurement flow, so as to save the dyeing data in the shadow table.
Through adding the dyeing mark to the pressure measurement flow, through setting up the interception site, realize that the full link of dyeing mark passes through to distinguish dyeing data and production data through the dyeing mark, realize the dynamic isolation of production data and dyeing data, avoided pressure measurement personnel to press at every turn and surveyed, clear away the operation of dirty data in the production table, practiced thrift operating time, improved efficiency.
An embodiment of the present application further provides an electronic device, where the electronic device includes a memory and a processor, where the memory is used to store a computer program, and the processor runs the computer program to make the computer device execute the pressure measurement method in any one of embodiments 1.
An embodiment of the present application further provides a readable storage medium, where computer program instructions are stored, and when the computer program instructions are read and executed by a processor, the method for pressure measurement according to any one of embodiments 1 is executed.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011159880.9A CN112199218A (en) | 2020-10-26 | 2020-10-26 | A pressure measurement method, device, electronic device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011159880.9A CN112199218A (en) | 2020-10-26 | 2020-10-26 | A pressure measurement method, device, electronic device and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112199218A true CN112199218A (en) | 2021-01-08 |
Family
ID=74011494
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011159880.9A Pending CN112199218A (en) | 2020-10-26 | 2020-10-26 | A pressure measurement method, device, electronic device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112199218A (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112765035A (en) * | 2021-01-27 | 2021-05-07 | 北京百家科技集团有限公司 | Distributed pressure test system, method, device, electronic equipment and storage medium |
CN112988132A (en) * | 2021-02-25 | 2021-06-18 | 平安科技(深圳)有限公司 | Automatic generation method and device of data interface, computer equipment and storage medium |
CN113079064A (en) * | 2021-03-26 | 2021-07-06 | 北京京东振世信息技术有限公司 | Pressure detection method and device and electronic equipment |
CN113965510A (en) * | 2021-09-23 | 2022-01-21 | 唯品会(广州)软件有限公司 | Flow dyeing method and system |
CN116781591A (en) * | 2023-08-23 | 2023-09-19 | 国网信息通信产业集团有限公司 | A pressure testing system, pressure testing terminal and storage medium based on flow dyeing and transparent transmission technology |
CN117149264A (en) * | 2023-10-31 | 2023-12-01 | 山东浪潮科学研究院有限公司 | A multi-lane R&D environment construction method, device, equipment and storage medium |
CN117453544A (en) * | 2023-10-25 | 2024-01-26 | 上海任意门科技有限公司 | Request processing method, system, equipment and readable storage medium |
CN118337669A (en) * | 2024-06-12 | 2024-07-12 | 深圳依时货拉拉科技有限公司 | Traffic simulation system and method, computer readable storage medium and computer device |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080271042A1 (en) * | 2007-04-24 | 2008-10-30 | Microsoft Corporation | Testing multi-thread software using prioritized context switch limits |
US20160110278A1 (en) * | 2014-10-21 | 2016-04-21 | International Business Machines Corporation | Processor stressmarks generation |
CN108090784A (en) * | 2017-11-28 | 2018-05-29 | 口碑(上海)信息技术有限公司 | Marketing activity emulation verification method and device |
CN108536521A (en) * | 2018-03-30 | 2018-09-14 | 口碑(上海)信息技术有限公司 | Based on emulation platform offline environment checking method and device |
CN109871320A (en) * | 2019-01-21 | 2019-06-11 | 上海德启信息科技有限公司 | A kind of data processing method, device, application server and storage medium |
CN110532191A (en) * | 2019-09-05 | 2019-12-03 | 北京博睿宏远数据科技股份有限公司 | A kind of method for testing pressure, system and cluster |
CN110750584A (en) * | 2019-09-18 | 2020-02-04 | 苏宁云计算有限公司 | Data management method and system |
CN110874304A (en) * | 2018-09-03 | 2020-03-10 | 广州神马移动信息科技有限公司 | Pressure testing method, device, equipment and computer readable storage medium |
-
2020
- 2020-10-26 CN CN202011159880.9A patent/CN112199218A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080271042A1 (en) * | 2007-04-24 | 2008-10-30 | Microsoft Corporation | Testing multi-thread software using prioritized context switch limits |
US20160110278A1 (en) * | 2014-10-21 | 2016-04-21 | International Business Machines Corporation | Processor stressmarks generation |
CN108090784A (en) * | 2017-11-28 | 2018-05-29 | 口碑(上海)信息技术有限公司 | Marketing activity emulation verification method and device |
CN108536521A (en) * | 2018-03-30 | 2018-09-14 | 口碑(上海)信息技术有限公司 | Based on emulation platform offline environment checking method and device |
CN110874304A (en) * | 2018-09-03 | 2020-03-10 | 广州神马移动信息科技有限公司 | Pressure testing method, device, equipment and computer readable storage medium |
CN109871320A (en) * | 2019-01-21 | 2019-06-11 | 上海德启信息科技有限公司 | A kind of data processing method, device, application server and storage medium |
CN110532191A (en) * | 2019-09-05 | 2019-12-03 | 北京博睿宏远数据科技股份有限公司 | A kind of method for testing pressure, system and cluster |
CN110750584A (en) * | 2019-09-18 | 2020-02-04 | 苏宁云计算有限公司 | Data management method and system |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112765035A (en) * | 2021-01-27 | 2021-05-07 | 北京百家科技集团有限公司 | Distributed pressure test system, method, device, electronic equipment and storage medium |
CN112988132A (en) * | 2021-02-25 | 2021-06-18 | 平安科技(深圳)有限公司 | Automatic generation method and device of data interface, computer equipment and storage medium |
CN113079064A (en) * | 2021-03-26 | 2021-07-06 | 北京京东振世信息技术有限公司 | Pressure detection method and device and electronic equipment |
CN113965510A (en) * | 2021-09-23 | 2022-01-21 | 唯品会(广州)软件有限公司 | Flow dyeing method and system |
CN113965510B (en) * | 2021-09-23 | 2023-04-18 | 唯品会(广州)软件有限公司 | Flow dyeing method and system |
CN116781591A (en) * | 2023-08-23 | 2023-09-19 | 国网信息通信产业集团有限公司 | A pressure testing system, pressure testing terminal and storage medium based on flow dyeing and transparent transmission technology |
CN116781591B (en) * | 2023-08-23 | 2024-01-02 | 国网信息通信产业集团有限公司 | Pressure testing system, pressure testing terminal and storage medium based on flow dyeing and transparent transmission technology |
CN117453544A (en) * | 2023-10-25 | 2024-01-26 | 上海任意门科技有限公司 | Request processing method, system, equipment and readable storage medium |
CN117149264A (en) * | 2023-10-31 | 2023-12-01 | 山东浪潮科学研究院有限公司 | A multi-lane R&D environment construction method, device, equipment and storage medium |
CN117149264B (en) * | 2023-10-31 | 2024-01-30 | 山东浪潮科学研究院有限公司 | Multi-lane research and development environment construction method, device, equipment and storage medium |
CN118337669A (en) * | 2024-06-12 | 2024-07-12 | 深圳依时货拉拉科技有限公司 | Traffic simulation system and method, computer readable storage medium and computer device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112199218A (en) | A pressure measurement method, device, electronic device and storage medium | |
CN110286897A (en) | API visualization dynamic configuration method, device, equipment and storage medium | |
US7987246B2 (en) | Method and system for client browser update | |
US6857119B1 (en) | Techniques for modifying a compiled application | |
US9727405B2 (en) | Problem determination in distributed enterprise applications | |
US9146787B2 (en) | Analytics for application programming interfaces | |
US7827565B2 (en) | Integration architecture for non-integrated tools | |
US9311214B2 (en) | System and methods for tracing individual transactions across a mainframe computing environment | |
US20110167156A1 (en) | Monitoring related content requests | |
JP7580379B2 (en) | Method, system and computer readable medium for data transformation using a representational state transfer (REST) application programming interface (API) - Patents.com | |
WO2020010702A1 (en) | Log search method and system, computer device, and storage medium | |
US8849981B2 (en) | Response time benchmarking | |
JP2012221502A (en) | Visualization of jvm and cross-jvm call stacks | |
CN112286776B (en) | Method and system for tracking micro-service link | |
CN106991322A (en) | The detection method and device of a kind of SQL SQL injection attack | |
US7069184B1 (en) | Centralized monitoring and early warning operations console | |
CN109309664B (en) | Browser fingerprint detection behavior monitoring method | |
CN111064725A (en) | Code zero intrusion interface verification method and device | |
WO2021093672A1 (en) | Method for embedding external system, workflow system, device and computer readable storage medium | |
WO2022062478A1 (en) | Method and apparatus for detecting arbitrary account password reset logic vulnerability, and medium | |
US7543041B2 (en) | Pattern based web services using caching | |
CN109409948A (en) | Transaction method for detecting abnormality, device, equipment and computer readable storage medium | |
US7289989B2 (en) | Pattern based web services | |
WO2014155718A1 (en) | Information processing device and information processing system | |
CN100512158C (en) | Network measuring system structure and realizing method thereof |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210108 |