CN108595326A - Code based on individual instructions takes statistical method, system and storage medium - Google Patents

Code based on individual instructions takes statistical method, system and storage medium Download PDF

Info

Publication number
CN108595326A
CN108595326A CN201810332754.5A CN201810332754A CN108595326A CN 108595326 A CN108595326 A CN 108595326A CN 201810332754 A CN201810332754 A CN 201810332754A CN 108595326 A CN108595326 A CN 108595326A
Authority
CN
China
Prior art keywords
code
aid mark
specific information
instruction code
time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810332754.5A
Other languages
Chinese (zh)
Inventor
沈时来
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Giesecke and Devrient China Information Technologies Co Ltd
Original Assignee
Giesecke and Devrient China Information Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Giesecke and Devrient China Information Technologies Co Ltd filed Critical Giesecke and Devrient China Information Technologies Co Ltd
Priority to CN201810332754.5A priority Critical patent/CN108595326A/en
Publication of CN108595326A publication Critical patent/CN108595326A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3636Software debugging by tracing the execution of the program
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3644Software debugging by instrumenting at runtime

Abstract

The present invention provides a kind of code based on individual instructions and takes statistical method, system and storage medium.Method includes:Receive operating instruction;According to operating instruction operating instruction code, and during operating instruction code, detection is set in advance in the aid mark in instruction code;If detecting aid mark, specific information corresponding with aid mark is sent, so that the equipment for receiving specific information, it can be according to the run time of the time determine instruction code each section for receiving specific information.Scheme provided by the invention in original instruction code by being added accessory ID, when detecting accessory ID in the operational process of instruction code again, send specific information, it can be according to the time for receiving specific information, determine that the code between two adjacent accessory IDs runs the required time, scheme compared to the prior art can improve detection efficiency and accuracy.

Description

Code based on individual instructions takes statistical method, system and storage medium
Technical field
The present invention relates to code tester technologies more particularly to a kind of code based on individual instructions to take statistical method, is System and storage medium, belong to computer realm.
Background technology
Currently, with the development and user demand of computer technology, developer has developed a large amount of software.In order to The higher software of quality is provided a user, needs to carry out various tests to software.Wherein, an important indicator is software The speed of service.
In the prior art, the execution time that individual instructions (or complete independent code) can be counted, carry out test software code Performance.Under normal circumstances, it to the execution time of partial code in statistics individual instructions (or complete independent code), then needs Extract entire code partial code in the block, then necessary change carried out to it, with ensure its can normal operation, then to place Partial code after reason is tested.
In the prior art for the testing scheme of the execution time of partial code in individual instructions (or complete independent code) In, it needs to modify to code, causes testing efficiency relatively low.Meanwhile it reruning after modifying to code this part generation The code, and is put into that entire code operational process in the block can there is some difference by code, this may result in obtains when test The run time of the partial code, it is different from the run time being placed into entire software, cause test result inaccurate The problem of.
Invention content
The present invention provides a kind of code based on individual instructions and takes statistical method, system and storage medium, by original When accessory ID being added in some instruction codes, then accessory ID is detected in the operational process of instruction code, send specific Information, it will be able to according to the time for receiving specific information, determine the partial code operation between two adjacent accessory IDs Required time, scheme compared to the prior art can improve detection efficiency and accuracy.
The first aspect of the invention is to provide a kind of time-consuming statistical method of the code based on individual instructions, including:
Receive operating instruction;
According to the operating instruction operating instruction code, and during running described instruction code, detection is set in advance Set the aid mark in described instruction code;
If detecting the aid mark, specific information corresponding with the aid mark is sent, so that described in receiving The equipment of specific information can determine each section generation that described instruction code includes according to the time for receiving the specific information The run time of code.
Another aspect of the present invention is to provide a kind of time-consuming statistical system of the code based on individual instructions, including:Code Device, computing device;
The code device includes:
Receiving module, for receiving operating instruction;
Module is run, is used for according to the operating instruction operating instruction code, and in the process of operation described instruction code In, detection is set in advance in the aid mark in described instruction code;
If sending module sends specific information corresponding with the aid mark for detecting the aid mark, So as to receive the computing device of the specific information, described instruction can be determined according to the time for receiving the specific information The run time for each section code that code includes.
An additional aspect of the present invention is to provide a kind of computer readable storage medium, which is characterized in that is stored thereon with Computer program, the computer program are executed by processor to realize method as described above.
Code provided by the invention based on individual instructions takes statistical method, system and computer readable storage medium It has the technical effect that:
Code provided in this embodiment based on individual instructions takes statistical method, system and computer-readable storage medium Matter, including receive operating instruction;According to operating instruction operating instruction code, and during operating instruction code, detection is pre- Aid mark in instruction code is first set;If detecting aid mark, specific information corresponding with aid mark is sent, So that the equipment for receiving specific information, can determine each portion that described instruction code includes according to the time for receiving specific information Divide the run time of code.Statistical method, system and storage are taken using the code provided in this embodiment based on individual instructions Medium, without being split to instruction code, then detection is split successively every partial code run time, it is only necessary in original When accessory ID being added in some codes, then accessory ID is detected in the operational process of instruction code, specific information is sent, It can be according to the time for receiving specific information, when determining that the code between two adjacent accessory IDs runs required Between.Therefore, method and system provided in this embodiment can improve the efficiency that code takes detection, and more accurate.
Description of the drawings
Fig. 1 is the flow of the time-consuming statistical method of the code based on individual instructions shown in an exemplary embodiment of the invention Figure;
Fig. 2 is the flow of the time-consuming statistical method of the code based on individual instructions shown in another exemplary embodiment of the present invention Figure;
Fig. 3 is the structure of the time-consuming statistical system of the code based on individual instructions shown in an exemplary embodiment of the invention Figure;
Fig. 4 is the structure of the time-consuming statistical system of the code based on individual instructions shown in another exemplary embodiment of the present invention Figure.
Specific implementation mode
The noun involved by the application is explained first:
Instruction code:It is the corresponding source code of instruction.
Fig. 1 is the flow of the time-consuming statistical method of the code based on individual instructions shown in an exemplary embodiment of the invention Figure.
As shown in Figure 1, the time-consuming statistical method of the code provided in this embodiment based on individual instructions includes:
Step 101, operating instruction is received.
Wherein, operating instruction is indicated for starting to detect the time-consuming instruction of instruction code.It can actively be sent by user Operating instruction can also be that system executes the instruction according to default rule automatically.For example, can be after more fresh code It unites and automatically turns on the time-consuming function of statistics instruction code, can also be that beginning timing statistics are arranged in user in advance, thus by the time The condition that statistics instruction takes function is opened as triggering.
Specifically, receiving the operating instruction by the device or component for executing method provided in this embodiment, and parse the fortune Row instruction.It may include the mark of the instruction code itself or the instruction code that need to count in operating instruction, can also include Other auxiliary codes identify or auxiliary code itself, and auxiliary code is used to assist the time-consuming of each section code in detection instruction code Situation.By parsing operating instruction, can obtain including instruction code and auxiliary code, and then being capable of operating instruction Code and auxiliary code.
Method provided in this embodiment is used to count the time-consuming situation for the various pieces code that instruction code includes, the party Method is executed by being stored with the equipment of instruction code and the equipment for calculation code run time, wherein the two equipment can It to be integrated into a device, can also be independently arranged, which realizes usually in a manner of hardware and/or software.
Step 102, according to operating instruction operating instruction code, and during operating instruction code, detection is set in advance Set the aid mark in instruction code.
Further, aid mark can be set in instruction code in advance, needs can be partitioned by aid mark The various pieces of the time-consuming instruction of detection.For example, including altogether 5 parts in instruction code, then 6 accessory IDs can be set, So that being partial code to be tested between each two accessory ID.
When practical application, instruction code corresponding with the instruction can be run according to operating instruction, and in operating instruction When code, the aid mark being provided with is detected.For example, aid mark can be the variable of specific names, refer in operation line by line When enabling code (instructing corresponding source code), if reading variable, it may be considered that detecting aid mark.In order to by When row operating instruction code, can recognize which be normal code which be aid mark, can prestore auxiliary mark Remember format, or directly stores the content of aid mark.It is auxiliary in instruction code so as to by way of comparison, determine Help label.
Step 103, if detecting aid mark, specific information corresponding with aid mark is sent;So as to receive specific The equipment of information, when can be according to the operation of time determine instruction code each section code for including for receiving specific information Between.
Wherein, after detecting aid mark, specific information can be sent according to preset rules, specifically, specific letter Breath can be received by the other assemblies run in equipment provided in this embodiment, can also be received by other equipment.It receives The component or device of specific information are used for each section code for including according to the time determine instruction code of reception specific information Run time.
It can illustrate scheme provided in this embodiment for detecting the run time of individual instructions of application of IC cards. Aid mark is added in the instruction code of application of IC cards, user sends to application of IC cards and transports by operating card-reading apparatus Row instruction, to make application of IC cards run the corresponding instruction code of the operating instruction, in the process of operating instruction code line by line In, pre-set aid mark is detected, also, after detecting aid mark, specific information is sent to card-reading apparatus, by reading Card apparatus is according to the specific information of the instruction code feedback in application of IC cards, and each section code takes in computations code Situation.
Specifically, specific information is corresponding with aid mark, preset rules can be set, for example, increasing in aid mark Add one-bit digital, generate specific information corresponding with the aid mark, if the corresponding variate-value of aid mark is 0x0011, with it Corresponding specific information is 0x0111.Specific information can also be time when reading accessory ID.
Further, the equipment for receiving specific information can determine each section code according to the time for receiving specific information Run time.
It, can be directly corresponding according to adjacent aid mark is read if specific information is the time for reading accessory ID Time calculates the time difference, and the time difference is determined as to the run time of this partial code between aid mark.If specific information is Other information can then calculate the time difference for receiving the adjacent corresponding specific information of aid mark, and this time difference is true It is set to the run time of this partial code between aid mark.
For example, including altogether 3 partial codes, respectively code 11, code 12, code 13 in instruction code, respectively in code Before 11, between code 11 and code 12, between code 12 and code 13, aid mark 01,12,23,30 is set after code 13. The time t that specific information is sent when detecting each aid mark can be obtained01、t12、t23、t30
Wherein, bring into operation instruction code when, aid mark 01 is detected, at this time in t01Moment sends first specific letter Breath, then reads and runs first part's code 11, second aid mark 12 is read after operation, at this time can be in t12 Moment sends second specific information, then t01With t12Between time difference may be considered the run time of code 11.Other The run time of code 12,13 can also determine by such method.
Specifically, aid mark can not also be arranged in the front end of entire instruction code, at this point it is possible to directly will instruction The time that code brings into operation is as t01
Code provided in this embodiment based on individual instructions takes statistical method, including receives operating instruction;According to fortune Row instruction operating instruction code, and during operating instruction code, detection is set in advance in the auxiliary mark in instruction code Note;If detecting aid mark, specific information corresponding with aid mark is sent, so that the equipment for receiving specific information, energy The run time for each section code that enough time determine instruction codes according to reception specific information include.Using the present embodiment The code based on individual instructions provided takes statistical method, and without being split to instruction code, then detection is split successively Every partial code run time, it is only necessary to accessory ID, then the operation in instruction code are added in original code When detecting accessory ID in journey, send specific information, it will be able to according to receive specific information time, determine two it is adjacent Accessory ID between code run required time.Therefore, method provided in this embodiment can improve code and take The efficiency of detection, and it is more accurate.
Fig. 2 is the flow of the time-consuming statistical method of the code based on individual instructions shown in another exemplary embodiment of the present invention Figure.
As shown in Fig. 2, the code provided in this embodiment based on individual instructions takes statistical method, including:
Step 201, operating instruction is received.
Step 201 is identical as the concrete principle of step 101 and realization method, and details are not described herein.
Step 202, target aid mark is determined in aid mark according to preset rules.
Wherein it is possible to pre-set the preset rules for determining target aid mark.It can be by all aid marks It is determined as target aid mark, the aid mark other than being arranged before removing instruction code can also be determined as target auxiliary mark Note, furthermore it is also possible to which the position according to aid mark in instruction code, is determined as target auxiliary by each aid mark successively Label.
Specifically, in the first application scenarios, all aid marks are determined as target aid mark, or will remove Aid mark other than being arranged before instruction code is determined as target aid mark, then step 205 can not be executed, in step Step 206 is directly executed after 204.In second of application scenarios, if each aid mark is determined as target auxiliary successively Label, then can execute step 205, for detecting whether traversal finishes all aid marks.
Step 203, according to operating instruction operating instruction code, and during operating instruction code, detection instruction generation Target aid mark in code.
In the first application scenarios, can according to the logic operation instruction code of instruction code, and in the process of running, Detect the target aid mark being provided with.Entire instruction code is finished at this point it is possible to run, and detects multiple target auxiliary Label.
In second of application scenarios, can according to the logic operation instruction code of instruction code, and in the process of running, Detect the target aid mark being provided with.Entire instruction code is finished at this point it is possible to run, and detects a target auxiliary Label;Part instruction code can also be performed, and detect a target aid mark.
Specifically, can be arranged when detecting target aid mark, the operation of instruction to be detected is just cut off.
Step 204, if detecting target aid mark, specific information corresponding with target aid mark is sent, so that The equipment for receiving specific information, each section code that can include according to the time determine instruction code of reception specific information Run time.
Further, if detecting target aid mark, specific information corresponding with target aid mark is sent.
In the first application scenarios, once command code is executed, it will be able to detect multiple target aid marks, and Send out multiple specific informations.The time of test process can be shortened.
In second of application scenarios, once command code is executed, is only capable of detecting when a target aid mark, and Send out a specific information.It needs to adjust target aid mark, and instruction code is performed a plurality of times, to obtain the whole of needs Specific information.Due in the process of implementation, only detecting an aid mark and sending a specific information, thus, there is no Lead to the time of operating instruction code elongated problem due to sending specific information, can further improve the present embodiment and carry The accuracy of the method for confession.
Wherein, specific information can be received by the other assemblies run in equipment provided in this embodiment, can also be by it He receives equipment.The equipment of specific information is received according to the operation for the time determine instruction partial code for receiving specific information Time can specifically include:
Obtain the first specific information corresponding with the first aid mark, the second aid mark, the second specific information, wherein In instruction code, there is no any other aid mark between the first aid mark, the second aid mark;
In the first application scenarios, obtain the first aid mark, the first specific information corresponding to the second aid mark, Second specific information.Such as aid mark 12 and aid mark 23, specific letter corresponding with aid mark 12, aid mark 23 is obtained Breath.
If specific information is the temporal information for reading aid mark, the difference of two specific informations can be directly calculated Value, obtains the time difference, then the time difference is the run time of code 12.
If specific information is other kinds of data information, the first specific information and second specific is sent then can calculate The time difference of information, and when the time difference is determined as the operation of the partial code between the first aid mark, the second aid mark Between, i.e. the run time of code 12.
In second of application scenarios, primary code to be detected is often executed, it will be able to a specific information is obtained, for example, When target accessory ID is 12, obtained specific information is first specific information corresponding with 12, and target accessory ID is 23 When, obtained specific information is second specific information corresponding with 23.
If specific information is the temporal information for reading aid mark, the difference of two specific informations can be directly calculated Value, obtains the time difference, then the time difference is the run time of code 12.
If specific information is the data information of its type, the first specific information and the second specific letter are sent then can calculate The time difference of breath, and the time difference is determined as to the run time of the partial code between the first aid mark, the second aid mark, That is the run time of code 12.
In addition, the specific information can also be when reading aid mark, instruction code throw exception data information.
In the first application scenarios, step 206 can be directly executed after step 204.Step can also be executed 205, in order to avoid aid mark is omitted when detecting.
In second in application scenarios, after executing the step 204, step 205 is continued to execute.
Step 205, it detects whether to have sent the corresponding specific information of all aid marks.
If so, thening follow the steps 206.If all corresponding specific informations of aid mark of detection are all transmitted across, It proves that all aid marks are all traversed to go over, not omit, therefore, step 206 can be executed.
If it is not, thening follow the steps 202.Target aid mark is redefined, and finger is continued to run with according to target aid mark Code is enabled, specific information corresponding with the target aid mark is sent.
Below by taking second of application scenarios as an example, the method that the present embodiment is provided is illustrated.
Instruction code includes 3 partial codes, code 21, code 22, code 23, respectively before code 21, code 21 and generation Between code 22, between code 22 and code 23, aid mark 01,12,23,30 is set after code 23.
After receiving operating instruction, determine that target aid mark is 01, operating instruction code is interrupted and returned after detecting 01 Specific information.Time corresponding with the specific information is t01.Detection is not sent the corresponding specific letter of all aid marks Breath.Then continue to determine that target aid mark is 12, operating instruction code interrupts and return specific information, with this after detecting 12 The specific information corresponding time is t12, code 11 has been run at this time.Detection is not sent the corresponding spy of all aid marks Determine information.Then continue to determine that target aid mark is 23, operating instruction code interrupts after detecting aid mark 23 and returns to spy Determine information, the time corresponding with the specific information is t23, code 11,12 has been run at this time.Detection is not sent all auxiliary Help the corresponding specific information of label.Then continue to determine that target aid mark is 30, operating instruction code detects aid mark 30 After interrupt and return specific information, the time corresponding with the specific information be t30, code 11,12,13 has been run at this time.Detection hair It send and finishes the corresponding specific information of all aid marks.
Step 206, the equipment of specific information is received according to the run time of each section code in instruction code, and determination refers to Enable the time-consuming distribution situation of each section code in code.
Optionally, receive the equipment of specific information the time-consuming situation for having determined each section code that instruction code includes it Afterwards, it may be determined that in entire instruction code, if the problem for having certain partial code run time accounting larger.
When specifically the execution time of each section code can be added to obtain total time, then calculate the execution of every partial code Between ratio with total time, obtain the accounting of the execution time of each section code.
Result of calculation can also be shown with diversified forms such as column diagram, pie chart, oscillogram, line charts, is used Family can more intuitively see the time-consuming situation of each section code operation that instruction code includes.
Optionally, step 202-205 can also be performed a plurality of times, obtain multiple run times for every partial code, then count The average value per the corresponding multiple run times of partial code is calculated, to more accurately obtain the run time of every partial code, Further according to the average operating time of every partial code, the time-consuming distribution situation of each section code of instruction to be measured is determined.
Optionally, the position that each aid mark can also be adjusted according to demand, to keep definitive result more accurate.
Instruction provided in this embodiment takes statistical method, can provide different processing sides for two kinds of application scenarios Method can shorten the time of entire test process in the first application scenarios, in second of application scenarios, by will be auxiliary It helps label to set gradually for target aid mark, and instruction code is performed a plurality of times, the time data of acquisition can be made more accurate. Meanwhile scheme provided in this embodiment, the position of auxiliary code can be adjusted according to demand, it will be able to the instruction to different segmentations Partial code takes and is detected, without modifying to instruction code itself, therefore, the efficiency of scheme provided in this embodiment Higher, it is also more flexible during using.
Fig. 3 is the structure of the time-consuming statistical system of the code based on individual instructions shown in an exemplary embodiment of the invention Figure.
As shown in figure 3, system provided in this embodiment, including:Code device 31, computing device 32;
The code device 31 includes:
Receiving module 311, for receiving operating instruction;
Module 312 is run, is used for according to the operating instruction operating instruction code, and in the mistake of operation described instruction code Cheng Zhong, detection are set in advance in the aid mark in described instruction code;
If sending module 313 sends specific letter corresponding with the aid mark for detecting the aid mark Breath can determine described instruction so as to receive the computing device of the specific information according to the time for receiving the specific information The run time for each section code that code includes.
Code provided in this embodiment based on individual instructions takes statistical system, including receives operating instruction;According to fortune Row instruction operating instruction code, and during operating instruction code, detection is set in advance in the auxiliary mark in instruction code Note;If detecting aid mark, specific information corresponding with aid mark is sent, so that the equipment for receiving specific information, energy The run time for each section code that enough time determine instruction codes according to reception specific information include.Using the present embodiment The code based on individual instructions provided takes statistical system, and without being split to instruction code, then detection is split successively Every partial code run time, it is only necessary to accessory ID, then the operation in code are added in original instruction code When detecting accessory ID in journey, send specific information, it will be able to according to receive specific information time, determine two it is adjacent Accessory ID between code run required time.Therefore, system provided in this embodiment can improve code and take The efficiency of detection, and it is more accurate.
Code provided in this embodiment based on individual instructions take statistical system concrete principle and realization method with Embodiment shown in FIG. 1 is similar, and details are not described herein again.
Fig. 4 is the structure of the time-consuming statistical system of the code based on individual instructions shown in another exemplary embodiment of the present invention Figure.
As shown in figure 4, on the basis of the above embodiments, the code provided in this embodiment based on individual instructions takes system Meter systems, the computing device 32, including:
Acquisition module 321, for obtaining corresponding with the first aid mark, the second aid mark the first specific information, the Two specific informations, wherein in described instruction code, without appointing between first aid mark, second aid mark What his aid mark;
Computing unit 322, for calculating the time difference for sending first specific information and second specific information, and When the time difference is determined as the operation of the partial code between first aid mark, second aid mark Between.
Optionally, code device 31 further includes:
First determining module 314, for determining target aid mark in the aid mark according to preset rules;
Correspondingly, the operation module 312 is specifically used for:During running described instruction code, the finger is detected Enable the target aid mark in code;
Correspondingly, the sending module 313 is specifically used for:
If detecting the target aid mark, specific information corresponding with the target aid mark is sent.
Optionally, code device 31 further includes:
Detection module 315, for detecting whether the corresponding specific information of all aid marks is had sent, if No, then first determining module continues to execute the step for determining target aid mark in the aid mark according to preset rules Suddenly.
Optionally, the computing device 32 is additionally operable to:
According to the run time for each partial code that described instruction code includes, the consumption of described instruction code is determined When distribution situation.
Code provided in this embodiment based on individual instructions takes statistical system, can be directed to two kinds of application scenarios and provide Different processing methods can shorten the time of entire test process in the first application scenarios, in second of application scenarios In, by setting gradually aid mark for target aid mark, and instruction code is performed a plurality of times, the time number of acquisition can be made According to more accurate.Meanwhile scheme provided in this embodiment, the position of auxiliary code can be adjusted according to demand, it will be able to not It takes and is detected with the operation part code divided, without modifying to instruction code itself, therefore, the present embodiment provides Scheme it is more efficient, use during it is also more flexible.
The concrete principle and realization method of system provided in this embodiment are similar with embodiment shown in Fig. 2, herein not It repeats again.
The present embodiment also provides a kind of computer readable storage medium, is stored thereon with computer program, the computer Program is executed by processor to realize any method as described above.
One of ordinary skill in the art will appreciate that:Realize that all or part of step of above-mentioned each method embodiment can lead to The relevant hardware of program instruction is crossed to complete.Program above-mentioned can be stored in a computer read/write memory medium.The journey When being executed, execution includes the steps that above-mentioned each method embodiment to sequence;And storage medium above-mentioned includes:ROM, RAM, magnetic disc or The various media that can store program code such as person's CD.
Finally it should be noted that:The above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;To the greatest extent Present invention has been described in detail with reference to the aforementioned embodiments for pipe, it will be understood by those of ordinary skill in the art that:Its according to So can with technical scheme described in the above embodiments is modified, either to which part or all technical features into Row equivalent replacement;And these modifications or replacements, various embodiments of the present invention technology that it does not separate the essence of the corresponding technical solution The range of scheme.

Claims (11)

1. a kind of code based on individual instructions takes statistical method, which is characterized in that including:
Receive operating instruction;
According to the operating instruction operating instruction code, and during running described instruction code, detection is set in advance in Aid mark in described instruction code;
If detecting the aid mark, specific information corresponding with the aid mark is sent, so as to receive described specific The equipment of information can determine each section code that described instruction code includes according to the time for receiving the specific information Run time.
2. according to the method described in claim 1, it is characterized in that, described determine institute according to the time for receiving the specific information The run time for each section code that instruction code includes is stated, including:
Obtain the first specific information corresponding with the first aid mark, the second aid mark, the second specific information, wherein in institute It states in instruction code, there is no any other aid mark between first aid mark, second aid mark;
The time difference for receiving first specific information and second specific information is calculated, and the time difference is determined as institute State the run time of the partial code between the first aid mark, second aid mark.
3. according to the method described in claim 1, it is characterized in that, it is described according to the operating instruction operating instruction code it Before, further include:
Target aid mark is determined in the aid mark according to preset rules;
Correspondingly, described during running described instruction code, detection is set in advance in the auxiliary in described instruction code Label, including:
During running described instruction code, the target aid mark in described instruction code is detected;
Correspondingly, if described detect the aid mark, specific information corresponding with the aid mark is sent, including:
If detecting the target aid mark, specific information corresponding with the target aid mark is sent.
4. according to the method described in claim 3, it is characterized in that, described send specific information corresponding with the aid mark Later, further include:
It detects whether to have sent the corresponding specific information of all aid marks, if it is not, then continuing to execute according to default Rule determines the step of target aid mark in the aid mark.
5. according to claim 1-4 any one of them methods, which is characterized in that further include:
The run time for each partial code that the equipment for receiving the specific information includes according to described instruction code, really Determine the time-consuming distribution situation of each section code in described instruction code.
6. a kind of code based on individual instructions takes statistical system, which is characterized in that including:Code device, computing device;Institute Stating code device includes:
Receiving module, for receiving operating instruction;
Module is run, is used for according to the operating instruction operating instruction code, and during running described instruction code, inspection Survey the aid mark being set in advance in described instruction code;
If sending module sends specific information corresponding with the aid mark for detecting the aid mark, so that The computing device of the specific information is received, can determine described instruction code according to the time for receiving the specific information The run time for each section code for including.
7. system according to claim 6, which is characterized in that the computing device, including:
Acquisition module, for obtaining the first specific information corresponding with the first aid mark, the second aid mark, the second specific letter Breath, wherein in described instruction code, do not have any other auxiliary between first aid mark, second aid mark Help label;
Computing module, for calculating the time difference for sending first specific information and second specific information, and will be described Time difference is determined as the run time of the partial code between first aid mark, second aid mark.
8. system according to claim 6, which is characterized in that the code device further includes:
First determining module, for determining target aid mark in the aid mark according to preset rules;
Correspondingly, the operation module is specifically used for:During running described instruction code, detect in described instruction code Target aid mark;
Correspondingly, the sending module is specifically used for:
If detecting the target aid mark, specific information corresponding with the target aid mark is sent.
9. system according to claim 8, which is characterized in that the code device further includes:
Detection module, for detecting whether the corresponding specific information of all aid marks is had sent, if it is not, then described First determining module continues to execute according to preset rules the step of target aid mark is determined in the aid mark.
10. according to claim 6-9 any one of them systems, which is characterized in that the computing device is additionally operable to:
According to the run time for each partial code that described instruction code includes, each section in described instruction code is determined The time-consuming distribution situation of code.
11. a kind of computer readable storage medium, which is characterized in that be stored thereon with computer program, the computer program It is executed by processor to realize method as described in any one in claim 1-5.
CN201810332754.5A 2018-04-13 2018-04-13 Code based on individual instructions takes statistical method, system and storage medium Pending CN108595326A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810332754.5A CN108595326A (en) 2018-04-13 2018-04-13 Code based on individual instructions takes statistical method, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810332754.5A CN108595326A (en) 2018-04-13 2018-04-13 Code based on individual instructions takes statistical method, system and storage medium

Publications (1)

Publication Number Publication Date
CN108595326A true CN108595326A (en) 2018-09-28

Family

ID=63622653

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810332754.5A Pending CN108595326A (en) 2018-04-13 2018-04-13 Code based on individual instructions takes statistical method, system and storage medium

Country Status (1)

Country Link
CN (1) CN108595326A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112925552A (en) * 2021-02-26 2021-06-08 北京百度网讯科技有限公司 Code processing method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140130017A1 (en) * 2012-03-28 2014-05-08 Tencent Technology (Shenzhen) Company Limited Test case screening method and system
CN104063326A (en) * 2014-07-14 2014-09-24 上海零一拼装信息技术有限公司 Software testing data analysis oscilloscope and method
CN106126431A (en) * 2016-08-23 2016-11-16 腾讯科技(深圳)有限公司 Performance test methods and system
CN107783886A (en) * 2016-08-25 2018-03-09 平安科技(深圳)有限公司 A kind of method and terminal for obtaining operation frame per second

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140130017A1 (en) * 2012-03-28 2014-05-08 Tencent Technology (Shenzhen) Company Limited Test case screening method and system
CN104063326A (en) * 2014-07-14 2014-09-24 上海零一拼装信息技术有限公司 Software testing data analysis oscilloscope and method
CN106126431A (en) * 2016-08-23 2016-11-16 腾讯科技(深圳)有限公司 Performance test methods and system
CN107783886A (en) * 2016-08-25 2018-03-09 平安科技(深圳)有限公司 A kind of method and terminal for obtaining operation frame per second

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112925552A (en) * 2021-02-26 2021-06-08 北京百度网讯科技有限公司 Code processing method, device, equipment and storage medium
CN112925552B (en) * 2021-02-26 2023-07-28 北京百度网讯科技有限公司 Code processing method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
US20130166267A1 (en) Diagnostic factor set determination apparatus and method
JP4634525B2 (en) Simulation method, simulation program, and simulation apparatus
JP2009223451A (en) Performance monitoring program, performance monitoring method and performance monitoring device
CN110221959B (en) Application program testing method, device and computer readable medium
CN108108260B (en) Resource file verification method and device
CN112600919B (en) Equipment computing power evaluation method and system based on PoW consensus mechanism
JP2014053010A (en) Apparatus and method for detecting source code error location in mixed-mode program
CN110580220B (en) Method for measuring code segment execution time and terminal equipment
JPWO2018069950A1 (en) Log analysis method, system and program
CN111309586A (en) Command testing method, device and storage medium thereof
CN110046086B (en) Expected data generation method and device for test and electronic equipment
CN108595326A (en) Code based on individual instructions takes statistical method, system and storage medium
CN116413587B (en) Method and device for selecting rollback path
CN105630680B (en) A kind of random test program generation method
CN111382052A (en) Code quality evaluation method and device and electronic equipment
CN108985379A (en) Performance estimating method, device and the computer readable storage medium of classifier
CN115509904A (en) Assertion generation method and device of interface test case
US20210406583A1 (en) Generation of a second object model based on a first object model for use in object matching
US11520831B2 (en) Accuracy metric for regular expression
CN116097227A (en) Test case selection method and device based on change correlation analysis
KR101228167B1 (en) Program, test apparatus and testing method
WO2019225007A1 (en) Input error detection apparatus, input error detection method, and input error detection program
CN117236277B (en) Method and device for checking register and electronic equipment
US6882952B1 (en) System and method for measuring bus frequency
CN115981711B (en) Code processing method and electronic equipment

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

Application publication date: 20180928

RJ01 Rejection of invention patent application after publication