CN100353334C - Method of software trace and system therefor - Google Patents

Method of software trace and system therefor Download PDF

Info

Publication number
CN100353334C
CN100353334C CNB2004100626810A CN200410062681A CN100353334C CN 100353334 C CN100353334 C CN 100353334C CN B2004100626810 A CNB2004100626810 A CN B2004100626810A CN 200410062681 A CN200410062681 A CN 200410062681A CN 100353334 C CN100353334 C CN 100353334C
Authority
CN
China
Prior art keywords
trace
information
trace information
software
unit
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.)
Expired - Fee Related
Application number
CNB2004100626810A
Other languages
Chinese (zh)
Other versions
CN1731366A (en
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CNB2004100626810A priority Critical patent/CN100353334C/en
Publication of CN1731366A publication Critical patent/CN1731366A/en
Application granted granted Critical
Publication of CN100353334C publication Critical patent/CN100353334C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The present invention provides a software tracking method which comprises the procedures that the filter condition of tracking information is arranged; the information of each tracking point in a detected software system is collected so as to obtain the tracking information; the tracking information is filtered according to the filter condition; the tracking information is classified and assembled according to the attribute of the tracking information; the tracking information is analyzed and displayed after classified and assembled. The present invention also puts forward a software tracking system accordingly. The systematization of a software tracking course can be enhanced by the software tracking method, and the influence on system operation performance is reduced. Meanwhile, the output of the tracking information has better organization performance.

Description

Method of software trace and system thereof
Technical field
The present invention relates to communicate by letter or electronic applications in the software administration technology, relate in particular to a kind of method of software trace and system thereof.
Background technology
Testability of software mainly comprises observability and controllability, and the software track technology is to realize a kind of the most frequently used, the fundamental method of software observability, and it is the necessary a kind of gordian technique of software test, debugging and positioning problems.
At present, the software trace mode that software industry is commonly used generally all is based on and prints that principle realizes.Please refer to Fig. 1, this figure is a synoptic diagram of realizing software track in the prior art based on the printing principle, and it realizes that principle is as follows:
The place that needs to carry out information trace in the tested software system is provided with print statement Print, and the print statement Print by this setting outputs to the visible place of operating personnel with corresponding trace information, as computer screen or program interface etc.
In above-mentioned tested software system, print statement Print is set, the tested software system is carried out on the basis of information trace, can also and then the follow-up mechanism that classification is printed be set to print statement Print, need in the tested software system to be about to the trace information of printout, according to different criteria for classifications different printing ranks is set, thereby can be implemented in the tested software operational process static or dynamically adjust the printing rank of trace information, to determine which trace information to export, which trace information can not exported.
Can classify to trace information according to following two kinds of criteria for classifications, the printing rank is set to be respectively every class trace information:
1) according to module in the tested software system or function trace information is classified, as according to modules A, module B...... carries out classification, or according to function A, function B...... carries out classification etc.;
2) classify according to the order of severity of each trace information in the tested software system, as according to severity level, general rank ... or the like trace information is classified.
And the trace information of classification type information follow-up mechanism output is supported two kinds of data layouts, and is as follows:
A. text formatting adopts text formattings to export various trace informations in the application process of classification type information follow-up mechanism at present;
B. binary mode is promptly represented different trace information (as can be with 1 trace information of representing " file open failed ") respectively with the different binary numeral of printout.
Above-mentioned classification type information follow-up mechanism exists many shortcomings that are difficult to overcome, and when particularly being applied in the bigger software systems (the above source code of 1,000,000 row), shows as follows:
(1) the information trace process lacks the systematization design, generally in software development process, only stipulates DLL (dynamic link library) and the criteria for classification of print statement Print, and lacks complete, systematic following function design, shows:
1. each tested software system does not all carry out the standard unification to the data layout of trace information output, the method for calling of print statement Print DLL (dynamic link library) etc.;
2. because print statement Print generally can not treat as an independent function, be mostly that developer oneself arbitrarily is provided with as required, where should print, export what content, all lack unified standard so be arranged on;
3. Shu Chu trace information has only the related development personnel to understand, and other personnel understand and can have any problem;
4. because the trace information data layout disunity of output, print statement Print is provided with the shortage standard criterion, therefore can't carry out the data analysis of robotization and handle, and is difficult to realize automatic test;
(2) trace information influences big (when particularly adopting text formatting output tracking information) to system performance, shows as follows:
When 1. adopting text formatting output tracking information, a trace information often takies tens to up to a hundred bytes, and is bigger to taking of communication bandwidth;
2. under the more situation of trace point, what trace information was exported also can be more, like this will be higher to taking of CPU running space;
(3) the inorganizable property of Shu Chu trace information, promptly Shu Chu trace information is more and more assorted, does not organize according to certain mode;
For example: follow the tracks of software systems that are used for controlling call, wish ideally and trace information can be classified according to different type of calls; But classification type information follow-up mechanism generally can not be sorted out the trace information of same item, prints output but various trace informations are mixed, thereby causes trace information is added up or operation such as trend map analysis difficulty relatively.
In sum, because classification type information follow-up mechanism information trace process lacks the systematization design, and bigger to the system performance influence, the inorganizable property of output of while trace information; So existing classification type information tracking technique is difficult to large software system is supported the demand of following function.
Summary of the invention
The technical problem to be solved in the present invention is to propose a kind of method of software trace and system thereof, strengthening the systematization of software track process, and reduces the influence to system performance, and makes the output of trace information have better tissues.
For addressing the above problem, the present invention proposes a kind of method of software trace, be used for the tested software system is followed the tracks of, be provided with a plurality of trace points in the described tested software system, comprise step:
(1) the static information configuration unique identification of following the tracks of for each trace point;
(2) the trace information filtercondition is set;
(3) gather each trace point information in the tested software system, obtain trace information,, described trace information comprises static information unique identification and the multidate information that trace point traces into;
(4) according to described filtercondition trace information is filtered;
(5) according to the attribute of trace information the trace information after filtering is sorted out assembling;
(6) according to the static information of the static information unique identification index correspondence that comprises in the trace information of sorting out after the assembling;
(7) static information that indexes and the multidate information that traces into are resolved demonstration.
Wherein said step (7) also comprises step afterwards: the trace information that (61) will be sorted out after the assembling is stored.Described step (61) also comprises step afterwards:
(62) inquire about the trace information of corresponding stored according to the querying condition of external world's input;
(63) trace information that inquires is resolved demonstration.
Also comprise the step that several trace information shunting conditions are set in the wherein said step (2); Described step (7) also comprises step afterwards:
(5A) trace information of sorting out after assembling is shunted processing according to different shunting conditions;
(5B) trace information that will shunt the different piece after handling is issued to the different browse unit of following the tracks of respectively and resolves demonstration.
Wherein said step (5B) also comprises step afterwards:
(5B.1) differently follow the tracks of the trace information that browse unit obtain self respectively and store;
(5B.2) the different browse unit of following the tracks of are respectively according to the trace information of querying condition inquiry corresponding stored in the trace information of step (5B.1) storage or in the trace information of step (61) storage of external world's input;
(5B.3) follow the tracks of browse unit the trace information that inquires is resolved demonstration.
Also comprise step between wherein said step (4) and (5):
(41) trace information after will filtering carries out buffer memory;
(42) trace information that arrives according to subsequent acquisition filters once more to the trace information of buffer memory.
Wherein attribute is a type of service described in the step (5); Or be the sign that each business processing is assigned in type of service and each type of service.
Wherein said unique identification for the static information configuration is the binary digit sign.
Correspondingly, the invention allows for a kind of software track system, be used for the tested software system is followed the tracks of, be provided with a plurality of trace points in the described tested software system, comprising:
The filtercondition storage unit is used to store the filtercondition that sets in advance;
Collecting unit is used for gathering each trace point information of tested software system, obtains trace information, and described trace information comprises static information unique identification and the multidate information that trace point traces into;
Filter element is connected with collecting unit with described filtercondition storage unit respectively, is used for according to the filtercondition of filtercondition cell stores the trace information that collecting unit collects being filtered;
Sort out module units, be connected, be used for attribute according to the trace information trace information after to filtration treatment and sort out assembling with described filter element;
Principal solution is analysed display unit, is connected with described classification module units, is used for the static information of the static information unique identification index correspondence that comprises according to the trace information of sorting out after the assembling; Static information that indexes and the multidate information that traces into are resolved demonstration.
Described system also comprises the trace information main memory unit, is connected with described classification module units, is used for the trace information of sorting out after assembling is stored.
Described system also comprises main query unit, analysing display unit with described trace information main memory unit with principal solution respectively is connected, be used for analysing the corresponding trace information of the querying condition inquiry trace information main memory unit storage of display unit input, and the trace information that inquires is sent to principal solution analyse display unit and resolve demonstration according to principal solution.
Described system also comprises:
Shunting condition storage unit is used to store several trace information shunting conditions that set in advance;
Dividing cell is connected with the classification module units with described shunting condition storage unit respectively, is used for according to difference shunting condition the trace information of sorting out after assembling being shunted processing; With a plurality of
From resolving display unit, be connected with described dividing cell respectively, be used for receiving respectively the appropriate section trace information after shunting is handled and resolve demonstration.
Wherein also comprise from resolving the display unit side at each:
Trace information is used for storing from the trace information of resolving the display unit reception described from storage unit;
From query unit, be connected from storage unit, trace information main memory unit with from resolving display unit with trace information respectively, be used for according to from the querying condition of resolving the display unit input to trace information from storage unit or the corresponding trace information of trace information main memory unit inquiry storage, and the trace information that inquires sent to from resolving display unit resolve demonstration.
Described system also comprises the cache filter unit, described filter element is connected with the classification module units by this cache filter unit, trace information after being used for the cache filter unit and filtering, and according to subsequent acquisition to trace information the trace information of buffer memory is filtered once more.
Method of software trace of the present invention and system thereof can reach following beneficial effect:
1) because before the trace information parsing is shown to operating personnel, the filtercondition that sets in advance according to operating personnel has carried out filtration treatment to trace information, only make qualified trace information is resolved demonstration, so shared communication bandwidth when having reduced trace information output; Also can reduce simultaneously the taking of CPU running space, so the information trace processing procedure can reduce the influence to the total system runnability.
2) before the trace information parsing is shown to operating personnel, trace information has been carried out sorting out assembling to be handled, thereby trace information can be shown according to different types respectively, be convenient to checking of operating personnel like this, also be convenient to follow-up trace information be carried out analytic statistics, therefore make the output of trace information have better tissues.
3) to have better tissues be because the data layout of trace information output is stipulated in the output of trace information, can realize the data analysis processing and the automatic test of robotization like this; Therefore strengthened the systematization of tracing process.
4) because the static information that trace point is followed the tracks of is provided with unique identification, so just can directly export the unique identification of static information correspondence, when resolve showing again according to the corresponding relation of unique identification and static information, the static information of correspondence is resolved demonstration to get final product, because the shared byte of unique identification that is provided with is far smaller than the byte that static information takies, so further reduced communication bandwidth shared when trace information is exported, the corresponding influence that has also just reduced the total system runnability.
Description of drawings
Fig. 1 is based on printing the principle schematic that principle realizes software track in the prior art;
Fig. 2 is the main body realization flow figure of method of software trace of the present invention;
Fig. 3 is the first embodiment process flow diagram of method of software trace of the present invention;
Fig. 4 is the second embodiment process flow diagram of method of software trace of the present invention;
Fig. 5 is the 3rd an embodiment process flow diagram of method of software trace of the present invention;
Fig. 6 is according to the process synoptic diagram of the corresponding static information of static information unique identification index in the method for software trace of the present invention;
Fig. 7 is the synoptic diagram that the interface shape that will have trace point in the method for software trace of the present invention now is converted to the interface shape of the trace point that meets the present invention program;
Fig. 8 is the primary structure block diagram of software track of the present invention system;
Fig. 9 is software track of the present invention system increases the cache filter unit on the basic composition architecture basics a structured flowchart;
Figure 10 is the first example structure block diagram of software track system of the present invention on the basic composition architecture basics;
Figure 11 is the second example structure block diagram of software track system of the present invention on the basic composition architecture basics;
Figure 12 is the three example structure block diagram of software track system of the present invention on the basic composition architecture basics;
Figure 13 is the simple work frame chart that software track system of the present invention and tested software system combine;
Figure 14 is in software track of the present invention system, the layoutprocedure of filtercondition and shunting condition and the process synoptic diagram that trace information is filtered and shunts.
Embodiment
At first the method for software trace that the present invention is proposed is elaborated, and please refer to Fig. 2, and this figure is the main body realization flow figure of method of software trace of the present invention; The implementation procedure of method of software trace of the present invention shown in the figure mainly comprises the steps:
Step S1 is provided for trace information is carried out the trace information filtercondition of condition filter; As suppose the trace information filtercondition that is provided with for following the tracks of the information of all types of service for " callings ", other trace information then will be filtered before output as the trace information of " short message " business;
Step S2, the information of gathering each trace point in the tested software system is to obtain trace information; A general tested software system has set in advance a plurality of trace points, follows the tracks of with the information that the operation to the corresponding program section obtains, and can take the initiative and gather the information that each trace point is followed the tracks of, to obtain trace information; The trace information that also can take each trace point of passive reception to send is to realize passive collection trace information;
Step S3 filters the trace information that step S2 collects according to the trace information filtercondition that sets in advance among the step S1; As the above-mentioned filtercondition that sets in advance is only to follow the tracks of the information of all types of service for " calling ", after then the trace information that collects being filtered according to this filtercondition, only remain with the trace information of type of service, and other trace informations can be filtered all for " calling ";
Certainly the trace information after can also and then will filtering after step S3 filters the trace information that traces into carries out buffer memory, and the trace information that arrives according to subsequent acquisition is implemented filtration treatment once more to the trace information of buffer memory again; Because sometimes, because the trace information buffer memory that trace point need be traced into could judge whether this trace information needs output behind certain phase.The most tangible example is exactly that only a failure information ability of appearance output tracking information in the middle of certain business processing process needs the buffer memory trace information trace information of buffer memory to be exported when this business processing failure or professional finishing this moment again;
Step S4 sorts out assembling according to the attribute of trace information to trace information; Wherein can or according to the sign that each business processing in the type of service of trace information and each type of service is assigned to trace information be sorted out assembling and handle according to the type of service of trace information here.As for trace information can be organized according to the operating process in various types of traffic or certain type of service, in the DLL (dynamic link library) of trace information output, designed two parameters:
1) type of service
2) the sign ID that each business processing is assigned in the type of service
Like this, therefore only all have these two fields (the sign ID that is assigned in type of service and the business processing process) in the trace information of all outputs, need sort and similar trace information can be organized into together according to the traffic ID that is assigned with in type of service and the business processing process.For example: type of service is " calling ", and each calling will be assigned with a unique sign ID in carrying out the service call process, so with calling 1, calling out 2 all relevant trace informations just can make a distinction fully, wherein " calling " is " type of service " in calling 1 and calling 2, " 1 " or " 2 " then refers in the call business type, and per call is handled the sign id information that is assigned to.
Step S5, the trace information that step S4 is sorted out after assembling is resolved demonstration respectively, the parsing here shows and refers to show that operating personnel just can analyze, add up and generate report form processing etc. to the trace information that shows like this on the tracking server on backstage.
With reference to Fig. 3, this figure is the first embodiment process flow diagram of method of software trace of the present invention; Realize on the basis of principle at method of software trace of the present invention shown in Figure 2, after step S5 resolves demonstration with trace information, this embodiment and then comprise:
Step S6, the trace information that will sort out respectively after the assembling stores the storer of tracking server into;
Step S7, tracking server is follow-up can inquire about the trace information of corresponding stored according to the querying condition (the corresponding information that traces into is called in extended meeting as required behind the general operation personnel) of external world's input, to carry out subsequent analysis processing;
Step S8, tracking server is resolved display process with the trace information that step S7 inquires, to export to operating personnel.
With reference to Fig. 4, this figure is the second embodiment process flow diagram of method of software trace of the present invention; On the first embodiment basis shown in Figure 3, in step S1 and then trace information shunting condition is set, then after step S5 resolved demonstration with trace information, this second embodiment can also comprise:
Step S9 shunts processing according to the difference shunting condition that sets in advance to the trace information of sorting out after assembling, trace information is split into several parts;
Step S10, the trace information of the different piece after step S9 shunting handled is issued to different tracking browse unit respectively and resolves demonstration, be provided with long-range separate mode between general a plurality of tracking browse unit, then can follow the tracks of browse unit and require the trace information seen according to each, each shunting condition of following the tracks of browse unit is set in the tracking server, tracking server will be split into different parts with trace information according to different shunting conditions like this, resolves demonstration respectively the trace information of appropriate section is handed down to corresponding tracking browse unit.
For example, suppose that the operating personnel that follow the tracks of on the browse unit 1 only wish to see that phone number is the call follow information of A, the operating personnel that follow the tracks of on the browse unit 2 only wish to see that phone number is the call follow information of B, follow the tracks of browse unit 1 so and follow the tracks of browse unit 2 and just can be respectively self shunting condition be set in the tracking server, the all-calls trace information is followed the tracks of to each at tracking server and will be shunted when browse unit sends like this: all phone numbers are that the call follow information of A will be sent to tracking browse unit 1, and all phone numbers to be the call follow information of B will be sent to follows the tracks of browse unit 2, above-mentioned trace information shunting processing procedure that Here it is.
With reference to Fig. 5, this figure is the 3rd an embodiment process flow diagram of method of software trace of the present invention; On the second embodiment basis shown in Figure 4, after each tracking browse unit received corresponding trace information in step S10, the 3rd embodiment can also comprise:
Step S11, each is followed the tracks of browse unit and respectively the trace information that receives is stored; Carry out analyzing and processing in order to the corresponding trace information of subsequent calls;
Step S12, follow-up each tracking browse unit can be inquired about corresponding trace information according to the querying condition of external world's input respectively in the trace information of self storing; Each follows the tracks of browse unit can also inquire about corresponding trace information by network interconnection mode according to the querying condition of external world's input in the trace information of tracking server storage;
Step S13, each is followed the tracks of browse unit the trace information that step S12 inquires is resolved demonstration, so that the corresponding operating personnel carry out the trace information analyzing and processing.
Wherein each to follow the tracks of browse unit be a subclass of tracking server function, its fundamental purpose provides the trace information that many people watch tracking server simultaneously and traced into.
Certainly each mentioned embodiment of the invention described above method of software trace can also be used in combination arbitrarily, and other embodiment situations that constitute also all are included within the protection domain of the presently claimed invention.
In the tested software system, the information spinner that each trace point of setting traces into will comprise static information and multidate information, wherein:
The information that static information _ refer to can be determined in the compilation phase is as trace point place filename, row number, printable character string etc.;
Multidate information _ refer to the dynamic data in the tested software system operational process, as variate-value etc.;
Like this, because any variation generally can not take place in static information in whole test process, so the static information configuration uniquely identified mode that method of software trace proposition of the present invention is followed the tracks of for each trace point in the tested software system, the unique identification that will dispose for the static information that each trace point is followed the tracks of is defined as " following the tracks of coding " here.Therefore one " following the tracks of coding " just can replace all static informations of corresponding each trace point, and one is followed the tracks of coding can be the no symbol binary number of one 4 byte (also can be 2 bytes, if the tested software system scale is less).The static information of each trace point is all corresponding one by one with a tracking coding like this, all static informations of each trace point have just encoded corresponding one by one with corresponding tracking (to follow the tracks of in fact and encode than I.D. ID like this, the static information of each trace point cans be compared to information such as this person's age, native place, birthplace, just can find corresponding people's identity information like this by this identity ID).Therefore by the corresponding coding of following the tracks of, just can find corresponding static information (filename at trace point place, go number printable character string etc.).
Illustrate as followsly, the output of former trace point is in the following way:
Mode one: printf (" the para is invalid in%s, %d ", _ FILE_, _ LINE_);
Method of software trace of the present invention can be write as like this:
Mode two: printf (TRACE_POINT_0001); TRACE_POINT_0001 is defined as an enumerated value, and is as follows:
enum?XXX
{
...,
TRACE_POINT_0001,//tml?exp?the?para?is?invalid
...,
}
Explanation to above-mentioned respective statement:
1) because the printable character string is actually a comment statement now, so can really not be compiled in the object code;
2) //tml exp is the identifier that is used for " source scan instrument " identification, realizes in the mode of note;
3) _ and FILE_, _ LINE_ obtains when scanning TRACE_POINT_0001 by " source scan instrument ".
Therefore, after unique identification (following the tracks of coding) is set for the static information of each trace point, in fact can produce a following corresponding relation of equal value:
TRACE_POINT_0001<=〉filename of 0001 place trace point, row number, printable character string;
Two kinds of way of outputs of mode one and mode two relatively, can see:
Mode one: output " 25 character+filename+row number " need take about 40 bytes;
Mode two: export 4 bytes or 2 bytes (100,000 row only need 2 bytes to get final product with interior source code tested software system).
As seen under the situation that effectively static information content is constant, the trace information amount that needs to handle significantly reduces, and then the occupancy to CPU and communication bandwidth also will reduce thereupon.
By after above-mentioned the setting, each trace point information of collection just comprises static information unique identification (following the tracks of coding) and the multidate information that trace point traces into like this; Like this when explain showing trace information, need index corresponding static information according to the static information unique identification that each trace point traces into after, again static information that indexes and the multidate information that traces into are resolved demonstration.
The unique identification that wherein is the static information configuration of each trace point is in writing the process of software, for each trace point configuration of being provided with, in the follow-up test process, process according to the corresponding trace information of the static information unique identification index of each trace point that collects can adopt the source scan program to realize, with reference to Fig. 6, this figure is according to the process synoptic diagram of the corresponding static information of static information unique identification index in the method for software trace of the present invention; Because the static information of each trace point has one-to-one relationship with the static information unique identification that is provided with for each trace point (following the tracks of coding), according to this corresponding relation, process according to the corresponding static information of static information unique identification index is finished automatically by a source scan instrument, need not manual intervention; As shown in Figure 6, in actual application, the source scan instrument is integrated in the translation and compiling environment, during so each compiling object code, can generate the required parsing text of test environment automatically, need not manual intervention.Wherein the process according to the static information of static information unique identification index correspondence is as follows:
1) the source scan instrument scans source code;
2) the source scan instrument generates according to scan code and resolves text;
3) source code generates tested software through compiling;
4) tested software is exported binary trace information in operational process;
5) analytical tool reads in 4) in the scale-of-two trace information;
6) analytical tool calls the code of resolution logic part;
7) code of resolution logic part assists analytical tool that the scale-of-two trace information is resolved according to resolving text;
8) obtain the text tracking information of scale-of-two trace information after resolving.
The above-mentioned whole implement process of method of software trace of the present invention and the situation of a plurality of embodiment narrated, but in existing a lot of softwares, set up considerable software track point, if when adopting the described new solution of method of software trace of the present invention, certainly will the trace point that these are old convert the new trace point implementation of the new program interface that meets the present invention program to.If this conversion work is by manually finishing, workload is inconceivable, because in a large software project, trace point often has several ten thousand to millions of more than.
Based on string searching and replacement principle, the present invention has developed one " the automatic crossover tool of trace point ", it can convert various old function calls to meet the present invention program's description new function call code according to different conversion demands, has reduced labor workload greatly.
With reference to Fig. 7, this figure is the synoptic diagram that the interface shape that will have trace point in the method for software trace of the present invention now is converted to the interface shape of the trace point that meets the present invention program; It realizes that principle is as follows:
Generally the trace point in the existing software systems being changed automatically is exactly to revise the function call statement, and it mainly finishes following work:
1) the original function title is replaced to the function name that meets testability DLL (dynamic link library) requirement of the present invention, for example make the printf statement into the trace statement among Fig. 7;
2) in the function that testability DLL (dynamic link library) of the present invention requires, increase the title that testability is encoded, as the title of the part of the TRACE_POINT_0001 among Fig. 7 with regard to encoding for the testability that increases;
All testability codings that 3) will increase output among the header file definition of a testability coding.
Comprehensive aforementioned content, the trace information to each trace point output in the method for software trace of the present invention has carried out the qualification of following form:
Trace (track demand is followed the tracks of coding, type of service, traffic ID, multidate information length, multidate information); All comprise these contents when being each trace information output:
Track demand, a track demand is represented the set of a trace point.Be that the information that these trace points are exported is correlated with, they are an integral body, or all export; Do not export.In general, a track demand can be made up of to a hundreds of trace point several; Wherein the know-why of track demand is referring to the patent " a kind of analytical approach to software measurability demand " of the applicant in first to file, and the patent No. is 02122967;
Follow the tracks of coding, be the unique identification of trace point static information configuration;
Type of service and traffic ID as previously mentioned, are for follow-up trace information to be sorted out the employed information of assembling;
Multidate information length and multidate information are the multidate information of each trace point output and the length value of each multidate information.
Correspondingly, the invention allows for a kind of software track system, with reference to Fig. 8, this figure is the primary structure block diagram of software track of the present invention system; Software track of the present invention system mainly comprises tracking agent 100, is arranged in the tested software system, the trace information of trace point in each the tested realization in the tested software system is gathered and handled accordingly; Tracking server 200, its function are that the trace information of sending after tracking agent 100 is handled is handled once more, analyze to be shown to operating personnel.Wherein mainly comprise collecting unit 1, filter element 2 in the tracking agent 100 again, sort out module units 3 and filtercondition storage unit 4, tracking server 200 comprises that mainly principal solution analyses display unit 5, and wherein the effect of each unit and logic connecting relation are as follows:
Filtercondition storage unit 4 is used to store the filtercondition that sets in advance;
Collecting unit 1, the information that is used for gathering each trace point of tested software system is to obtain trace information;
Filter element 2 is connected with collecting unit 1 with filtercondition storage unit 4 respectively, and the filtercondition that is used for storing in advance according to filtercondition storage unit 4 carries out filtration treatment to the trace information that collecting unit 1 collects;
Sort out module units 3, be connected, be used for attribute according to the trace information trace information after to filtration treatment and sort out assembling with filter element 2;
Principal solution is analysed display unit 5, is connected with classification module units 3, is used for the trace information of sorting out after assembling is resolved demonstration.
With reference to Fig. 9, this figure is software track of the present invention system increases the cache filter unit on the basic composition architecture basics a structured flowchart; On the basis of basic composition structure of the present invention shown in Figure 8, this structure in tracking agent 100 again and then comprise a cache filter unit 11, its filter element 2 is connected by this cache filter unit 11 and then with classification module units 3, this cache filter unit 11 is used for the trace information after filter element 2 filtrations is carried out buffer memory, comes the trace information of buffer memory is carried out filtration treatment once more according to the follow-up trace information that receives again.The most tangible example is exactly only when the professional middle just output tracking information of once failure that occurs, just to need this moment the buffer memory trace information to finish ability output tracking information up to service fail or business.
With reference to Figure 10, this figure is the first example structure block diagram of software track system of the present invention on the basic composition architecture basics; On the basis of basic composition structure of the present invention shown in Figure 8, again and then comprise trace information main memory unit 6 and main query unit 7, the work that these two unit can be finished is this embodiment in tracking server 200:
Trace information main memory unit 6 is connected with classification module units 3, and the trace information that is used for sorting out after assembling stores storer into, calls in order to subsequent query;
Main query unit 7, analysing display unit 5 with trace information main memory unit 6 and principal solution respectively is connected, be used for inquiring about the corresponding trace information that trace information main memory unit 6 is stored according to the querying condition information that operating personnel analyse display unit 5 inputs at principal solution, and the trace information that inquires is sent to principal solution analyse display unit 5, analyse display unit 5 by principal solution again the trace information that inquires is resolved demonstration.
With reference to Figure 11, this figure is the second example structure block diagram of software track system of the present invention on the basic composition architecture basics; On the basis of basic composition structure of the present invention shown in Figure 8, this embodiment in tracking server 200 again and then comprise shunting condition storage unit 8 and dividing cell 9, simultaneously in order to expand the function of software track of the present invention system, with the trace information that guarantees that long-range a plurality of operating personnel can watch tracking server 200 to be traced into, software track of the present invention system also comprises and follows the tracks of browse unit 300 in many ways, it is followed the tracks of browse unit 300 in many ways and includes a plurality of from resolving display unit, as from resolving display unit 1, from resolving display unit 2...... from resolving display unit n etc., the work that then newly-increased in this embodiment unit will be finished is:
Shunting condition storage unit 8 is used to store several trace information shunting conditions that set in advance;
Dividing cell 9, be connected with classification module units 3 with shunting condition storage unit 8 respectively, be used for shunting condition to shunting processing, trace information is divided into a plurality of different trace information parts by the trace information after the 3 classification assemblings of classification module units according to the difference of shunting condition storage unit 8 storages;
From resolving display unit 1~n, wherein each is connected with dividing cell 9 respectively from resolving display unit, is used to receive the appropriate section trace information of sending after dividing cell 9 shuntings are handled, and the trace information that receives is resolved demonstration.A plurality of functions from the parsing display unit are a subclass of tracking server 200 functions basically, and its fundamental purpose provides the function that many people use tracking server simultaneously, is similar to a terminal a little.
With reference to Figure 12, this figure is the three example structure block diagram of software track system of the present invention on the basic composition architecture basics; On the 3rd embodiment basis shown in Figure 11, each is from resolving the display unit side and then also comprising trace information from storage unit 10 with from query unit 20 in following the tracks of browse unit 300 in many ways, and the work that these two unit can be finished is as follows:
Trace information is used for the trace information that receives from parsing display unit 10 is stored from storage unit 10;
From query unit 20, respectively with trace information from storage unit 10 be connected from resolving display unit 30, can also and then be connected with trace information main memory unit 6 in the tracking server 200 by network interconnection mode, be used for according to operating personnel the corresponding trace information from the querying condition information inquiry trace information of resolving display unit 30 inputs from storage unit 10 storages or to the trace information of tracking server 200 trace information main memory units 6 storages the corresponding trace information of inquiry, and the trace information that inquires sent to from resolving display unit 30, should again the trace information that inquires be resolved demonstration from resolving display unit 30.
Certainly each embodiment of above-mentioned mentioned software track of the present invention system can also be used in combination arbitrarily, and other embodiment situations that constitute also all are included within the protection domain of the presently claimed invention.
With reference to Figure 13, this figure is the simple work frame chart that software track system of the present invention and tested software system combine; As shown in the drawing, generally comprise a plurality of tested realizations 410 in the tested software system 400, all be provided with a plurality of trace points (each small circle is all represented a trace point among the figure) in each tested realization 410, after gathering the information that each trace point traces into, the trace information that collects is handed down to the tracking agent 100 that in tested software system 400, is provided with, tracking agent 100 can be finished the real-time transmission to trace information, buffer memory, sort out assembling, functions such as filtration: all kinds of trace informations that tracking agent 100 will filter and sort out after the assembling are handed down to tracking server 200, and the major function of tracking server 200 is the storages that realize trace information, resolve and show, shunting information and subsequent query etc.; Tracking server 200 will be shunted corresponding the sending to of each several part trace information after the processing to trace information and follow the tracks of corresponding to resolving display unit in the browse unit 300 in many ways, so that a plurality of operating personnel of long-range dispersion can obtain corresponding trace information synchronously, make tracing process more flexible.
Tracker framework based on above-mentioned can reach following advantage:
1) well arranged: tested realization 410 parts need not to be concerned about functions such as the output, filtration of trace information, only are responsible for being provided with trace point, and get final product according to DLL (dynamic link library) output tracking information; Tracking agent 100 only is responsible for filtering trace information, trace information is sorted out functions such as assembling and issue trace information; And really trace information is stored, analyzed and complex process such as inquiry all is placed on one and independently handles on the tracking server 200.
2) take little to the performance of tested realization 410 (comprise that CPU takies, the communication resource, storage time and memory headroom performance): reason is that operation such as analyzing and processing, storage and the inquiry of trace information and tested software system 400 are irrelevant, but finish by tracking server 200 independently, take less to the performance of tested software system 400.
3) analysis ability of trace information is strengthened: because in tracking server 200, provide trace information is inquired about, filters, is sorted and various functions such as statistics, therefore can be more convenient trace information is analyzed and is generated operation such as form.
With reference to Figure 14, this figure is in software track of the present invention system, the layoutprocedure of filtercondition and shunting condition and the process synoptic diagram that trace information is filtered and shunts; As above-mentioned:
Filter process is meant that tracking agent 100 judged that whether trace information needs to output to tracking server 200, filters out the trace information that does not need to export when the trace information that traces at tested realization 410 each trace points of output was given tracking agent 100.
The shunting process is meant that the difference of following the tracks of in many ways in the browse unit 300 is different from the trace information of resolving display unit and need see, tracking server 200 need be shunted condition according to the trace information that difference is sent from the parsing display unit, trace information is shunted processing, only send each and wish that from resolving display unit the trace information seen is to respectively from resolving display unit.
Illustrate the implication of filtercondition and shunting condition again: the filtercondition of suppose to be provided with in tracking agent 100 is for following the tracks of the information that all types of service are " calling ", out of Memory then, the trace information professional as " short message " will be filtered at tracking agent 100 places, no longer pass out to tracking server 200, the filtration that Here it is realizes on tracking agent 100;
Suppose only to wish to see that from the operating personnel that resolve on the display unit 1 phone number is the call follow information of A, only wish to see that from the operating personnel that resolve on the display unit 2 phone number is the call follow information of B, the all-calls trace information will be shunted when display unit sends from resolving to each at tracking server 200 so: all phone numbers after the shunting are that the trace information of A will be sent to from resolving display unit 1, all phone numbers are that the trace information of B will be sent to from resolve display unit 2, the shunting that Here it is realizes on tracking server 200.
And the layoutprocedure of filtercondition and shunting condition is meant: operating personnel are arranged on the trace information filtercondition in the tracking agent 100 according to concrete needs, and trace information shunting condition is arranged in the tracking server 200.
The above only is a preferred implementation of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the technology of the present invention principle; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (14)

1, a kind of method of software trace is used for the tested software system is followed the tracks of, and is provided with a plurality of trace points in the described tested software system, it is characterized in that, comprises step:
(1) the static information configuration unique identification of following the tracks of for each trace point;
(2) the trace information filtercondition is set;
(3) gather each trace point information in the tested software system, obtain trace information, described trace information comprises static information unique identification and the multidate information that trace point traces into;
(4) according to described filtercondition trace information is filtered;
(5) according to the attribute of trace information the trace information after filtering is sorted out assembling;
(6) according to the static information of the static information unique identification index correspondence that comprises in the trace information of sorting out after the assembling;
(7) static information that indexes and the multidate information that traces into are resolved demonstration.
2, method of software trace according to claim 1 is characterized in that, described step (7) also comprises step afterwards:
(61) trace information that will sort out after assembling is stored.
3, method of software trace according to claim 2 is characterized in that, described step (61) also comprises step afterwards:
(62) inquire about the trace information of corresponding stored according to the querying condition of external world's input;
(63) trace information that inquires is resolved demonstration.
4, method of software trace according to claim 1 is characterized in that,
Also comprise the step that several trace information shunting conditions are set in the described step (2);
Described step (7) also comprises step afterwards:
(5A) trace information of sorting out after assembling is shunted processing according to different shunting conditions;
(5B) trace information that will shunt the different piece after handling is issued to the different browse unit of following the tracks of respectively and resolves demonstration.
5, method of software trace according to claim 4 is characterized in that, described step (5B) also comprises step afterwards:
(5B.1) differently follow the tracks of the trace information that browse unit obtain self respectively and store;
(5B.2) the different browse unit of following the tracks of are respectively according to the trace information of querying condition inquiry corresponding stored in the trace information of step (5B.1) storage or in the trace information of step (61) storage of external world's input; (5B.3) follow the tracks of browse unit the trace information that inquires is resolved demonstration.
6, method of software trace according to claim 1 is characterized in that, also comprises step between described step (4) and (5):
(41) trace information after will filtering carries out buffer memory;
(42) trace information that arrives according to subsequent acquisition filters once more to the trace information of buffer memory.
7, method of software trace according to claim 1 is characterized in that,
Attribute is a type of service described in the step (5); Or
The sign that is assigned to for each business processing in type of service and each type of service.
According to one of them described method of software trace of claim 1 to 7, it is characterized in that 8, described unique identification for the static information configuration is the binary digit sign.
9, a kind of software track system is used for the tested software system is followed the tracks of, and is provided with a plurality of trace points in the described tested software system, it is characterized in that, comprising:
The static information configuration uniquely identified unit that is used to each trace point to follow the tracks of;
The filtercondition storage unit is used to store the filtercondition that sets in advance;
Collecting unit is used for gathering each trace point information of tested software system, obtains trace information, and described trace information comprises static information unique identification and the multidate information that trace point traces into;
Filter element is connected with collecting unit with described filtercondition storage unit respectively, is used for according to the filtercondition of filtercondition cell stores the trace information that collecting unit collects being filtered;
Sort out module units, be connected, be used for attribute according to the trace information trace information after to filtration treatment and sort out assembling with described filter element;
Principal solution is analysed display unit, is connected with described classification module units, is used for the static information of the static information unique identification index correspondence that comprises according to the trace information of sorting out after the assembling; Static information that indexes and the multidate information that traces into are resolved demonstration.
10, software track according to claim 9 system is characterized in that, also comprises the trace information main memory unit, is connected with described classification module units, is used for the trace information of sorting out after the assembling is stored.
11, software track according to claim 10 system, it is characterized in that, also comprise main query unit, analysing display unit with described trace information main memory unit with principal solution respectively is connected, be used for analysing the corresponding trace information of the querying condition inquiry trace information main memory unit storage of display unit input, and the trace information that inquires is sent to principal solution analyse display unit and resolve demonstration according to principal solution.
12, software track according to claim 10 system is characterized in that, also comprises:
Shunting condition storage unit is used to store several trace information shunting conditions that set in advance;
Dividing cell is connected with the classification module units with described shunting condition storage unit respectively, is used for according to difference shunting condition the trace information of sorting out after assembling being shunted processing; With a plurality of
From resolving display unit, be connected with described dividing cell respectively, be used for receiving respectively the appropriate section trace information after shunting is handled and resolve demonstration.
13, software track according to claim 12 system is characterized in that, also comprises from resolving the display unit side at each:
Trace information is used for storing from the trace information of resolving the display unit reception described from storage unit;
From query unit, be connected from storage unit, trace information main memory unit with from resolving display unit with trace information respectively, be used for according to from the querying condition of resolving the display unit input to trace information from storage unit or the corresponding trace information of trace information main memory unit inquiry storage, and the trace information that inquires sent to from resolving display unit resolve demonstration.
14, software track according to claim 9 system, it is characterized in that, also comprise the cache filter unit, described filter element is connected with the classification module units by this cache filter unit, trace information after being used for the cache filter unit and filtering, and according to subsequent acquisition to trace information the trace information of buffer memory is filtered once more.
CNB2004100626810A 2004-08-06 2004-08-06 Method of software trace and system therefor Expired - Fee Related CN100353334C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2004100626810A CN100353334C (en) 2004-08-06 2004-08-06 Method of software trace and system therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2004100626810A CN100353334C (en) 2004-08-06 2004-08-06 Method of software trace and system therefor

Publications (2)

Publication Number Publication Date
CN1731366A CN1731366A (en) 2006-02-08
CN100353334C true CN100353334C (en) 2007-12-05

Family

ID=35963725

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2004100626810A Expired - Fee Related CN100353334C (en) 2004-08-06 2004-08-06 Method of software trace and system therefor

Country Status (1)

Country Link
CN (1) CN100353334C (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102486747B (en) * 2010-12-02 2015-06-03 中兴通讯股份有限公司 Statistical method for conventional functions of software system and engineering
CN104243191B (en) * 2013-06-13 2017-12-29 华为技术有限公司 Realize the method and system of message tracking
CN103399813B (en) * 2013-06-30 2016-05-11 惠州市德赛西威汽车电子股份有限公司 A kind of embedded system off-line trace analysis method based on Trace information
CN106844169B (en) * 2015-12-04 2019-11-29 大唐移动通信设备有限公司 A kind of information processing method and system
CN106528119A (en) * 2016-11-02 2017-03-22 北京神舟航天软件技术有限公司 Requirement tracing method based on research and development work product identification
CN107943646B (en) * 2017-11-08 2021-03-02 北京云杉世纪网络科技有限公司 Program monitoring method and device
CN109921981A (en) * 2019-01-31 2019-06-21 沈阳工程学院 A kind of information transmitting methods and system based on communication interface

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5748878A (en) * 1995-09-11 1998-05-05 Applied Microsystems, Inc. Method and apparatus for analyzing software executed in embedded systems
CN1286431A (en) * 1999-11-30 2001-03-07 深圳市中兴通讯股份有限公司 Embedded software aided debugging method
CN1287310A (en) * 1999-10-29 2001-03-14 深圳市中兴通讯股份有限公司 Software resource detecting method
EP1130518A1 (en) * 2000-01-31 2001-09-05 Applied Microsystems Corporation Software analysis system having an apparatus for selectively collecting analysis data from a target system executing software instrumented with tag statements and method for use thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5748878A (en) * 1995-09-11 1998-05-05 Applied Microsystems, Inc. Method and apparatus for analyzing software executed in embedded systems
CN1287310A (en) * 1999-10-29 2001-03-14 深圳市中兴通讯股份有限公司 Software resource detecting method
CN1286431A (en) * 1999-11-30 2001-03-07 深圳市中兴通讯股份有限公司 Embedded software aided debugging method
EP1130518A1 (en) * 2000-01-31 2001-09-05 Applied Microsystems Corporation Software analysis system having an apparatus for selectively collecting analysis data from a target system executing software instrumented with tag statements and method for use thereof

Also Published As

Publication number Publication date
CN1731366A (en) 2006-02-08

Similar Documents

Publication Publication Date Title
CN101118515B (en) Automatically testing method and apparatus for list
CN100589420C (en) Function operation packaging based automatization test script implementing method and apparatus
CN105068809A (en) PyQt-based platform for implementing automation project management and case execution
CN100353334C (en) Method of software trace and system therefor
CN106095678A (en) Automatization's result inspection method of data bank service operation under windows platform
CN102117436A (en) System and method for analyzing patient electronic receipt file
CN111460232A (en) Functional module searching method, device, terminal and computer readable storage medium
US7509334B2 (en) Methods, systems and computer program products for segmented presentation of service order status information
CN116049014A (en) AMBA bus verification platform generation method and device
CN113489593A (en) JSON message checking method and JSON message checking device
CN105893052A (en) War packet analyzer
CN112860899B (en) Label generation method and device, computer equipment and computer readable storage medium
CN108345658A (en) Algorithm calculates decomposing process, server and the storage medium of track
CN1459747A (en) Patent information excavating and analyzing system and method
CN108270040B (en) Battery module management method and system
CN111858236B (en) Knowledge graph monitoring method and device, computer equipment and storage medium
KR20220041600A (en) Method of evaluating quality of smart factory data
CN111475405A (en) Regression testing method and device, computer equipment and storage medium
CN1287427A (en) Analogue web element testing method based on message recording and playback
CN1735047A (en) Fault self-diagnosis method and device
CN114860693A (en) Intelligent terminal structured data management method
CN113255310A (en) Visual configuration method for inspection report in medical inspection LIMS (LiMS)
CN112068841A (en) Method and system for automatically generating project flow document
CN100514994C (en) Communication host computer testing system and method thereof
CN111126946A (en) Modeling method and device for data tracing of information system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20071205

Termination date: 20160806