CN110442504A - Performance test methods and device based on call stack analysis - Google Patents

Performance test methods and device based on call stack analysis Download PDF

Info

Publication number
CN110442504A
CN110442504A CN201910710780.1A CN201910710780A CN110442504A CN 110442504 A CN110442504 A CN 110442504A CN 201910710780 A CN201910710780 A CN 201910710780A CN 110442504 A CN110442504 A CN 110442504A
Authority
CN
China
Prior art keywords
transaction information
consuming
time
call stack
task
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
CN201910710780.1A
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN201910710780.1A priority Critical patent/CN110442504A/en
Publication of CN110442504A publication Critical patent/CN110442504A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording 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/3452Performance evaluation by statistical analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Debugging And Monitoring (AREA)

Abstract

Performance test methods and device provided by the invention based on call stack analysis, this method comprises: obtaining the Transaction Information during program execution multiple-task to be measured, the Transaction Information includes: call stack mark, object identity, timestamp and job identification, one task includes multiple operations, and the Transaction Information of all operations of a task is documented in corresponding call stack;The time-consuming of the operation is obtained according to the corresponding Transaction Information of a job identification;The time-consuming that corresponding Transaction Information obtains the task is identified according to a call stack;Corresponding Transaction Information, which is identified, according to an object obtains summarizing time-consuming and splitting time-consuming for the object;The operation for exporting various operations in the program to be measured is time-consuming, the corresponding task of each generic task is time-consuming and each trading object is corresponding summarizes time-consuming and splits time-consuming, wherein, by can be realized the automatic tests of transaction capabilities, mission performance and long process link based on call stack analysis and object analysis, job analysis.

Description

Performance test methods and device based on call stack analysis
Technical field
The present invention relates to computer software testing technical field more particularly to a kind of performance tests based on call stack analysis Method and apparatus.
Background technique
With the development of science and technology, computer network becomes increasingly popular, and the audient face of software application is also increasingly wider.In Pang In the use process of big crowd, the received data volume exponentially formula of software application increases.
Software test describes a kind of correctness, integrality, process of safety and quality for promoting identification software.It changes Sentence is talked about, and software test is the audit or comparison procedure between a kind of reality output and anticipated output.The classics of software test Definition is: operating under the defined conditions to program, to find program error, measures software quality, and whether can to it Meet the process that design requirement is assessed.
Past is only satisfied with the software test industry of middle small data quantity, it has to face and solve big data quantity, high concurrent Brought new problem is based on this, and all kinds of performance test methods and tool obtain more and more in internet industry test Using.Passage capacity test, application and development/tester can excavate the problem hidden under small data quantity in previous, from And mistake can be checked in time, it is ensured that the stabilization and High Availabitity of application system.
But the method currently used for performance test is all based on the transaction interface or network request, message of originating end Request, is judged whether performance is normal by request-answer time-consuming, can only often find the property of individual interface or request in this way Energy problem, cannot monitor the performance of entire trade link.
Summary of the invention
For the problems of the prior art, the present invention provides a kind of performance test methods and dress based on call stack analysis It sets, electronic equipment and computer readable storage medium, problems of the prior art can at least be partially solved.
To achieve the goals above, the present invention adopts the following technical scheme:
In a first aspect, providing a kind of performance test methods based on call stack analysis, comprising:
Obtain program to be measured and execute Transaction Information during multiple-task, the Transaction Information include: call stack mark, Object identity, timestamp and job identification, a task include multiple operations, the Transaction Information of all operations of a task It is documented in corresponding call stack;
The time-consuming of the operation is obtained according to the corresponding Transaction Information of a job identification;
The time-consuming that corresponding Transaction Information obtains the task is identified according to a call stack;
Corresponding Transaction Information, which is identified, according to an object obtains summarizing time-consuming and splitting time-consuming for the object;
Export the operation time-consuming, the corresponding task time-consuming of each generic task and each transaction of various operations in the program to be measured Object is corresponding to summarize time-consuming and splits time-consuming.
Further, the performance test methods based on call stack analysis further include:
The trading object is initialized and generates corresponding object identity.
Further, the performance test methods based on call stack analysis further include: injecting rule according to pre-set code will count Program to be measured is injected without intrusive mood according to acquisition code, to execute multiple-task using data acquisition code acquisition program to be measured Transaction Information in the process.
Further, the performance test methods based on call stack analysis further include:
The acquired program to be measured of filtering executes the Transaction Information during multiple-task.
Further, the Transaction Information obtained during program execution multiple-task to be measured, comprising:
After operation starts, the Transaction Information in program execution operation process to be measured is acquired;
Before operation terminates, the Transaction Information in program execution operation process to be measured is acquired, is adopted after being started with more new thread The information of collection.
Further, the corresponding Transaction Information of a task is stored in a transaction data storage unit, the transaction Data storage cell includes: stack frame, stack height, call stack mark, call stack identifier generator and the storage of performance initial data Device,
The calling stack representation generator is for generating call stack mark;
The stack frame is used to save the Transaction Information in a kind of operation process;
The stack height is used for the height of recording stack frame;
The performance raw storage is for saving the Transaction Information for completing the operation.
It is further, described that the time-consuming of the operation is obtained according to the corresponding Transaction Information of a job identification, comprising:
It obtains comprising the job identification and call stack identifies identical Transaction Information;
Earliest timestamp is subtracted using the timestamp in the Transaction Information of acquisition the latest, obtains the time-consuming of the operation.
It is further, described that the time-consuming that corresponding Transaction Information obtains the task is identified according to a call stack, comprising:
Obtain the Transaction Information comprising call stack mark;
Earliest timestamp is subtracted using the timestamp in the Transaction Information of acquisition the latest, obtains the time-consuming of the task.
Further, described corresponding Transaction Information is identified according to an object to obtain summarizing time-consuming and splitting and consume for the object When, comprising:
Obtain the Transaction Information comprising the object identity;
Earliest timestamp is subtracted using the timestamp in the Transaction Information of acquisition the latest, obtains described summarizing time-consuming;
Timestamp in the Transaction Information that will acquire in the identical Transaction Information of job identification the latest subtracts the earliest time Stamp obtains the fractionation time-consuming that the job identification corresponds to operation.
Second aspect provides a kind of performance testing device based on call stack analysis, comprising:
Transaction Information obtains module, obtains the Transaction Information during program execution multiple-task to be measured, the transaction letter Breath includes: call stack mark, object identity, timestamp and job identification, and a task includes multiple operations, task The Transaction Information of all operations is documented in corresponding call stack;
Operation time-consuming computing module obtains the time-consuming of the operation according to the corresponding Transaction Information of a job identification;
Task time-consuming computing module identifies the time-consuming that corresponding Transaction Information obtains the task according to a call stack;
Object time-consuming computing module identifies corresponding Transaction Information according to an object and obtains summarizing time-consuming and tearing open for the object Divide time-consuming;
Output module, operation time-consuming, the corresponding task of each generic task for exporting various operations in the program to be measured are time-consuming And each trading object is corresponding summarizes time-consuming and split time-consuming.
Further, the performance testing device based on call stack analysis further include:
Labeling module is initialized, the trading object is initialized and generates corresponding object identity.
Further, the performance testing device based on call stack analysis further include:
Data acquisition code is injected program to be measured without intrusive mood according to pre-set code injection rule by code injection module, To execute the Transaction Information during multiple-task using data acquisition code acquisition program to be measured.
Further, the performance testing device based on call stack analysis further include:
Information filtering module filters the Transaction Information during acquired program to be measured execution multiple-task.
Further, the Transaction Information acquisition module includes:
Initial acquisition unit after operation starts, acquires the Transaction Information in program execution operation process to be measured;
Terminate acquisition unit, before operation terminates, the Transaction Information in program execution operation process to be measured is acquired, with more new line Journey starts rear information collected.
Further, the corresponding Transaction Information of a task is stored in a transaction data storage unit, the transaction Data storage cell includes: stack frame, stack height, call stack mark, call stack identifier generator and the storage of performance initial data Device,
The calling stack representation generator is for generating call stack mark;
The stack frame is used to save the Transaction Information in a kind of operation process;
The stack height is used for the height of recording stack frame;
The performance raw storage is for saving the Transaction Information for completing the operation.
Further, the operation time-consuming computing module includes:
Job information acquiring unit obtains comprising the job identification and call stack identifies identical Transaction Information;
Operation time-consuming computing unit subtracts earliest timestamp using the timestamp in the Transaction Information of acquisition the latest, obtains To the time-consuming of the operation.
Further, the task time-consuming computing module includes:
Mission bit stream acquiring unit obtains the Transaction Information comprising call stack mark;
Task time-consuming computing unit subtracts earliest timestamp using the timestamp in the Transaction Information of acquisition the latest, obtains To the time-consuming of the task.
Further, the object time-consuming computing module includes:
Object information acquiring unit obtains the Transaction Information comprising the object identity;
Summarize time-consuming computing unit, subtracts earliest timestamp using the timestamp in the Transaction Information of acquisition the latest, obtain Summarize time-consuming to described;
Split time-consuming computing unit, the time in the Transaction Information that will acquire in the identical Transaction Information of job identification the latest Stamp subtracts earliest timestamp, obtains the fractionation time-consuming that the job identification corresponds to operation.
The third aspect, provides a kind of electronic equipment, including memory, processor and storage on a memory and can handled The computer program run on device, the processor realize that the above-mentioned performance based on call stack analysis is surveyed when executing described program The step of method for testing.
Fourth aspect provides a kind of computer readable storage medium, is stored thereon with computer program, the computer program The step of above-mentioned performance test methods based on call stack analysis are realized when being executed by processor.
Performance test methods and device, electronic equipment and computer-readable provided by the invention based on call stack analysis Storage medium, this method comprises: obtaining the Transaction Information during program execution multiple-task to be measured, the Transaction Information packet Include: call stack mark, object identity, timestamp and job identification, a task include multiple operations, task it is all The Transaction Information of operation is documented in corresponding call stack;The operation is obtained according to the corresponding Transaction Information of a job identification Time-consuming;The time-consuming that corresponding Transaction Information obtains the task is identified according to a call stack;It is identified according to an object corresponding It is time-consuming time-consuming with fractionation that Transaction Information obtains summarizing for the object;The operation for exporting various operations in the program to be measured is time-consuming, The corresponding task of each generic task is time-consuming and each trading object is corresponding summarizes time-consuming and split time-consuming, wherein by based on adjusting It can be realized the automation of transaction capabilities, mission performance and long process link with stack analysis and object analysis, job analysis Test.
For above and other objects, features and advantages of the invention can be clearer and more comprehensible, preferred embodiment is cited below particularly, And cooperate institute's accompanying drawings, it is described in detail below.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is the application Some embodiments for those of ordinary skill in the art without creative efforts, can also basis These attached drawings obtain other attached drawings.In the accompanying drawings:
Fig. 1 is the flow diagram one of the performance test methods based on call stack analysis in the embodiment of the present invention;
Fig. 2 shows the structures of transaction data storage unit employed in the embodiment of the present invention;
Fig. 3 is the flow diagram two of the performance test methods based on call stack analysis in the embodiment of the present invention;
Fig. 4 is the flow diagram three of the performance test methods based on call stack analysis in the embodiment of the present invention;
Fig. 5 shows the specific steps of step S100 in Fig. 1, Fig. 3, Fig. 4;
Fig. 6 is the structural block diagram of the performance testing device based on call stack analysis in the embodiment of the present invention;
Fig. 7 is the structure chart of electronic equipment of the embodiment of the present invention.
Specific embodiment
In order to make those skilled in the art more fully understand application scheme, below in conjunction in the embodiment of the present application Attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is only The embodiment of the application a part, instead of all the embodiments.Based on the embodiment in the application, ordinary skill people Member's every other embodiment obtained without making creative work, all should belong to the model of the application protection It encloses.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more, The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces The form of product.
It should be noted that term " includes " and " tool in the description and claims of this application and above-mentioned attached drawing Have " and their any deformation, it is intended that cover it is non-exclusive include, for example, containing a series of steps or units Process, method, system, product or equipment those of are not necessarily limited to be clearly listed step or unit, but may include without clear Other step or units listing to Chu or intrinsic for these process, methods, product or equipment.
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Currently, the method for performance test is all based on the transaction interface or network request, message request of originating end, Judge whether performance is normal by request-answer time-consuming, can only often find that the performance of individual interface or request is asked in this way Topic, cannot monitor the performance of entire trade link.Also, with universal, the trade link of the applications such as distribution, serviceization Increasingly longer, existing scheme hinders the development of technology due to that cannot monitor entire trade link performance.
At least partly to solve above-mentioned technical problem in the prior art, the embodiment of the invention provides one kind based on calling Stack analysis performance test methods, by based on call stack analysis and object analysis, job analysis can be realized transaction capabilities, The automatic test of mission performance and long process link, can be used for the performance evaluation of JAVA system.
Fig. 1 is the flow diagram one of the performance test methods based on call stack analysis in the embodiment of the present invention.Such as Fig. 1 Shown, the performance test methods that should be analyzed based on call stack may include the following contents:
Step S100: obtaining the Transaction Information during program execution multiple-task to be measured, and the Transaction Information includes: to adjust With stack mark, object identity, timestamp and job identification, a task includes multiple operations, all operations of a task Transaction Information be documented in corresponding call stack;
Wherein, call stack mark can be call stack id, which is globally unique id.The timestamp is shown The time that Transaction Information generates, which can be job number, for uniquely indicating a kind of specific operation.
For example, the task that queries the balance, after the instruction for getting user query remaining sum, the operation that is included can be with Are as follows: user key is obtained, queried the balance in the database according to the key, return to remaining sum value.
It is worth noting that program to be measured executes the Transaction Information storage during multiple-task in the embodiment of the present invention In a transaction data memory cell array, which includes multiple transaction data storage units, the corresponding friendship of a task Easy information is stored in a transaction data storage unit, referring to fig. 2, the transaction data storage unit 1001It include: stack frame 111, stack height 112, call stack mark 113, call stack identifier generator 114 and performance raw storage 115, it is described Call stack representation generator for generating call stack mark, the format of call stack mark is [when the address machine mac+thread id++ Between stab], it is globally unique;Call stack mark is for identifying the operation call stack completed with this;The stack frame is for saving a kind of work Transaction Information during industry, i.e. frame object data, frame object data are interior to contain relevant all information of trading;The stack height Height for recording stack frame;The performance raw storage is protected for saving the Transaction Information for completing the operation The frame object data of complete call are deposited, subsequent performance evaluation is used for.
In addition, each task has a thread to realize, and such as: deposit task is that a thread realizes that query processing is by another One thread time, per thread store information according to stacked manner.
Due to a set for the treatment of process that the stacking that program process is the frame in thread, thread is popped, will hand over Easy data storage cell is designed as the object structure of a similar thread, can greatly facilitate the storage of data and storing data All features.
In program operation process, each transaction data storage unit is corresponding with a thread.When new job calling is come Then, first using call stack identifier generator it is that current memory cell generates globally unique id, and by the operation of preservation The frame object of field data is stored in stack frame, and stack height is increased by 1;For the same several operations once called, it can all be deposited into phase In stack frame with the storage unit of call stack id.When method call finishes, corresponding frame is released from stack frame, calculates operation It after time-consuming, is charged in performance raw storage together with frame data, while it is 0 that stack height, which is reduced 1. to work as stack height, is said Bright method call terminates, and the use of call stack identifier generator is at this time that storage unit creates a new id.
It is worth noting that the information of the operation recorded in call stack is in the automatic stacking of transaction operational process and to pop , performance raw storage is deposited into when popping;Call stack is real-time mock trading process data, storage in call stack Data be as process of exchange changes;
Performance raw storage is a queue structure, has recorded complete Transaction Information, the letter of internal storage Breath in output Transaction Information to being reduced when log, the increase when above-mentioned job information exits call stack.
In addition, identified to obtain according to call stack all operations an of task output information (in output information containing pair As mark), all objects that the task is related to then are obtained, the transaction for obtaining all links further according to all object identities is believed Breath.
Step S200: the time-consuming of the operation is obtained according to the corresponding Transaction Information of a job identification.
Specifically, firstly, obtaining comprising the job identification and the identical Transaction Information of call stack mark;Then, it utilizes Timestamp in the Transaction Information of acquisition the latest subtracts earliest timestamp, obtains the time-consuming of the operation.
Step S300: the time-consuming that corresponding Transaction Information obtains the task is identified according to a call stack;
Specifically, firstly, obtaining the Transaction Information comprising call stack mark;Then, the Transaction Information of acquisition is utilized In timestamp the latest subtract earliest timestamp, obtain the time-consuming of the task.
Wherein, the difference for obtaining same task according to magnanimity Transaction Information is time-consuming, by that can obtain to time-consuming statistics Abnormal process, the problem of to find software.
Step S400: corresponding Transaction Information is identified according to an object and obtains summarizing time-consuming and splitting time-consuming for the object;
Wherein, a usual object identity will do it multiple-task, at this point, object identity (the i.e. object sequence number uid) institute Corresponding Transaction Information is stored in different call stacks, in this case, firstly, obtaining the transaction comprising the object identity Information (Transaction Information be within the scope of certain time, such as in 1 day), in the entire link to identify the trading object The record of all operations;Then, earliest timestamp is subtracted using the timestamp in the Transaction Information of acquisition the latest, obtained described Summarize time-consuming;Finally, the timestamp in the Transaction Information that will acquire in the identical Transaction Information of job identification the latest subtracts earliest Timestamp, obtain the job identification correspond to operation fractionation it is time-consuming.
Specifically, summarize time-consuming=earliest one operation and the latest difference of the exchange hour of one operation, as The time-consuming of whole flow process link.Split the independent time-consuming of time-consuming=each operation.
Step S500: operation time-consuming, the corresponding task of each generic task of various operations in the output program to be measured are time-consuming And each trading object is corresponding summarizes time-consuming and split time-consuming.
It is worth noting that it is for statistical analysis to Transaction Information by timing, it is lasting to realize to monomer operation/request tune With, call stack (synchronization call realizes a thread of task) and process link (asynchronous/queue, it is asynchronous refer to it is not collinear Journey, queue refer to that result the deposit queue, next thread of a synchronizing thread go in queue to call again) performance test.
Through the above technical solution it is known that the performance test side provided in an embodiment of the present invention based on call stack analysis Method, by can be realized transaction capabilities, mission performance and long process based on call stack analysis and object analysis, job analysis The automatic test of link.
It is worth noting that long process link refers to after the completion of a task, process also is continuing to extend, by extension Divide the link formed together with task long process link.
It for example, can also oriented user transmission withdrawal notice on the mobile phone that bank reserves after the completion of deposit task And the short message of remaining sum situation, until having sent short message, being considered as long process link terminates.
Fig. 3 is the flow diagram two of the performance test methods based on call stack analysis in the embodiment of the present invention.Such as Fig. 3 It is shown, it can also should include in following based on the performance test methods that call stack is analyzed on the basis of comprising step shown in Fig. 1 Hold:
Step S10: initializing the trading object and generates corresponding object identity.
Fig. 4 is the flow diagram three of the performance test methods based on call stack analysis in the embodiment of the present invention.Such as Fig. 4 It is shown, the performance test methods that should be analyzed based on call stack on the basis of comprising step shown in Fig. 1, Fig. 3, can also include with Lower content:
Step S40: data acquisition code is injected without intrusive mood by program to be measured according to pre-set code injection rule, to utilize Data acquisition code acquisition program to be measured executes the Transaction Information during multiple-task.
Specifically, before the starting of java program, program is implemented without intrusive code injection (using directly modification program Bytecode mode injecting codes, it is transparent to developer, program code is modified without developer), it is customized modification, is injected Code logic include object sequence number generate logic, Transaction Information acquisition logic and Transaction Information output logic.
Object sequence number generates logic are as follows: and call object (i.e. trading object) to be numbered for each, specifically: in object It calls object sequence number to generate logic in initialization action, generates globally unique id (using the Mac of runtime server for object Location+combination producing the serial number of timestamp+nano seconds), i.e. object sequence number uid (object identity).
Transaction Information acquisition logic: being responsible for the key method information needed for acquisition performance analysis in program operation process, And it is stored in original performance data storage.
Transaction Information exports logic: being responsible for timing and the data in performance raw storage are output in log, often The corresponding frame data of log recording, contain the relevant all information of transaction, such as class name, job identification, call stack id, right As serial number uid, timestamp etc..
Wherein, by code injection, program is made automatic collection and to export specific side in the process of running with journal format Method operation information, the related data including time-consuming information needed for analysis operation and analysis task, mentions for subsequent performance evaluation For original performance data.
Wherein, transparent to developer without intrusive information collection code injection by implementing, increase for program automatic Transaction Information acquisition and Transaction Information output function, collect computer software operational process in thread information, stack frame information with And the key elements such as radiation scope of object identity, and according to Transaction Information when the program operation got, it realizes and makees to single The performance evaluation of the long process link of industry, task and a certain trading object.
In an alternative embodiment, can also should include: based on the performance test methods that call stack is analyzed
It obtains the performance initial data log acquired by injecting program in operational process and collects database.
It is worth noting that each data-base recording contains the key message that analysis performance is used, it to be used for progressive It can statistical analysis.
It in an alternative embodiment, can also should include: filtering institute based on the performance test methods that call stack is analyzed The program to be measured obtained executes the Transaction Information during multiple-task.
Specifically, the format for meeting the output of original performance data is matched using canonical mode.
It in an alternative embodiment, can also should include: that will match based on the performance test methods that call stack is analyzed Original performance data be registered in database, every log is the information of a frame, contains class name, job identification, call stack The field informations such as id, object sequence number uid, timestamp.
In an alternative embodiment, referring to Fig. 5, step S100 may include the following contents:
Step S110: after operation starts, the Transaction Information in program execution operation process to be measured is acquired;
Step S120: before operation terminates, the Transaction Information in program execution operation process to be measured is acquired, is opened with more new thread Information collected after beginning.
Can also should include: based on the performance test methods that call stack is analyzed in an alternative embodiment
It needs to be arranged operation filtering rule according to user, to be filled into the operation that network operator is not concerned with, only it is closed The operation of note is for statistical analysis.
In order to help those skilled in the art to more fully understand the application, by taking a special scenes as an example, to the reality of the application Existing process is illustrated:
This includes: based on performance test methods that call stack is analyzed
Step 1: treating ranging sequence and implement code injection, obtain the program containing certain logic.
Step 2: program normally disposes starting.
Step 3: receiving transaction request.
Step 4: initialization requests object.
Step 5: starting the specific operation of call request object.
Step 6: after the operation for starting call request, executing data acquisition process movement.
Specifically: (1) it obtains exchange hour information: using system nanosecond as exchange hour System.nanoTime (), It avoids concurrently leading to Data duplication.(2) it obtains current thread information: the thread id etc. where current work is obtained, for subsequent The acquisition of transaction data storage unit space.(3) it obtains transaction data storage unit space: according to current thread id, obtaining and hand over The data content of easy data storage cell sequence corresponding position;If obtaining fail memory cell, indicate that current method uses new line Journey creates storage unit and calls and stack representation generator is called to generate new calling stack representation.It is subsequent empty using the storage unit Between store Transaction Information.(4) Transaction Information is saved using frame object: by relevant Transaction Information, including filename, class name, work The deposit such as industry name, signing messages (type of formal parameter and returned data type), object sequence number uid, exchange hour, call stack id Into frame object.(5) frame object data are saved using transaction data access unit: frame object is saved in transaction to enter stack mode In the stack frame of data storage cell, stack frame height is added 1 after the completion.
Step 7: executing data processing actions before specific method terminates to call.
Specifically, (1) obtains exchange hour information: use system nanosecond as exchange hour System.nanoTime (), It avoids concurrently leading to Data duplication.(2) it obtains current thread information: the thread id etc. where current method is obtained, for subsequent The acquisition of transaction data storing data.(3) from transaction data access unit getting frame object data: by where called operation Thread id, obtain transaction data storage unit sequence corresponding position data content, then by frame object obtain trade start When information;(4) it is time-consuming to calculate operation: in the frame object data of above-mentioned acquisition, extracting opening, and start with transaction Exchange hour afterwards compares, and it is time-consuming to calculate operation calling process.(5) All Activity information deposit performance initial data is deposited Reservoir: will be related to the relevant information of performance evaluation, including filename, class name, job name, signing messages (type of formal parameter and Returned data type), object sequence number uid, exchange hour, the information such as transaction time and call stack id be deposited into original performance number According in memory.Stack frame height subtracts 1 after the completion.
Step 8: request job calling terminates, and continues with next record request.
Later, original performance data are periodically output to log, circle collection original performance data logging, by each frame one Record storage is to database, periodically according to the original performance data of database, execution performance analysis, output analysis result.
In conclusion the performance test methods provided in an embodiment of the present invention based on call stack analysis, pass through transaction data Storage unit storage model simulates the storing process of multi-threaded approach storehouse in program operation process, to make under complete documentation The call stack of industry and the field data of each operation realize the traceable of operation, provide more for performance test and analysis Add detailed data foundation.Query object radiation scope is spread by operation call stack+object sequence number, finds transaction process Link information realizes the traceable of transaction flow link, provides data foundation for the performance evaluation of long business process transactions.Pass through Without intrusive code injection technology, modifying original service code without developer can be realized the performance point of tested business Analysis, has the convenience of deployment and O&M.
Based on the same inventive concept, the embodiment of the present application also provides a kind of performance test dresses based on call stack analysis It sets, can be used to implement method described in above-described embodiment, as described in the following examples.Due to what is analyzed based on call stack The principle that performance testing device solves the problems, such as is similar to the above method, therefore the reality of the performance testing device based on call stack analysis The implementation that may refer to the above method is applied, overlaps will not be repeated.Used below, term " unit " or " module " can To realize the combination of the software and/or hardware of predetermined function.Although device described in following embodiment is preferably come with software It realizes, but the realization of the combination of hardware or software and hardware is also that may and be contemplated.
Fig. 6 is the structural block diagram of the performance testing device based on call stack analysis in the embodiment of the present invention.Such as Fig. 6 institute Show, the performance testing device that should be analyzed based on call stack is specifically included: Transaction Information obtains module 10, operation time-consuming computing module 20, task time-consuming computing module 30, object time-consuming computing module 40, output module 50.
Transaction Information acquisition module 10 obtains the Transaction Information during program execution multiple-task to be measured, the transaction letter Breath includes: call stack mark, object identity, timestamp and job identification, and a task includes multiple operations, task The Transaction Information of all operations is documented in corresponding call stack;
Wherein, call stack mark can be call stack id, which is the unique identification for indicating object identity, than Such as, in bank transaction, which can be bank's card number.The timestamp shows the time of Transaction Information generation, the work Industry mark can be job number, for uniquely indicating a kind of specific operation.
For example, the task that queries the balance, after the instruction for getting user query remaining sum, the operation that is included can be with Are as follows: user key is obtained, queried the balance in the database according to the key, return to remaining sum value.
It is worth noting that program to be measured executes the Transaction Information storage during multiple-task in the embodiment of the present invention In a transaction data memory cell array, which includes multiple transaction data storage units, the corresponding friendship of a task Easy information is stored in a transaction data storage unit, referring to fig. 2, the transaction data storage unit 1001It include: stack frame 111, stack height 112, call stack mark 113, call stack identifier generator 114 and performance raw storage 115, it is described Call stack representation generator for generating call stack mark, the format of call stack mark is [when the address machine mac+thread id++ Between stab], it is globally unique;Call stack mark is for identifying the operation call stack completed with this;The stack frame is for saving a kind of work Transaction Information during industry, i.e. frame object data, frame object data are interior to contain relevant all information of trading;The stack height Height for recording stack frame;The performance raw storage is protected for saving the Transaction Information for completing the operation The frame object data of complete call are deposited, subsequent performance evaluation is used for.
In addition, each task has a thread to realize, and such as: deposit task is that a thread realizes that query processing is by another One thread time, per thread store information according to stacked manner.
Due to a set for the treatment of process that the stacking that program process is the frame in thread, thread is popped, will hand over Easy data storage cell is designed as the object structure of a similar thread, can greatly facilitate the storage of data and storing data All features.
In program operation process, each transaction data storage unit is corresponding with a thread.When new job calling is come Then, first using call stack identifier generator it is that current memory cell generates globally unique id, and by the operation of preservation The frame object of field data is stored in stack frame, and stack height is increased by 1;For the same several operations once called, it can all be deposited into phase In stack frame with the storage unit of call stack id.When method call finishes, corresponding frame is released from stack frame, calculates operation It after time-consuming, is charged in performance raw storage together with frame data, while it is 0 that stack height, which is reduced 1. to work as stack height, is said Bright method call terminates, and the use of call stack identifier generator is at this time that storage unit creates a new id.
Operation time-consuming computing module 20 obtains the time-consuming of the operation according to the corresponding Transaction Information of a job identification;
Wherein, the difference for obtaining same task according to magnanimity Transaction Information is time-consuming, by that can obtain to time-consuming statistics Abnormal process, the problem of to find software.
Task time-consuming computing module 30 identifies the time-consuming that corresponding Transaction Information obtains the task according to a call stack;
Wherein, a usual object identity will do it multiple-task, at this point, object identity (the i.e. object sequence number uid) institute Corresponding Transaction Information is stored in different call stacks.
Object time-consuming computing module 40 according to an object identify corresponding Transaction Information obtain the object summarize it is time-consuming and It splits time-consuming;
It is time-consuming that output module 50 exports the operation time-consuming of various operations in the program to be measured, the corresponding task of each generic task And each trading object is corresponding summarizes time-consuming and split time-consuming.
It is worth noting that it is for statistical analysis to Transaction Information by timing, it is lasting to realize to monomer operation/request tune With, call stack (synchronization call realizes a thread of task) and process link (asynchronous/queue, it is asynchronous refer to it is not collinear Journey, queue refer to that result the deposit queue, next thread of a synchronizing thread go in queue to call again) performance test.
Through the above technical solution it is known that the performance test dress provided in an embodiment of the present invention based on call stack analysis It sets, by can be realized transaction capabilities, mission performance and long process based on call stack analysis and object analysis, job analysis The automatic test of link.
It is worth noting that long process link refers to after the completion of a task, process also is continuing to extend, by extension Divide the link formed together with task long process link.
It for example, can also oriented user transmission withdrawal notice on the mobile phone that bank reserves after the completion of deposit task And the short message of remaining sum situation, until having sent short message, being considered as long process link terminates.
It in an alternative embodiment, can also should include: initialization based on the performance testing device that call stack is analyzed Labeling module.
Initialization labeling module initializes the trading object and generates corresponding object identity;
It in an alternative embodiment, can also should include: code note based on the performance testing device that call stack is analyzed Enter module, data acquisition code is injected without intrusive mood by program to be measured according to pre-set code injection rule, to utilize the data Acquire the Transaction Information during code acquisition program execution multiple-task to be measured.
Specifically, before the starting of java program, program is implemented without intrusive code injection (using directly modification program Bytecode mode injecting codes, it is transparent to developer, program code is modified without developer), it is customized modification, is injected Code logic include object sequence number generate logic, Transaction Information acquisition logic and Transaction Information output logic.
Object sequence number generates logic are as follows: and call object (i.e. trading object) to be numbered for each, specifically: in object It calls object sequence number to generate logic in initialization action, generates globally unique id (using the Mac of runtime server for object Location+combination producing the serial number of timestamp+nano seconds), i.e. object sequence number uid (object identity).
Transaction Information acquisition logic: being responsible for the key method information needed for acquisition performance analysis in program operation process, And it is stored in original performance data storage.
Transaction Information exports logic: being responsible for timing and the data in performance raw storage are output in log, often The corresponding frame data of log recording, contain the relevant all information of transaction, such as class name, job identification, call stack id, right As serial number uid, timestamp etc..
Wherein, by code injection, program is made automatic collection and to export specific side in the process of running with journal format Method operation information, the related data including time-consuming information needed for analysis operation and analysis task, mentions for subsequent performance evaluation For original performance data.
Wherein, transparent to developer without intrusive information collection code injection by implementing, increase for program automatic Transaction Information acquisition and Transaction Information output function, collect computer software operational process in thread information, stack frame information with And the key elements such as radiation scope of object identity, and according to Transaction Information when the program operation got, it realizes and makees to single The performance evaluation of the long process link of industry, task and a certain trading object.
It in an alternative embodiment, can also should include: that log is adopted based on the performance testing device that call stack is analyzed Collect module, obtain the performance initial data log acquired by injecting program in operational process and collects database.
It is worth noting that each data-base recording contains the key message that analysis performance is used, it to be used for progressive It can statistical analysis.
It in an alternative embodiment, can also should include: information mistake based on the performance testing device that call stack is analyzed Module is filtered, the Transaction Information during acquired program to be measured execution multiple-task is filtered.
Specifically, the format for meeting the output of original performance data is matched using canonical mode.
It in an alternative embodiment, can also should include: that data enter based on the performance testing device that call stack is analyzed Matched original performance data are registered in database by library module, and every log is the information of a frame, contains class name, makees The field informations such as industry mark, call stack id, object sequence number uid, timestamp.
In an alternative embodiment, which obtains module and includes: initial acquisition unit and terminate to acquire Unit.
Initial acquisition unit acquires the Transaction Information in program execution operation process to be measured after operation starts;
Terminate acquisition unit before operation terminates, the Transaction Information in program execution operation process to be measured is acquired, to update Thread starts rear information collected.
It in an alternative embodiment can also should include: operation filtering based on the performance testing device that call stack is analyzed Module needs to be arranged operation filtering rule according to user, only of interest to its to be filled into the operation that network operator is not concerned with Operation is for statistical analysis.
In an alternative embodiment, which includes: job information acquiring unit and operation Time-consuming computing unit.
Job information acquiring unit is obtained comprising the job identification and call stack identifies identical Transaction Information;
Operation time-consuming computing unit subtracts earliest timestamp using the timestamp in the Transaction Information of acquisition the latest, obtains The time-consuming of the operation.
In an alternative embodiment, which includes: mission bit stream acquiring unit and task Time-consuming computing unit.
Mission bit stream acquiring unit is used to obtain the Transaction Information comprising call stack mark;
Task time-consuming computing unit subtracts earliest timestamp using the timestamp in the Transaction Information of acquisition the latest, obtains The time-consuming of the task.
In an alternative embodiment, which includes: object information acquiring unit, summarizes time-consuming Computing unit and the time-consuming computing unit of fractionation.
Wherein, (Transaction Information is certain to Transaction Information of the object information acquiring unit acquisition comprising the object identity In time range, such as in 1 day), the record of all operations in the entire link to identify the trading object;
Summarize time-consuming computing unit and subtract earliest timestamp using the timestamp in the Transaction Information of acquisition the latest, obtains It is described to summarize time-consuming;
Split the time in the Transaction Information that time-consuming computing unit will acquire in the identical Transaction Information of job identification the latest Stamp subtracts earliest timestamp, obtains the fractionation time-consuming that the job identification corresponds to operation.
Specifically, summarize time-consuming=earliest one operation and the latest difference of the exchange hour of one operation, as The time-consuming of whole flow process link.Split the independent time-consuming of time-consuming=each operation.
Device, module or the unit that above-described embodiment illustrates can specifically be realized, Huo Zheyou by computer chip or entity Product with certain function is realized.It is a kind of typical to realize that equipment is electronic equipment, specifically, electronic equipment for example can be with For personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media player, Any in navigation equipment, electronic mail equipment, game console, tablet computer, wearable device or these equipment sets Standby combination.
Electronic equipment specifically includes memory, processor and storage on a memory and can in a typical example The computer program run on a processor, the processor realize following step when executing described program:
Obtain program to be measured and execute Transaction Information during multiple-task, the Transaction Information include: call stack mark, Object identity, timestamp and job identification, a task include multiple operations, the Transaction Information of all operations of a task It is documented in corresponding call stack;
The time-consuming of the operation is obtained according to the corresponding Transaction Information of a job identification;
The time-consuming that corresponding Transaction Information obtains the task is identified according to a call stack;
Corresponding Transaction Information, which is identified, according to an object obtains summarizing time-consuming and splitting time-consuming for the object;
Export the operation time-consuming, the corresponding task time-consuming of each generic task and each transaction of various operations in the program to be measured Object is corresponding to summarize time-consuming and splits time-consuming.
As can be seen from the above description, electronic equipment provided in an embodiment of the present invention, can be used for computer software testing, pass through base It can be realized oneself of transaction capabilities, mission performance and long process link in call stack analysis and object analysis, job analysis Dynamicization test.
Below with reference to Fig. 7, it illustrates the structural representations for the electronic equipment 600 for being suitable for being used to realize the embodiment of the present application Figure.
As shown in fig. 7, electronic equipment 600 includes central processing unit (CPU) 601, it can be according to being stored in read-only deposit Program in reservoir (ROM) 602 is loaded into random access storage device (RAM) from storage section 608) program in 603 and Execute various work appropriate and processing.In RAM603, also it is stored with system 600 and operates required various programs and data. CPU601, ROM602 and RAM603 are connected with each other by bus 604.Input/output (I/O) interface 605 is also connected to bus 604。
I/O interface 605 is connected to lower component: the importation 606 including keyboard, mouse etc.;It is penetrated including such as cathode The output par, c 607 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 608 including hard disk etc.; And including such as LAN card, the communications portion 609 of the network interface card of modem etc..Communications portion 609 via such as because The network of spy's net executes communication process.Driver 610 is also connected to I/O interface 605 as needed.Detachable media 611, such as Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 610, in order to read from thereon Computer program be mounted as needed such as storage section 608.
Particularly, according to an embodiment of the invention, may be implemented as computer above with reference to the process of flow chart description Software program.For example, the embodiment of the present invention includes a kind of computer readable storage medium, it is stored thereon with computer program, The computer program realizes following step when being executed by processor:
The time-consuming of the operation is obtained according to the corresponding Transaction Information of a job identification;
The time-consuming that corresponding Transaction Information obtains the task is identified according to a call stack;
Corresponding Transaction Information, which is identified, according to an object obtains summarizing time-consuming and splitting time-consuming for the object;
Export the operation time-consuming, the corresponding task time-consuming of each generic task and each transaction of various operations in the program to be measured Object is corresponding to summarize time-consuming and splits time-consuming.
As can be seen from the above description, computer readable storage medium provided in an embodiment of the present invention, can be used for computer software Test, by can be realized transaction capabilities, mission performance and long stream based on call stack analysis and object analysis, job analysis The automatic test of journey link.
In such embodiments, which can be downloaded and installed from network by communications portion 609, And/or it is mounted from detachable media 611.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
For convenience of description, it is divided into various units when description apparatus above with function to describe respectively.Certainly, implementing this The function of each unit can be realized in the same or multiple software and or hardware when application.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including described want There is also other identical elements in the process, method of element, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can provide as method, system or computer program product. Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application Form.It is deposited moreover, the application can be used to can be used in the computer that one or more wherein includes computer usable program code The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) Formula.
The application can describe in the general context of computer-executable instructions executed by a computer, such as program Module.Generally, program module includes routines performing specific tasks or implementing specific abstract data types, programs, objects, group Part, data structure etc..The application can also be practiced in a distributed computing environment, in these distributed computing environments, by Task is executed by the connected remote processing devices of communication network.In a distributed computing environment, program module can be with In the local and remote computer storage media including storage equipment.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for system reality For applying example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to embodiment of the method Part explanation.
The above description is only an example of the present application, is not intended to limit this application.For those skilled in the art For, various changes and changes are possible in this application.All any modifications made within the spirit and principles of the present application are equal Replacement, improvement etc., should be included within the scope of the claims of this application.

Claims (20)

1. a kind of performance test methods based on call stack analysis characterized by comprising
The Transaction Information during program execution multiple-task to be measured is obtained, the Transaction Information includes: call stack mark, object Mark, timestamp and job identification, a task include multiple operations, and the Transaction Information of all operations of a task is remembered It is loaded in corresponding call stack;
The time-consuming of the operation is obtained according to the corresponding Transaction Information of a job identification;
The time-consuming that corresponding Transaction Information obtains the task is identified according to a call stack;
Corresponding Transaction Information, which is identified, according to an object obtains summarizing time-consuming and splitting time-consuming for the object;
Export the operation time-consuming, the corresponding task time-consuming of each generic task and each trading object of various operations in the program to be measured It is corresponding to summarize time-consuming and split time-consuming.
2. the performance test methods according to claim 1 based on call stack analysis, which is characterized in that further include:
The trading object is initialized and generates corresponding object identity.
3. the performance test methods according to claim 1 based on call stack analysis, which is characterized in that further include:
Data acquisition code is injected into program to be measured without intrusive mood according to pre-set code injection rule, to acquire using the data Code acquisition program to be measured executes the Transaction Information during multiple-task.
4. the performance test methods according to claim 1 based on call stack analysis, which is characterized in that further include:
The acquired program to be measured of filtering executes the Transaction Information during multiple-task.
5. the performance test methods according to claim 4 based on call stack analysis, which is characterized in that the acquisition is to be measured Program executes the Transaction Information during multiple-task, comprising:
After operation starts, the Transaction Information in program execution operation process to be measured is acquired;
Before operation terminates, the Transaction Information in program execution operation process to be measured is acquired, is started with more new thread rear collected Information.
6. the performance test methods according to claim 5 based on call stack analysis, which is characterized in that a task is corresponding Transaction Information be stored in a transaction data storage unit, the transaction data storage unit include: stack frame, stack height, Call stack mark, call stack identifier generator and performance raw storage,
The calling stack representation generator is for generating call stack mark;
The stack frame is used to save the Transaction Information in a kind of operation process;
The stack height is used for the height of recording stack frame;
The performance raw storage is for saving the Transaction Information for completing the operation.
7. the performance test methods according to claim 1 based on call stack analysis, which is characterized in that described to make according to one Industry identifies corresponding Transaction Information and obtains the time-consuming of the operation, comprising:
It obtains comprising the job identification and call stack identifies identical Transaction Information;
Earliest timestamp is subtracted using the timestamp in the Transaction Information of acquisition the latest, obtains the time-consuming of the operation.
8. the performance test methods according to claim 1 based on call stack analysis, which is characterized in that described to be adjusted according to one The time-consuming that corresponding Transaction Information obtains the task is identified with stack, comprising:
Obtain the Transaction Information comprising call stack mark;
Earliest timestamp is subtracted using the timestamp in the Transaction Information of acquisition the latest, obtains the time-consuming of the task.
9. the performance test methods according to claim 1 based on call stack analysis, which is characterized in that described according to a pair Summarizing time-consuming and splitting time-consuming for the object is obtained as identifying corresponding Transaction Information, comprising:
Obtain the Transaction Information comprising the object identity;
Earliest timestamp is subtracted using the timestamp in the Transaction Information of acquisition the latest, obtains described summarizing time-consuming;
Timestamp in the Transaction Information that will acquire in the identical Transaction Information of job identification the latest subtracts earliest timestamp, obtains The fractionation for corresponding to operation to the job identification is time-consuming.
10. a kind of performance testing device based on call stack analysis characterized by comprising
Transaction Information obtains module, obtains the Transaction Information during program execution multiple-task to be measured, the Transaction Information packet Include: call stack mark, object identity, timestamp and job identification, a task include multiple operations, task it is all The Transaction Information of operation is documented in corresponding call stack;
Operation time-consuming computing module obtains the time-consuming of the operation according to the corresponding Transaction Information of a job identification;
Task time-consuming computing module identifies the time-consuming that corresponding Transaction Information obtains the task according to a call stack;
Object time-consuming computing module identifies corresponding Transaction Information according to an object and obtains summarizing time-consuming and splitting and consume for the object When;
Output module, the operation for exporting various operations in the program to be measured is time-consuming, the corresponding task of each generic task is time-consuming and Each trading object is corresponding to summarize time-consuming and splits time-consuming.
11. the performance testing device according to claim 10 based on call stack analysis, which is characterized in that further include:
Labeling module is initialized, the trading object is initialized and generates corresponding object identity.
12. the performance testing device according to claim 10 based on call stack analysis, which is characterized in that further include:
Data acquisition code is injected program to be measured without intrusive mood according to pre-set code injection rule, with benefit by code injection module The Transaction Information during multiple-task is executed with data acquisition code acquisition program to be measured.
13. the performance testing device according to claim 10 based on call stack analysis, which is characterized in that further include:
Information filtering module filters the Transaction Information during acquired program to be measured execution multiple-task.
14. the performance testing device according to claim 13 based on call stack analysis, which is characterized in that the transaction letter Breath obtains module
Initial acquisition unit after operation starts, acquires the Transaction Information in program execution operation process to be measured;
Terminate acquisition unit, before operation terminates, acquires the Transaction Information in program execution operation process to be measured, opened with more new thread Information collected after beginning.
15. the performance testing device according to claim 14 based on call stack analysis, which is characterized in that a task pair The Transaction Information answered is stored in a transaction data storage unit, and the transaction data storage unit includes: stack frame, stack height Degree, call stack mark, call stack identifier generator and performance raw storage,
The calling stack representation generator is for generating call stack mark;
The stack frame is used to save the Transaction Information in a kind of operation process;
The stack height is used for the height of recording stack frame;
The performance raw storage is for saving the Transaction Information for completing the operation.
16. the performance testing device according to claim 10 based on call stack analysis, which is characterized in that the operation consumption When computing module include:
Job information acquiring unit obtains comprising the job identification and call stack identifies identical Transaction Information;
Operation time-consuming computing unit subtracts earliest timestamp using the timestamp in the Transaction Information of acquisition the latest, obtains institute State the time-consuming of operation.
17. the performance testing device according to claim 10 based on call stack analysis, which is characterized in that the task consumption When computing module include:
Mission bit stream acquiring unit obtains the Transaction Information comprising call stack mark;
Task time-consuming computing unit subtracts earliest timestamp using the timestamp in the Transaction Information of acquisition the latest, obtains institute State the time-consuming of task.
18. the performance testing device according to claim 10 based on call stack analysis, which is characterized in that the object consumption When computing module include:
Object information acquiring unit obtains the Transaction Information comprising the object identity;
Summarize time-consuming computing unit, subtracts earliest timestamp using the timestamp in the Transaction Information of acquisition the latest, obtain institute It states and summarizes time-consuming;
Time-consuming computing unit is split, the timestamp in the Transaction Information that will acquire in the identical Transaction Information of job identification the latest subtracts Earliest timestamp is removed, the fractionation time-consuming that the job identification corresponds to operation is obtained.
19. a kind of electronic equipment including memory, processor and stores the calculating that can be run on a memory and on a processor Machine program, which is characterized in that the processor realizes that claim 1 to 9 is described in any item based on tune when executing described program The step of performance test methods analyzed with stack.
20. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program quilt Processor execute when realize claim 1 to 9 it is described in any item based on call stack analysis performance test methods the step of.
CN201910710780.1A 2019-08-02 2019-08-02 Performance test methods and device based on call stack analysis Pending CN110442504A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910710780.1A CN110442504A (en) 2019-08-02 2019-08-02 Performance test methods and device based on call stack analysis

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910710780.1A CN110442504A (en) 2019-08-02 2019-08-02 Performance test methods and device based on call stack analysis

Publications (1)

Publication Number Publication Date
CN110442504A true CN110442504A (en) 2019-11-12

Family

ID=68432906

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910710780.1A Pending CN110442504A (en) 2019-08-02 2019-08-02 Performance test methods and device based on call stack analysis

Country Status (1)

Country Link
CN (1) CN110442504A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112925717A (en) * 2021-03-22 2021-06-08 北京字节跳动网络技术有限公司 Method, apparatus, device and medium for determining objects of call stack frame
CN113672458A (en) * 2021-08-18 2021-11-19 北京基调网络股份有限公司 Application program monitoring method, electronic equipment and storage medium
US11563628B1 (en) 2021-08-23 2023-01-24 Oracle International Corporation Failure detection in cloud-computing systems

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104536810A (en) * 2014-12-18 2015-04-22 北京奇虎科技有限公司 Abnormity detecting method and device based on stacks
US20150347282A1 (en) * 2014-05-30 2015-12-03 Apple Inc. Performance testing for blocks of code
CN109783161A (en) * 2018-12-11 2019-05-21 北京三快在线科技有限公司 The operation information of application program determines method, apparatus in iOS system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150347282A1 (en) * 2014-05-30 2015-12-03 Apple Inc. Performance testing for blocks of code
CN104536810A (en) * 2014-12-18 2015-04-22 北京奇虎科技有限公司 Abnormity detecting method and device based on stacks
CN109783161A (en) * 2018-12-11 2019-05-21 北京三快在线科技有限公司 The operation information of application program determines method, apparatus in iOS system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112925717A (en) * 2021-03-22 2021-06-08 北京字节跳动网络技术有限公司 Method, apparatus, device and medium for determining objects of call stack frame
CN112925717B (en) * 2021-03-22 2024-03-12 北京字节跳动网络技术有限公司 Method, apparatus, device and medium for determining object of call stack frame
CN113672458A (en) * 2021-08-18 2021-11-19 北京基调网络股份有限公司 Application program monitoring method, electronic equipment and storage medium
CN113672458B (en) * 2021-08-18 2022-09-09 北京基调网络股份有限公司 Application program monitoring method, electronic equipment and storage medium
US11563628B1 (en) 2021-08-23 2023-01-24 Oracle International Corporation Failure detection in cloud-computing systems

Similar Documents

Publication Publication Date Title
US7299382B2 (en) System and method for automatic test case generation
CN110442504A (en) Performance test methods and device based on call stack analysis
US6279124B1 (en) Method and system for testing hardware and/or software applications
CN109302522A (en) Test method, device and computer system and medium
CN106649084B (en) The acquisition methods and device of function call information, test equipment
US20090019428A1 (en) Method for Analyzing Transaction Traces to Enable Process Testing
CN108073513A (en) The apparatus and method tested the intelligent contract based on block chain
CN111010316A (en) Flow playback method, device and system
CN107040578A (en) Method of data synchronization, device and system
CN112560114B (en) Method and device for calling intelligent contract
CN109684052A (en) Transaction analysis method, apparatus, equipment and storage medium
Bianculli et al. Monitoring conversational web services
CN112966311A (en) Intelligent contract checking method and device and electronic equipment
CN108897686B (en) Full-entry automatic testing method and device
CN108089982A (en) Test method, device, electronic equipment and computer readable storage medium
CN110399309A (en) A kind of test data generating method and device
CN106802865B (en) Response simulator and method for software test
CN110377588A (en) A kind of database object access monitoring method, server and terminal
CN110209582A (en) The statistical method and device of code coverage, electronic equipment, storage medium
CN110362569A (en) The method of calibration and device of tables of data, electronic equipment, storage medium
CN111324545B (en) Application server middleware performance test method, test terminal and application server
CN110032750A (en) A kind of model construction, data life period prediction technique, device and equipment
Härer Towards Interoperability of Open and Permissionless Blockchains: A Cross-Chain Query Language
CN109656825A (en) The method and device of fine arts resource processing, electronic equipment, storage medium
CN115237889A (en) Database switching method and device, storage medium and computer 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20191112