CN115221057A - Test data response time output method and device, medium and computer equipment - Google Patents
Test data response time output method and device, medium and computer equipment Download PDFInfo
- Publication number
- CN115221057A CN115221057A CN202210860785.4A CN202210860785A CN115221057A CN 115221057 A CN115221057 A CN 115221057A CN 202210860785 A CN202210860785 A CN 202210860785A CN 115221057 A CN115221057 A CN 115221057A
- Authority
- CN
- China
- Prior art keywords
- time interval
- test
- statistical array
- response time
- counting
- 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
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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/3692—Test management for test results analysis
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3409—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
- G06F11/3419—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment by assessing time
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses a test data response time output method and device, a medium and computer equipment, relates to the technical field of data processing, and mainly aims to solve the problems of accuracy and effectiveness of the existing test result display. The method comprises the following steps: acquiring the response time length of a data test to be performed, and constructing a statistical array for marking a test response time interval according to the response time length, wherein the statistical array comprises different time interval elements and counting variables for counting the time interval elements; in the data testing process, acquiring target response time corresponding to target test data, and updating counting variables corresponding to time interval elements matched with the target response time in the statistical array; and after the data test is finished, outputting the statistical array according to the counting variables which are updated iteratively in the statistical array and the time interval elements.
Description
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method and an apparatus for outputting test data response time, a medium, and a computer device.
Background
In order to ensure the normal operation of the service application, the service data is tested until the service application is released after the test is passed. In order to accurately display the test result, currently, the test result of the service data is usually processed numerically, for example, response time of the test result is screened by using a mean value, a median, and the like, and then output. However, in the process of performing numerical processing on the test result of the service data, the specific time content of the response time cannot be displayed, the requirement for judging the test effect based on the response time cannot be met, and the accuracy and the effectiveness of displaying the response time in the data test scene are reduced.
Disclosure of Invention
In view of this, the present invention provides a method and an apparatus for outputting test data response time, a medium, and a computer device, and mainly aims to solve the problems of accuracy and validity of the existing test result display.
According to an aspect of the present invention, there is provided an output method of test data response time, including:
acquiring the response time length of a data test to be performed, and constructing a statistical array for marking a test response time interval according to the response time length, wherein the statistical array comprises different time interval elements and counting variables for counting the time interval elements;
in the data testing process, acquiring target response time corresponding to target test data, and updating counting variables corresponding to time interval elements matched with the target response time in the statistical array;
and after the data test is finished, outputting the statistical array according to the counting variables which are updated iteratively in the statistical array and the time interval elements.
Further, the obtaining of the response time length of the data test to be performed includes:
determining test scenario information matched with the target test data, wherein the test scenario information is used for representing test service environments for testing different test data;
and determining the response time length of the target test data expected to carry out data test based on the single running time of the test scene information and the data volume of the test data.
Further, the constructing a statistical array for marking test response time intervals according to the response time lengths comprises:
dividing the number of time intervals corresponding to the response time length according to a preset time interval length;
generating matched time interval elements based on the number of the time interval elements, and configuring corresponding counting variables for the time interval elements;
and configuring a statistical array based on the time interval elements and the counting variables, and initializing the statistical array to initialize the counting variables to be zero.
Further, the updating the count variable corresponding to the time interval element in the statistical array, which is matched with the target response time, includes:
searching a time interval element corresponding to the target response time in the statistical array;
and if the corresponding time interval element is found, updating and counting the counting variable of the time interval element.
Further, the configuring a statistical array based on the time interval element and the count variable comprises:
adding abnormal response interval elements in the statistical array, and configuring and binding corresponding counting variables to initialize the statistical array added with the abnormal response interval elements;
after the time interval element corresponding to the target response time is searched in the statistical array, the method further includes:
and if the time interval element corresponding to the target response time is not found, updating and counting the counting variable of the abnormal response interval element.
Further, the outputting the statistical array according to the iteratively updated counting variables in the statistical array and the time interval elements includes:
counting the numerical value of the counting variable corresponding to each time interval element;
if the numerical value is larger than the count proportion threshold, determining the time interval elements to be split, and splitting the time interval elements to be split according to a preset splitting strategy to obtain a splitting statistical array containing the splitting time interval elements;
and outputting the statistical array according to the splitting time interval elements in the splitting statistical array and the corresponding counting variables.
Further, the method further comprises:
if the target counting variable value in the statistical array is zero, deleting the time interval elements corresponding to the target counting variable, or combining the time interval elements in the statistical array according to a preset combining strategy;
and displaying the deleted or combined statistical arrays according to the user-defined display page.
According to another aspect of the present invention, there is provided an output apparatus for testing a data response time, comprising:
the device comprises a construction module, a data acquisition module and a data processing module, wherein the construction module is used for acquiring the response time length of a data test to be carried out and constructing a statistical array for marking a test response time interval according to the response time length, and the statistical array comprises different time interval elements and counting variables for counting the time interval elements;
the updating module is used for acquiring target response time corresponding to target test data in the data test executing process and updating counting variables corresponding to time interval elements matched with the target response time in the statistical array;
and the output module is used for outputting the statistical array according to the counting variables which are updated iteratively in the statistical array and the time interval elements after the data test is finished.
Further, the building module is specifically configured to determine test scenario information matched with the target test data, where the test scenario information is used to characterize a test service environment in which different test data are tested; determining a response time length of the target test data expected to be subjected to the data test based on the single running time of the test scenario information and the data volume of the test data.
Further, the building module is specifically configured to divide the number of time intervals corresponding to the response time length according to a preset time interval length; generating matched time interval elements based on the number of the time intervals, and configuring corresponding counting variables for the time interval elements; and configuring a statistical array based on the time interval elements and the counting variables, and initializing the statistical array to initialize the counting variables to be zero.
Further, the updating module is specifically configured to search a time interval element corresponding to the target response time in the statistical array; and if the corresponding time interval element is found, updating and counting the counting variable of the time interval element.
Further, the building module is specifically configured to add an abnormal response interval element to the statistical array, and configure and bind a corresponding count variable, so as to initialize the statistical array based on the addition of the abnormal response interval element;
and the updating module is further configured to update and count the counting variable of the abnormal response interval element if the time interval element corresponding to the target response time is not found.
Further, the output module includes:
the counting unit is used for counting the numerical value of the counting variable corresponding to each time interval element;
the processing unit is used for determining the time interval elements to be split if the numerical value is greater than the count ratio threshold value, and splitting the time interval elements to be split according to a preset splitting strategy to obtain a splitting statistical array containing the splitting time interval elements;
and the output unit is used for outputting the statistical array according to the splitting time interval elements in the splitting statistical array and the corresponding counting variables.
Further, the output module is specifically configured to delete a time interval element corresponding to the target counting variable if the target counting variable value in the statistical array is zero, or merge the time interval elements in the statistical array according to a preset merging strategy; and displaying the deleted or combined statistical array according to the user-defined display page.
According to still another aspect of the present invention, there is provided a storage medium having at least one executable instruction stored therein, the executable instruction causing a processor to perform an operation corresponding to the output method of the test data response time.
According to still another aspect of the present invention, there is provided a computer apparatus including: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction enables the processor to execute the operation corresponding to the output method of the response time of the upper test data.
By means of the technical scheme, the technical scheme provided by the embodiment of the invention at least has the following advantages:
compared with the prior art, the embodiment of the invention acquires the response time length of a data test to be carried out, and constructs a statistical array for marking the test response time interval according to the response time length, wherein the statistical array comprises different time interval elements and counting variables for counting the time interval elements; in the process of executing the data test, acquiring target response time corresponding to target test data, and updating counting variables corresponding to time interval elements matched with the target response time in the statistical array; after the data test is completed, the statistical array is output according to the iteratively updated counting variables in the statistical array and the time interval elements, the time interval of the response time corresponding to the test data is accurately displayed, the effectiveness of the test effect judged based on the response time is greatly improved, and therefore the requirements of accuracy and effectiveness of the response time display in a data test scene are met.
The above description is only an overview of the technical solutions of the present invention, and the present invention can be implemented in accordance with the content of the description so as to make the technical means of the present invention more clearly understood, and the above and other objects, features, and advantages of the present invention will be more clearly understood.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a flow chart of a method for outputting test data response time according to an embodiment of the present invention;
FIG. 2 is a flow chart of another method for outputting test data response time according to an embodiment of the present invention;
FIG. 3 is a flow chart of another method for outputting test data response time according to an embodiment of the present invention;
FIG. 4 is a block diagram of an output device for testing response time of data according to an embodiment of the present invention;
fig. 5 shows a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
In the process of carrying out numerical processing on the test result of the service data, the test result of partial original service data can be lost, the accurate test requirements of a test tool under different service scenes can not be met, and the accuracy and the effectiveness of test result display are reduced. An embodiment of the present invention provides a method for outputting test data response time, where as shown in fig. 1, the method includes:
101. and acquiring the response time length of the data test to be carried out, and constructing a statistical array for marking the test response time interval according to the response time length.
In the embodiment of the present invention, the current execution end is an execution end for performing data testing, and includes, but is not limited to, a terminal, a server, a client, a cloud, and other devices, and correspondingly, data to be subjected to data testing may be development data corresponding to different application programs, such as development codes, development programs, development components, and the like. The test data can obtain a test result after a certain time in the test process, the time is the response time of the test, and the length of the response time in the embodiment of the invention is the longest response time determined according to all the response times, so that a statistical array is constructed on the basis of the length of the response time. For example, 100 sets of target test data to be tested respectively correspond to 100 corresponding response times, and then the longest response time length is determined from the 100 response times and used as the response time length to construct a statistical array.
It should be noted that the statistical array includes different time interval elements and counting variables for counting the time interval elements, where one time interval element corresponds to one time interval, and the counting variable corresponding to each time interval element may be counted and accumulated, so that the constructed statistical array may count the time interval elements in each time interval in an accumulated manner based on the counting variables.
102. And in the data testing process, acquiring target response time corresponding to target test data, and updating counting variables corresponding to time interval elements matched with the target response time in the statistical array.
In the embodiment of the invention, after the statistical array is generated, the data test of the target test data is executed, the visual test data can be one or more, at the moment, in the whole data test process, after the corresponding target response time is obtained after the data test is finished every time, the target response time is obtained, the target response time is matched with the time interval elements in the statistical array, and if the target response time is matched with the time interval elements in the statistical array, the counting variable corresponding to the time interval elements is updated, namely the counting variable is added by 1.
It should be noted that, in the process of executing the data test, each piece of data in the target test data to be tested is tested until the test of all the target test data is completed, that is, the counting variables of the corresponding time interval elements are updated and counted in an iterative manner.
103. And after the data test is finished, outputting the statistical array according to the counting variables which are updated iteratively in the statistical array and the time interval elements.
In the embodiment of the invention, in order to perform accurate output display, after the data test is completed, the counting array completes the counting of counting variables of all time interval elements, and at the moment, the test result containing the counting array is output. The output statistical array is shown in an array form, for example [23,2, 53,7,4, 56, 86 ], where 23 represents the number of times that the response time of the test data falls within the time interval corresponding to the first time interval element, 2 represents the number of times that the response time of the test data falls within the time interval corresponding to the second time interval element, and so on, the number of times that the response time of all the test data falls within the corresponding time interval is obtained, and the embodiment of the present invention is not particularly limited.
It should be noted that, while outputting the statistical array, the statistical array may be displayed together with the test result, that is, when outputting the test result, the statistical array corresponding to all the test data is output at the last bit, so as to be displayed to the user.
In another embodiment of the present invention, for further explanation and limitation, the step of obtaining the response time length of the data test to be performed includes:
determining test scene information matched with the target test data;
determining a response time length of the target test data expected to be subjected to the data test based on the single running time of the test scenario information and the data volume of the test data.
In the embodiment of the present invention, in order to divide the response time into regions for counting, when the statistical array is constructed, the response time length for constructing the statistical array needs to be obtained, so as to construct the statistical array matched with the response time of each test data. The test scenario information is used to represent a test service environment in which different test data are tested, and at this time, a test service scenario in which different test data are tested differs according to different services, including but not limited to a digital product transaction scenario, an insurance product claim settlement scenario, a medical health data interaction scenario, and the like, so as to determine corresponding test scenario information, for example, the test scenario information corresponding to the digital product transaction scenario is complete data processing flow information for completing product transaction, including an order placing flow, a submitting flow, a financial resource transaction flow, and an order generating flow.
It should be noted that, because different test scenario information is tested for different scenarios, for test data, different test scenario information matches different response times, that is, after the test scenario information is determined, the length of the response time is determined based on the single running time corresponding to the test scenario information and the data size of the test data. The data volume of the test data is usually large, for example, 100 pieces of test data may be obtained, the response time corresponding to each piece of test data, and at this time, in order to construct a statistical array applicable to all pieces of test data, the longest response time in the response times corresponding to all pieces of data is selected as the response time length of the target test data expected to perform the data test, which is not specifically limited in the embodiment of the present invention.
In another embodiment of the present invention, for further explanation and limitation, as shown in fig. 2, the step of constructing a statistical array for marking the test response time interval according to the response time length includes:
201. dividing the number of time intervals corresponding to the response time length according to a preset time interval length;
202. generating matched time interval elements based on the number of the time interval elements, and configuring corresponding counting variables for the time interval elements;
203. and configuring a statistical array based on the time interval elements and the counting variables, and initializing the statistical array to initialize the counting variables to be zero.
In order to accurately construct the statistical array, after the response time length is determined, the response time length is divided according to the preset time interval length, and the number of time intervals for constructing the statistical interval is determined. The preset time interval length may be configured in advance according to a display dimension of the statistical array, where the display dimension may be a fraction of the response time length, so as to configure the preset time interval length, for example, the response time length is 100 seconds, and the display dimension is one tenth of the response time length, and the preset time interval length is 10 seconds, so as to partition 10 time intervals. At this time, the matched time interval elements are generated according to the number of the time intervals, that is, one corresponding time interval element is generated every time interval, for example, the time interval element a i N, n is the number of time intervals. Meanwhile, in order to count the response time falling into each time interval, a corresponding count variable is configured for each time interval element to count, for example, a i →X i And x is a counting variable.
Note that statistics are constructedAnd when the array is used, combining the time interval elements and the counting variable to obtain a statistical array, and initializing the statistical array just constructed so as to set the counting variable to 0. For example, initialized statistical array A [ a ] 1 →0 1 ,a 2 →0 2 ,...a n →0 n ]Wherein a is 1 : time interval of 0-10 seconds, a 2 : a time interval of 11-12 seconds and so on, to obtain a complete statistical array.
In another embodiment of the present invention, for further explanation and limitation, the step of updating the count variable corresponding to the time interval element in the statistical array matching the target response time includes:
searching a time interval element corresponding to the target response time in the statistical array;
and if the corresponding time interval element is found, updating and counting the counting variable of the time interval element.
In order to accurately count the counting variables of the response time of the time interval elements, specifically, the time interval elements corresponding to the target response time are searched in the statistical array, at this time, if the time interval elements exist in the statistical array, it is indicated that the currently executed data test belongs to a normal state, and the condition that the test response time length is prolonged due to an abnormal test condition does not occur, so that the counting variables can be updated and counted directly based on the searched counting variables corresponding to the time interval elements, that is, the counting variables are increased by 1.
For example, if the target response time is 8 seconds, the time interval in which 8 seconds fall is searched from the statistical array and is 5-10 seconds, and therefore, the time interval element a corresponding to 5-10 seconds is 2 Time interval element a 2 If present in the statistical array, then pair a 2 Is updated to count the counting variable of a 2 →1 2 The counting variable mode of other time interval elements in the statistical array is the same, and is not described in detail.
In another embodiment of the present invention, for further explanation and limitation, the step of configuring a statistical array based on the time interval elements and the count variables comprises:
and adding abnormal response interval elements in the statistical array, and configuring and binding corresponding counting variables so as to initialize the statistical array added with the abnormal response interval elements.
In order to ensure that the time response time of the abnormal response can still be recorded in the statistical array for accurate time response test display, when the statistical array is configured, specifically, an abnormal response interval element is added in the statistical array, and a corresponding counting variable is configured, so that when the abnormal response occurs, the abnormal response time corresponding to the abnormal response falls into the abnormal response interval element of the device for counting. When the abnormal response interval element is added, a can be added after the last element in the statistical array Q While configuring the counting variable to obtain a Q →Y Q Finally, a statistical array of [ a ] is obtained 1 →0 1 ,a 2 →0 2 ,...a n →0 n ,a Q →Y Q ]。
Correspondingly, after the time interval element corresponding to the target response time is searched in the statistical array, the method further includes:
and if the time interval element corresponding to the target response time is not found, updating and counting the counting variable of the abnormal response interval element.
In the embodiment of the invention, when the response abnormity occurs, in order to accurately count, when the time interval element corresponding to the target response time is not found, the counting variable of the abnormal response interval element is updated and counted. For example, a statistical array [ (0-10) 1 →0 1 ,(11-20) 2 →0 2 ,...(91-100) 10 →0 10 ,a Q →0 Q ]When the target response time is 150 seconds, no matching time interval element is found in the statistical array, therefore, for a Q →0 Q Performing update counting to obtain a Q →1 Q 。
In another embodiment of the present invention, for further explanation and limitation, as shown in fig. 3, the step of outputting the statistical array according to the iteratively updated count variable in the statistical array and the time interval element includes:
301. counting the numerical value of a counting variable corresponding to each time interval element;
302. if the numerical value is larger than the count proportion threshold, determining the time interval elements to be split, and splitting the time interval elements to be split according to a preset splitting strategy to obtain a splitting statistical array containing the splitting time interval elements;
303. and outputting the statistical array according to the splitting time interval elements in the splitting statistical array and the corresponding counting variables.
In order to facilitate displaying of the statistical array, display efficiency is improved, the phenomenon that the counting in a time interval is too huge and recognition accuracy is affected is avoided, and when a test result containing the statistical array is output, time region elements with too many counting in the statistical array need to be divided. Specifically, the numerical value of the count variable corresponding to each time interval element is counted first, and at this time, if the numerical value is greater than the count proportion threshold, it is described that the percentage of the count of the time interval element in the total calculation amount exceeds a preset count proportion threshold. At this time, the time interval element of which the numerical value of the count variable is greater than the count proportion threshold is determined as the split time interval element, that is, the time interval element is split into smaller forces, for example, the time interval is 11 to 20, and the time interval element can be split into two intervals of 11 to 15 and 16 to 20.
It should be noted that, in the embodiment of the present invention, in order to meet the splitting requirement, splitting the time interval elements to be split according to a preset splitting policy to obtain a splitting statistical array including the split time interval elements, where the preset splitting policy includes splitting the number of the time interval or the granularity of the splitting, and if the number of the splits is 2, the corresponding time interval before splitting is: [11-20], [21-30], [31-40] \8230; \ 8230, the time interval after the resolution is: [11-15], [16-20], [21-30], [31-40] \8230;, embodiments of the present invention are not particularly limited. In addition, if the value of the counting variable is counted again for the time interval after the time interval is split, when the value is greater than the counting proportion threshold, the splitting is performed again until the value of the count corresponding to the element of the time interval is less than the counting proportion threshold, all the splitting is completed, and the final statistical array after the splitting is obtained for output.
In another embodiment of the present invention, for further explanation and limitation, the method further comprises:
if the target counting variable value in the counting array is zero, deleting the time interval elements corresponding to the target counting variable, or merging the time interval elements in the counting array according to a preset merging strategy;
and displaying the deleted or combined statistical array according to the user-defined display page.
In order to save storage resources for displaying the statistical array and improve the effectiveness for displaying the statistical array, after all data tests are completed, if the target counting variable value is 0, it is indicated that the time interval element corresponding to the target counting variable is not counted, that is, no response time falls into the time interval, so that the target counting variable and the corresponding time interval element do not need to be stored, and the storage resource consumption is reduced. Specifically, the time interval elements corresponding to the target counting variable are deleted, and the statistical array of the time interval elements corresponding to the target counting variable with the deleted value of 0 is stored to complete the display of the statistical array.
In addition, after counting the time interval elements of 0, in order to reduce the storage space, the time interval elements in the statistical array can be merged, thereby ensuring that the output statistical array is efficiently displayed. The merging may be performed according to a preset merging strategy, where the preset merging strategy includes, but is not limited to, merging only when adjacent time intervals are necessary; if the counting value of a single time interval is more than 5% of the total counting value, the combination is not allowed; the total number after the time intervals are combined cannot exceed 10% of the total number of all the time intervals, and the like, so that the requirements of different users on displaying the inspiration and activation of the statistical arrays are met. For example, if the count values for both time intervals (81-90) and (91-100) are 0, then only 1 interval is shown to the user after merging, which is shown as 81-100.
It should be noted that, in order to meet the display requirements of response times of different users, the deleted or combined statistical arrays may be displayed according to a custom display page. Wherein, custom show page when showing statistics array, can be according to the show interval in self needs custom show page, the size of show interval can not be equal, for example: 1-50, 51-150, 151-300 \8230 \, wherein the presentation interval in the customized presentation page must be a multiple of the statistical interval (intervalTime) so that the current execution end converts the original statistical array into the statistical array of the user-defined presentation.
Compared with the prior art, the embodiment of the invention provides an output method of test data response time, which comprises the steps of obtaining the response time length of a data test to be carried out, and constructing a statistical array for marking a test response time interval according to the response time length, wherein the statistical array comprises different time interval elements and counting variables for counting the time interval elements; in the data testing process, acquiring target response time corresponding to target test data, and updating counting variables corresponding to time interval elements matched with the target response time in the statistical array; after the data test is completed, the statistical array is output according to the iteratively updated counting variables in the statistical array and the time interval elements, the time interval of the response time corresponding to the test data is accurately displayed, the effectiveness of the test effect judged based on the response time is greatly improved, and therefore the requirements of accuracy and effectiveness of the response time display in a data test scene are met.
Further, as an implementation of the method shown in fig. 1, an embodiment of the present invention provides an output apparatus for testing data response time, as shown in fig. 4, where the apparatus includes:
a constructing module 41, configured to obtain a response time length of a data test to be performed, and construct a statistical array for marking a test response time interval according to the response time length, where the statistical array includes different time interval elements and a count variable for counting the time interval elements;
an updating module 42, configured to obtain a target response time corresponding to target test data during the data test, and update a count variable corresponding to a time interval element in the statistical array, where the time interval element is matched with the target response time;
and the output module 43 is configured to output the statistical array according to the iteratively updated counting variables in the statistical array and the time interval elements after the data test is completed.
Further, the building module is specifically configured to determine test scenario information matched with the target test data, where the test scenario information is used to characterize a test service environment in which different test data are tested; and determining the response time length of the target test data expected to carry out data test based on the single running time of the test scene information and the data volume of the test data.
Further, the building module is specifically configured to divide the number of time intervals corresponding to the response time length according to a preset time interval length; generating matched time interval elements based on the number of the time intervals, and configuring corresponding counting variables for the time interval elements; and configuring a statistical array based on the time interval elements and the counting variables, and initializing the statistical array to initialize the counting variables to be zero.
Further, the updating module is specifically configured to search a time interval element corresponding to the target response time in the statistical array; and if the corresponding time interval element is found, updating and counting the counting variable of the time interval element.
Further, the building module is specifically configured to add an abnormal response interval element to the statistical array, and configure and bind a corresponding count variable, so as to initialize the statistical array based on the addition of the abnormal response interval element;
and the updating module is further configured to update and count the counting variable of the abnormal response interval element if the time interval element corresponding to the target response time is not found.
Further, the output module includes:
the counting unit is used for counting the numerical value of the counting variable corresponding to each time interval element;
the processing unit is used for determining the time interval elements to be split if the numerical value is greater than the count ratio threshold value, and splitting the time interval elements to be split according to a preset splitting strategy to obtain a splitting statistical array containing the splitting time interval elements;
and the output unit is used for outputting the statistical array according to the splitting time interval elements in the splitting statistical array and the corresponding counting variables.
Further, the output module is specifically configured to delete a time interval element corresponding to the target counting variable if the target counting variable value in the statistical array is zero, or merge the time interval elements in the statistical array according to a preset merging strategy; and displaying the deleted or combined statistical array according to the user-defined display page.
Compared with the prior art, the embodiment of the invention provides an output device for testing the response time of data, and the embodiment of the invention constructs a statistical array for marking the test response time interval according to the response time length by acquiring the response time length of the data to be tested, wherein the statistical array comprises different time interval elements and counting variables for counting the time interval elements; in the process of executing the data test, acquiring target response time corresponding to target test data, and updating counting variables corresponding to time interval elements matched with the target response time in the statistical array; after the data test is completed, the statistical array is output according to the iteratively updated counting variables in the statistical array and the time interval elements, the time interval of the response time corresponding to the test data is accurately displayed, the effectiveness of the test effect judged based on the response time is greatly improved, and therefore the requirements of accuracy and effectiveness of the response time display in a data test scene are met.
According to an embodiment of the present invention, a storage medium is provided, the storage medium storing at least one executable instruction, and the computer executable instruction can execute the output method of the test data response time in any of the above method embodiments.
Fig. 5 is a schematic structural diagram of a computer device according to an embodiment of the present invention, where the embodiment of the present invention does not limit the specific implementation of the computer device.
As shown in fig. 5, the computer apparatus may include: a processor (processor) 502, a Communications Interface 504, a memory 506, and a communication bus 508.
Wherein: the processor 502, communication interface 504, and memory 506 communicate with one another via a communication bus 508.
A communication interface 504 for communicating with network elements of other devices, such as clients or other servers.
The processor 502 is configured to execute the program 510, and may specifically perform relevant steps in the above-described embodiment of the method for outputting the response time of the test data.
In particular, program 510 may include program code that includes computer operating instructions.
The processor 502 may be a central processing unit CPU, or an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement an embodiment of the invention. The computer device includes one or more processors, which may be the same type of processor, such as one or more CPUs; or may be different types of processors such as one or more CPUs and one or more ASICs.
And a memory 506 for storing a program 510. The memory 506 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The program 510 may specifically be used to cause the processor 502 to perform the following operations:
acquiring the response time length of a data test to be performed, and constructing a statistical array for marking a test response time interval according to the response time length, wherein the statistical array comprises different time interval elements and counting variables for counting the time interval elements;
in the data testing process, acquiring target response time corresponding to target test data, and updating counting variables corresponding to time interval elements matched with the target response time in the statistical array;
and after the data test is finished, outputting the statistical array according to the counting variables which are updated iteratively in the statistical array and the time interval elements.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (10)
1. An output method for testing data response time is characterized by comprising the following steps:
acquiring the response time length of a data test to be carried out, and constructing a statistical array for marking a test response time interval according to the response time length, wherein the statistical array comprises different time interval elements and counting variables for counting the time interval elements;
in the data testing process, acquiring target response time corresponding to target test data, and updating counting variables corresponding to time interval elements matched with the target response time in the statistical array;
and after the data test is finished, outputting the statistical array according to the counting variables which are updated iteratively in the statistical array and the time interval elements.
2. The method of claim 1, wherein obtaining the length of response time for the data test to be performed comprises:
determining test scenario information matched with the target test data, wherein the test scenario information is used for representing test service environments for testing different test data;
determining a response time length of the target test data expected to be subjected to the data test based on the single running time of the test scenario information and the data volume of the test data.
3. The method of claim 2, wherein constructing a statistical array for marking test response time intervals according to the response time lengths comprises:
dividing the number of time intervals corresponding to the response time length according to a preset time interval length;
generating matched time interval elements based on the number of the time intervals, and configuring corresponding counting variables for the time interval elements;
and configuring a statistical array based on the time interval elements and the counting variables, and initializing the statistical array to initialize the counting variables to be zero.
4. The method of claim 2, wherein updating the count variable corresponding to the time interval element in the statistical array that matches the target response time comprises:
searching a time interval element corresponding to the target response time in the statistical array;
and if the corresponding time interval element is found, updating and counting the counting variable of the time interval element.
5. The method of claim 4, wherein configuring a statistical array based on the time interval element and the count variable comprises:
adding abnormal response interval elements in the statistical array, and configuring and binding corresponding counting variables to initialize the statistical array based on the abnormal response interval elements;
after the time interval element corresponding to the target response time is searched in the statistical array, the method further includes:
and if the time interval element corresponding to the target response time is not found, updating and counting the counting variable of the abnormal response interval element.
6. The method of claim 1, wherein outputting the statistical array according to the iteratively updated count variables in the statistical array and the time interval elements comprises:
counting the numerical value of a counting variable corresponding to each time interval element;
if the numerical value is larger than the count proportion threshold, determining the time interval elements to be split, and splitting the time interval elements to be split according to a preset splitting strategy to obtain a splitting statistical array containing the splitting time interval elements;
and outputting the statistical array according to the splitting time interval elements in the splitting statistical array and the corresponding counting variables.
7. The method of any of claims 1-6, wherein the outputting the statistical array comprises:
if the target counting variable value in the statistical array is zero, deleting the time interval elements corresponding to the target counting variable, or combining the time interval elements in the statistical array according to a preset combining strategy;
and displaying the deleted or combined statistical array according to the user-defined display page.
8. An output method for testing data response time, comprising:
the device comprises a construction module, a data acquisition module and a data analysis module, wherein the construction module is used for acquiring the response time length of a data test to be carried out and constructing a statistical array for marking a test response time interval according to the response time length, and the statistical array comprises different time interval elements and counting variables for counting the time interval elements;
the updating module is used for acquiring target response time corresponding to target test data in the data test process, and updating counting variables corresponding to time interval elements matched with the target response time in the statistical array;
and the output module is used for outputting the statistical array according to the counting variables which are updated iteratively in the statistical array and the time interval elements after the data test is finished.
9. A storage medium having stored therein at least one executable instruction for causing a processor to perform an operation corresponding to the method for outputting test data response times of any one of claims 1-7.
10. A computer device, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction causes the processor to execute the operation corresponding to the output method of the test data response time of any one of claims 1-7.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210860785.4A CN115221057A (en) | 2022-07-21 | 2022-07-21 | Test data response time output method and device, medium and computer equipment |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210860785.4A CN115221057A (en) | 2022-07-21 | 2022-07-21 | Test data response time output method and device, medium and computer equipment |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN115221057A true CN115221057A (en) | 2022-10-21 |
Family
ID=83614096
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202210860785.4A Pending CN115221057A (en) | 2022-07-21 | 2022-07-21 | Test data response time output method and device, medium and computer equipment |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN115221057A (en) |
-
2022
- 2022-07-21 CN CN202210860785.4A patent/CN115221057A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN112306881A (en) | Simulation data generation method, device, equipment and storage medium | |
| CN111290956B (en) | Brain graph-based test method and device, electronic equipment and storage medium | |
| CN110830234B (en) | User traffic distribution method and device | |
| CN111522728A (en) | Method for generating automatic test case, electronic device and readable storage medium | |
| CN112559525B (en) | Data checking system, method, device and server | |
| CN111159563A (en) | Method, device and equipment for determining user interest point information and storage medium | |
| CN110825731A (en) | Data storage method and device, electronic equipment and storage medium | |
| CN112711398A (en) | Method, device and equipment for generating buried point file and storage medium | |
| CN113391972A (en) | Interface testing method and device | |
| CN113051183B (en) | A test data recommendation method, system, electronic device and storage medium | |
| CN111415200A (en) | Data processing method and device | |
| CN109408035B (en) | Flow configuration method, storage medium and server of business system | |
| CN111405027B (en) | Block chain consensus result screening method, device, computer equipment and storage medium | |
| CN118520142A (en) | Situation disk copying method and device based on data driving and computer equipment | |
| CN113111078B (en) | Resource data processing method and device, computer equipment and storage medium | |
| US20140089525A1 (en) | Compressed analytics data for multiple recurring time periods | |
| CN114371866B (en) | Version reconstruction test method, device and equipment for business system | |
| CN114418120A (en) | Data processing method, device, equipment and storage medium of federal tree model | |
| CN113254350A (en) | Flink operation testing method, device, equipment and storage medium | |
| CN112685253A (en) | Front-end error log collection method, device, equipment and storage medium | |
| CN115221057A (en) | Test data response time output method and device, medium and computer equipment | |
| CN112417020A (en) | Implementation method, device, computer equipment and storage medium for business expansion | |
| CN111045983A (en) | Nuclear power station electronic file management method and device, terminal equipment and medium | |
| CN110020166B (en) | Data analysis method and related equipment | |
| CN116225690A (en) | Memory multidimensional database calculation load balancing method and system based on docker |
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 |