CN111767249B - Method and device for determining self-running time of function - Google Patents

Method and device for determining self-running time of function Download PDF

Info

Publication number
CN111767249B
CN111767249B CN201910262630.9A CN201910262630A CN111767249B CN 111767249 B CN111767249 B CN 111767249B CN 201910262630 A CN201910262630 A CN 201910262630A CN 111767249 B CN111767249 B CN 111767249B
Authority
CN
China
Prior art keywords
function
record
log file
determining
call
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.)
Active
Application number
CN201910262630.9A
Other languages
Chinese (zh)
Other versions
CN111767249A (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.)
Shanghai Cambricon Information Technology Co Ltd
Original Assignee
Shanghai Cambricon Information Technology 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 Shanghai Cambricon Information Technology Co Ltd filed Critical Shanghai Cambricon Information Technology Co Ltd
Priority to CN201910262630.9A priority Critical patent/CN111767249B/en
Publication of CN111767249A publication Critical patent/CN111767249A/en
Application granted granted Critical
Publication of CN111767249B publication Critical patent/CN111767249B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Telephonic Communication Services (AREA)
  • Telephone Function (AREA)

Abstract

The present disclosure relates to a data processing method, apparatus, and related product, the product including a processor; a memory for storing processor-executable instructions; the processor is configured to execute the data processing method, and by the method, the time overhead and the memory overhead of determining the self-running time of the function can be reduced, and the efficiency of determining the self-running time of the function is improved.

Description

Method and device for determining self-running time of function
Technical Field
The present disclosure relates to the field of data processing, and in particular, to a method and an apparatus for determining a running time of a function.
Background
The program operation needs to have a corresponding operation time, the operation time of the program is determined by the operation time of the functions in the program, and the operation time of each function is composed of the operation time of the function and the operation time of the called function.
The user needs to know the self-running time of a certain function sometimes, and the self-running time of the function is usually calculated in a traversal mode in the related art. In this process, each record of the log file of the program is usually traversed, and the time corresponding to the entry record and the exit record of the function recorded in the program log and the time corresponding to the entry record and the exit record of the function called by the function (the record between the entry record and the exit record of the function) are obtained and additionally reserved. The method for calculating the self running time of the function brings larger time expenditure and memory expenditure.
Disclosure of Invention
In view of this, the present disclosure provides a method and an apparatus for determining a running time of a function itself.
According to an aspect of the present disclosure, there is provided a method of determining a runtime of a function itself, including:
creating an index file according to a log file of a program, wherein the index file comprises record position identifiers recorded correspondingly to each function in the log file of the program and call relations among the functions, and the records are used for recording information of function call executed by the program;
according to the recording position identification and the calling relation, determining a first function and a recording position identification of a corresponding record of a sub-function of the first function in the log file from the index file;
acquiring a first function and a record corresponding to the sub-function of the first function from the log file according to the record position identification of the first function and the record corresponding to the sub-function of the first function in the log file;
and determining the self running time of the first function according to the first function and the corresponding records of the sub-functions of the first function.
In a possible implementation manner, determining, from the index file, a record position identifier of a corresponding record of a first function and a sub-function of the first function in the log file according to the record position identifier and the call relationship includes:
determining a first record position identification of a first record of a first function in the log file;
and determining a second record position identifier of a second record of a second function in the log file according to the call relation, wherein the second function is a sub-call of the first function.
In a possible implementation manner, the determining the self-running time of the first function according to the first function and the corresponding record of the sub-function of the first function includes:
determining the self-running time of the first function according to the time information recorded in the first record of the first function in the log file and the time information recorded in the second record of the second function,
and the first record of the first function is a record corresponding to the first record position identifier in the log file, and the second record of the second function is a record corresponding to the second record position identifier in the log file.
In a possible implementation manner, in the index file, the record corresponding to each function includes an entry record and an exit record of each function, the entry record is used for recording information that the program executes to enter the function call, the exit record is used for recording information that the program executes to exit the function call, and the position sequence numbers of the records in the log file sequentially change according to the sequence of the record generation.
In a possible implementation manner, in the index file, the recorded position sequence number corresponds to an index number, the index number corresponding to the recorded position sequence number corresponds to the recorded outgoing position sequence number, and the index number corresponding to the recorded outgoing position sequence number corresponds to the recorded incoming position sequence number where the parent call of the function in the outgoing record is located.
In a possible implementation manner, the determining, from the index file, the record location identifier of the corresponding record of the first function and the sub-function of the first function in the log file according to the record location identifier and the call relationship includes:
determining a position sequence number corresponding to the entry record of the first function in the index file as a first entry record position sequence number of the entry record of the first function in the log file;
determining an index number corresponding to a position sequence number corresponding to an entry record of the first function in an index file, wherein the index number is a first exit record position sequence number of an exit record of the first function in the log file;
when an index number consistent with the first recording position sequence number exists, determining that the position sequence number corresponding to the index number is a second recording position sequence number of the second function recorded in the log file, wherein the second function is a sub-call of the first function;
and determining a position sequence number corresponding to the index number consistent with the second recording position sequence number in the index file, and the position sequence number is the second recording position sequence number of the recording of the second function in the log file.
In a possible implementation manner, the determining the self-running time of the first function according to the first function and the record of the sub-function of the first function in the log file includes:
determining the running time corresponding to the first function according to the first incoming call time recorded in the record corresponding to the first incoming record position serial number of the log file and the first outgoing call time recorded in the record corresponding to the first outgoing record position serial number;
determining the running time corresponding to the second function according to the second incoming call time recorded in the record corresponding to the second incoming record position serial number of the log file and the second outgoing call time recorded in the record corresponding to the second outgoing record position serial number;
and determining the self-running time of the first function according to the running time corresponding to the first function and the running time corresponding to the second function.
According to another aspect of the present disclosure, there is provided an apparatus for determining a runtime of a function itself, including:
the creating module is used for creating an index file according to the log file of the program, wherein the index file comprises record position identifiers of records corresponding to all functions in the log file of the program and call relations among all the functions, and the records are used for recording information of the program for executing function call;
a first determining module, configured to determine, from the index file, a first function and a record position identifier of a corresponding record of a sub-function of the first function in the log file according to the record position identifier and the call relationship;
the acquisition module is used for acquiring a first function and a record corresponding to the sub-function of the first function from the log file according to the record position identification of the first function and the record corresponding to the sub-function of the first function in the log file;
and the second determining module is used for determining the self-running time of the first function according to the first function and the corresponding records of the sub-functions of the first function.
In a possible implementation manner, the first determining module is further configured to:
determining a first record position identification of a first record of a first function in the log file;
and determining a second record position identifier of a second record of a second function in the log file according to the call relation, wherein the second function is a sub-call of the first function.
In a possible implementation manner, the second determining module is configured to:
determining the self-running time of the first function according to the time information recorded in the first record of the first function and the time information recorded in the second record of the second function in the log file,
and the first record of the first function is a record corresponding to the first record position identifier in the log file, and the second record of the second function is a record corresponding to the second record position identifier in the log file.
In a possible implementation manner, in the index file, the record corresponding to each function includes an entry record and an exit record of each function, the entry record is used for recording information that the program executes to enter the function call, the exit record is used for recording information that the program executes to exit the function call, and the position sequence numbers of the records in the log file sequentially change according to the sequence of the record generation.
In a possible implementation manner, in the index file, the recorded position sequence number corresponds to an index number, the index number corresponding to the recorded position sequence number corresponds to the recorded outgoing position sequence number, and the index number corresponding to the recorded outgoing position sequence number corresponds to the recorded incoming position sequence number where the parent call of the function in the outgoing record is located.
In a possible implementation manner, the first determining module is further configured to:
determining a position sequence number corresponding to the entry record of the first function in the index file as a first entry record position sequence number of the entry record of the first function in the log file;
determining an index number corresponding to a position sequence number corresponding to an entry record of the first function in an index file, wherein the index number is a first exit record position sequence number of an exit record of the first function in the log file;
when an index number consistent with the first entry record position sequence number exists, determining that the position sequence number corresponding to the index number is a second exit record position sequence number of a second function, recorded in the log file, and the second function is a sub-call of the first function;
and determining a position sequence number corresponding to the index number consistent with the second recording position sequence number in the index file, and the position sequence number is the second recording position sequence number of the recording of the second function in the log file.
In a possible implementation manner, the second determining module is further configured to:
determining the running time corresponding to the first function according to the first incoming call time recorded in the record corresponding to the first incoming record position serial number of the log file and the first outgoing call time recorded in the record corresponding to the first outgoing record position serial number;
determining the running time corresponding to the second function according to the second incoming call time recorded in the record corresponding to the second incoming record position serial number of the log file and the second outgoing call time recorded in the record corresponding to the second outgoing record position serial number;
and determining the self-running time of the first function according to the running time corresponding to the first function and the running time corresponding to the second function.
According to another aspect of the present disclosure, there is provided an electronic device including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to perform the above method.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having computer program instructions stored thereon, wherein the computer program instructions, when executed by a processor, implement the above-described method.
In this way, the index file created according to the log file includes the record position identifiers of the corresponding records of each function in the log file of the program and the call relations among the functions, so that the record position identifiers of the corresponding records of the first function and the subfunction of the first function in the log file can be obtained from the index file, the corresponding records of the first function and the subfunction of the first function can be further obtained from the log file according to the record position identifiers, and the self-running time of the first function can be determined according to the time information recorded in the corresponding records of the first function and the subfunction of the first function. Therefore, according to the method and the device for determining the self-running time of the function provided by the embodiment of the disclosure, compared with the related technology in which the complete log file is traversed to obtain and record each record of each function, the method and the device can quickly locate the record positions of the first function and the corresponding record of the sub-function of the first function in the log file according to the record position identification, and further directly obtain the corresponding record of the first function and the sub-function of the first function from the log file, so that the time overhead and the memory overhead can be reduced, and the efficiency of determining the self-running time of the function can be improved.
Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.
FIG. 1 illustrates a flow diagram of a method of determining the runtime of a function itself, according to one embodiment of the present disclosure;
FIG. 2 illustrates a flow diagram of a method of determining the runtime of a function itself, according to one embodiment of the present disclosure;
FIG. 3 illustrates a flow diagram of a method of determining the runtime of a function itself, according to one embodiment of the present disclosure;
FIG. 4 is a block diagram of an apparatus for determining a runtime of a function itself according to an embodiment of the present disclosure;
FIG. 5 is a block diagram illustrating an apparatus 800 for determining the runtime of a function itself, according to an example embodiment;
fig. 6 is a block diagram illustrating an apparatus 1900 for determining a runtime of a function itself according to an example embodiment.
Detailed Description
Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. In the drawings, like reference numbers indicate functionally identical or similar elements. While the various aspects of the embodiments are presented in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
Furthermore, in the following detailed description, numerous specific details are set forth in order to provide a better understanding of the present disclosure. It will be understood by those skilled in the art that the present disclosure may be practiced without some of these specific details. In some instances, methods, means, elements and circuits that are well known to those skilled in the art have not been described in detail so as not to obscure the present disclosure.
Example 1
Fig. 1 is a flowchart illustrating a method for determining a running time of a function itself according to an embodiment of the present disclosure, which may be applied to a terminal device and a server. As shown in fig. 1, the method may include:
step 101, creating an index file according to a log file of a program, wherein the index file comprises record position identifiers recorded correspondingly to each function in the log file of the program and call relations among the functions, and the records are used for recording information for executing function call of the program.
For example, the index file may be a file generated according to an entry and exit sequence of records corresponding to each function in a log file corresponding to a program, where record types in the log file may include an entry record and an exit record, the entry record may be used to record information that the program executes an entry function call, the exit record may be used to record information that the program executes an exit function call, the entry record may be used to record a time (also referred to as an entry call time) of the entry function call, and the exit record may be used to record a time (also referred to as an exit call time) of the exit function call.
For example, a log file of a program may be obtained, and an index file may be generated according to a recording position recorded by each function in the log file, where the index file may include a recording position identifier recorded by each function in the log file of the program and a call relationship between each function, and the recording position identifier may be used to identify a recording position recorded by the function in the log file. For example, the record position of the record (in-record and out-record) corresponding to each function in the log file may be identified by a position sequence number, or the record position of the record corresponding to each function in the log file may be identified by a byte number. The record position identifier in the embodiment of the present disclosure is not specifically limited, and may be identification information that can be used to identify the record position of the record (entry record and exit record) corresponding to each function in the log file.
For example: taking the example of identifying the recording position of the record (entry record and exit record) corresponding to each function in the log file by the position sequence number, assuming that the function a calls the function b and the function b calls the function c, the position sequence number corresponding to the entry record and the exit record of each function in the log file may be: entry for function a: 1. entry of function b: 2. logging of function c: 3. output record of function c: 4. output of function b records: 5. output record of function a: 6. the index file can record a function a: (corresponding record position identification (entry record: 1, exit record: 6), call relation: function b), function b: (corresponding record location identification (entry record: 2, exit record: 5), call relation: function c), function c: (corresponding record position identification (record in: 3, record out: 4) and call relation: none).
102, determining a first function and a recording position identifier of a corresponding record of a sub-function of the first function in the log file from the index file according to the recording position identifier and the calling relation;
for example, the record location identification of the first function and the sub-function called by the first function in the log file may be determined from the index file, such as: the method includes the steps of obtaining a first recording position identification corresponding to a first recording position of a first record of a first function in a log file from an index file, obtaining a calling relation of the first function from the index file, determining a second recording position identification corresponding to a second recording position of a second record of a sub-function called by the first function in the log file when the sub-function called by the first function exists, and determining that the second recording position identification of the sub-function called by the first function is empty when the sub-function called by the first function does not exist.
The first record may be a corresponding record of the first function in a log file corresponding to the program, and may include an entry record and an exit record of the first function, and the record location identifier corresponding to a record location (i.e., a first record location) of the first record of the first function in the log file corresponding to the program may be acquired from the index file, and the record location identifier may include a record location identifier corresponding to the entry record in the log file and a record location identifier corresponding to the exit record in the log file. Similarly, the second record is a corresponding record of the sub-function called by the first function in the log file corresponding to the program, and includes an entry record and an exit record of the sub-function called by the first function.
Step 103, acquiring the first function and the corresponding record of the sub-function of the first function from the log file according to the record position identifier of the corresponding record of the first function and the sub-function of the first function in the log file.
For example, after obtaining a first record position identifier of a first record of the first function and a second record position identifier of a second record of the sub-function of the first function, the first record of the first function may be obtained from a first record position identified by the first record position identifier in a log file corresponding to the program, and the second record of the sub-function of the first function may be obtained from a second record position identified by the second record position identifier in the log file corresponding to the program. For example: and acquiring the entry record of the first function from the log file according to the position sequence number corresponding to the entry record of the first function, and acquiring the exit record of the first function from the log file according to the position sequence number corresponding to the exit record of the first function.
And 104, determining the self running time of the first function according to the corresponding records of the first function and the subfunction of the first function.
For example, the running time of the first function may be determined according to the time information recorded in the first record of the first function, and for example, the running time of the first function may be determined according to the time information recorded in the outgoing record and the time information recorded in the incoming record of the first function. For example: the difference between the time information recorded in the outgoing record and the time information recorded in the incoming record of the first function may be determined as the running time of the first function. Similarly, the run time of the sub-function of the first function may be determined from the time information recorded in the second record of the sub-function of the first function.
The self-running time of the first function can be determined according to the running time of the first function and the running time of the second function. For example: determining the self running time of the first function as the difference value of the running time of the first function and the running time of the called sub-function. When the first function does not call any function, the running time of the first function is the self running time of the first function.
In this way, the index file created according to the log file includes the record position identifiers of the records corresponding to the functions in the log file of the program and the call relations among the functions, so that the record position identifiers of the first function and the sub-functions of the first function, which are recorded in the log file, can be obtained from the index file, the corresponding records of the first function and the sub-functions of the first function are obtained from the log file according to the record position identifiers, and the self-running time of the first function is determined according to the time information recorded in the corresponding records of the first function and the sub-functions of the first function. Therefore, according to the method for determining the self-running time of the function provided by the embodiment of the disclosure, compared with the method for obtaining and recording each record of each function by traversing a complete log file in the related art, the method can quickly locate the record positions of the first function and the corresponding record of the sub-function of the first function in the log file according to the record position identification, and further directly obtain the corresponding record of the first function and the sub-function of the first function from the log file, so that the time overhead and the memory overhead can be reduced, and the efficiency for determining the self-running time of the function can be improved.
FIG. 2 illustrates a flow diagram of a method of determining the runtime of a function itself, according to one embodiment of the present disclosure.
In a possible implementation manner, in step 102, determining, from the index file, a record location identifier of a corresponding record of the first function and the sub-function of the first function in the log file according to the record location identifier and the call relationship may include:
step 1021, determining a first record position identifier of a first record of a first function in the log file;
and 1022, determining a second record position identifier of a second record of a second function in the log file according to the call relation, wherein the second function is a sub-call of the first function.
For example, a first record location identification corresponding to a first record location of a first record of a first function in a log file may be determined from an index file, such as: and determining a recording position identifier corresponding to the recording position of the input record of the first function in the log file from the index file, and determining a recording position identifier corresponding to the recording position of the output record of the first function in the log file.
The call relation of a first function may be determined from the index file, where the first function calls a second function (for example, the entry and record location identifier of the first function in the index file corresponds to the entry and record location identifier of the first function, and the entry and record location identifier of the second function may correspond to the entry and record location identifier of the first function). The second record is a related record of the second function in a log file corresponding to the program, and may include an entry record and an exit record of the second function. A second record position identifier corresponding to a second record position of a second record of the second function in the log file corresponding to the program may be obtained from the index file), and the record position identifier may include a record position identifier corresponding to an incoming record of the second function and a record position identifier corresponding to an outgoing record of the second function.
In a possible implementation manner, the determining, in step 104, the self-running time of the first function according to the corresponding records of the first function and the sub-function of the first function may include:
determining the self-running time of the first function according to the time information recorded in the first record of the first function and the time information recorded in the second record of the second function in the log file,
the first record of the first function is a record corresponding to the first record position in the log file, and the second record of the second function is a record corresponding to the second record position in the log file.
For example, after determining a first record position identifier of a first record of a first function and a second record position identifier of a second record of a second function, a first record of the first function may be obtained from a first record position corresponding to the first record position identifier in a log file corresponding to the program, and a second record of the second function may be obtained from a second record position corresponding to the second record position identifier in the log file. For example: the method comprises the steps of obtaining an entry record of a first function from a log file according to a record position identification corresponding to the entry record of the first function, obtaining an exit record of the first function from the log file according to a record position identification corresponding to the exit record of the first function, obtaining an entry record of a second function from the log file according to a record position identification corresponding to the entry record of the second function, and obtaining an exit record of the second function from the log file according to a record position identification corresponding to the exit record of the second function.
For example, the running time of the second function may be determined according to the time information recorded in the outgoing record and the time information recorded in the incoming record of the second function. For example: the difference between the time information recorded in the outgoing record and the time information recorded in the incoming record of the second function may be determined as the running time of the second function.
After determining the runtime of the second function, since the second function is a sub-call of the first function, the self runtime of the first function may be a difference between the runtime of the first function and the runtime of the second function.
For example, the running time of the first function may be determined according to the time information recorded in the outgoing record and the time information recorded in the incoming record of the first function. For example: the difference between the time information recorded in the outgoing record and the time information recorded in the incoming record of the first function may be determined as the running time of the first function. The difference between the running time of the first function and the running time of the second function can be determined as the self running time of the first function.
When the first function does not call the second function, that is, the second function is empty, the running time of the second function may be determined to be 0, that is, the running time of the first function itself may be determined to be the running time of the first function.
In a possible implementation manner, in the index file, the record corresponding to each function includes an entry record and an exit record of each function, the entry record is used for recording information that the program executes to enter the function call, the exit record is used for recording information that the program executes to exit the function call, and the position sequence numbers of the records in the log file sequentially change according to the sequence of the record generation.
In a possible implementation manner, in the index file, the recorded position sequence number corresponds to an index number, the index number corresponding to the recorded position sequence number corresponds to the recorded outgoing position sequence number, and the index number corresponding to the recorded outgoing position sequence number corresponds to the recorded incoming position sequence number where the parent call of the function in the outgoing record is located.
For example, the record type in the log file may include an entry record and an exit record, the entry record may be used to record information that the program executes the entry function call, the exit record may be used to record information that the program executes the exit function call, and the position sequence numbers of the records in the log file may sequentially change according to the sequence of the generation of the records (for example, the position sequence numbers of the records in the log file sequentially increase or decrease according to the sequence of the generation of the records). The location of the record in the log file may be identified based on the location number of the record.
The index file can be generated according to the log file, in the index file, the position serial number of each record can correspond to one index number, the index number corresponding to the position serial number of the incoming record corresponds to the position serial number of the outgoing record of the incoming record, that is, the index number corresponding to the position serial number of each incoming record can be the same as the position serial number of the outgoing record corresponding to the incoming record; the index number corresponding to the position sequence number of the outgoing record corresponds to the position sequence number of the incoming record where the parent call of the function in the outgoing record is located, that is, the index number corresponding to the position sequence number of each outgoing record can be the same as the position sequence number of the incoming record where the parent call of the function in the outgoing record is located. For example, if a program includes a function a, a function b, and a function c, and the function a call calls the function b call and the function c call, respectively, then the log file of the program may be, for example, as shown in table 1:
TABLE 1
Position number Record categories Recorded content
0 Go to record Program execution enter function a call
1 Enter record Program execution enter function b call
2 Go out of record Program execution exit function b call
3 Go to record Program execution enter function c call
4 Go out of record Program execution exit function c call
5 Go out of record Program execution exit function a call
The index file of the log file of the program may be, for example, as shown in table 2:
TABLE 2
Position number Index number
0 5
1 2
2 0
3 4
4 0
5 -1
The index number of a function without a parent call can be set to a special character, for example: in table 2, since the function a call has no parent call, the index number corresponding to the position sequence number of the record where the function a call is located may be set to "-1" to indicate that the function a call has no parent call.
FIG. 3 illustrates a flow diagram of a method of determining the runtime of a function itself, according to one embodiment of the present disclosure.
In a possible implementation manner, referring to fig. 3, in the step 102, determining, from the index file, the record location identifier of the corresponding record of the first function and the sub-function of the first function in the log file according to the record location identifier and the call relationship, may include:
and 1023, determining the position sequence number corresponding to the entry record of the first function in the index file as the first entry record position sequence number of the entry record of the first function in the log file.
Step 1024, determining an index number corresponding to the position sequence number corresponding to the entry record of the first function in the index file, and determining the index number as the first exit record position sequence number of the exit record of the first function in the log file.
Still taking the above example as an example, assuming that the first function is function a, and the location sequence number corresponding to the incoming record of function a is 0, it may be determined that the first incoming record location sequence number corresponding to the incoming record of function a in the log file is 0. If the index number corresponding to the position sequence number 0 is 5, the first record output position sequence number corresponding to the record output of the function a in the log file is 5.
And 1025, when an index number consistent with the first recording position sequence number exists, determining that the position sequence number corresponding to the index number is a second recording position sequence number of the second function recorded in the log file, wherein the second function is a sub-call of the first function.
And step 1026, determining a position sequence number corresponding to the index number in the index file, which is consistent with the second recording position sequence number, as a second recording position sequence number of the recording of the second function in the log file.
For example, the index number corresponding to the position sequence number of the outgoing record in the index file is the same as the position sequence number of the incoming record where the parent call of the function call in the outgoing record is located. That is, when there is an index number that is consistent with the location sequence number of the entry of the first function, it may be determined that the first function calls as a parent of another function, that is, there is a second function that calls with the first function as a parent.
When it is determined that there is an index number that is consistent with the location number of the entry record of the first function, since the index number corresponding to the location number of the exit record in the index file is the same as the location number of the entry record where the parent call of the function call in the exit record is located, it can be determined that the location number corresponding to the index number is the second exit record location number of the exit record of the second function that calls the first function as the parent, and thus the location number corresponding to the index number that is consistent with the second exit record location number is the second entry record location number of the entry record of the second function.
Still taking the above example as an example, if the position sequence number corresponding to the entry of the function a is 0, and there is a position sequence number corresponding to the index number 0 (the first entry position sequence number of the entry of the function a), and the position sequence numbers are 2 and 4, then it can be determined that there is a sub-call with the function a: and the position serial number 2 is a second recording position serial number of the recording of the second function (function b), and the position serial number 1 corresponding to the index number consistent with the position serial number 2 is a second recording position serial number of the second function (function b). The position number 4 is a second out-recording position number of the out-recording of the second function (function c), and the position number 3 corresponding to the index number that is consistent with the position number 4 is a second in-recording position number of the second function (function c).
In a possible implementation manner, the determining, in step 104, the self-running time of the first function according to the first function and the record of the sub-function of the first function in the log file may include:
determining the running time corresponding to the first function according to the first incoming call time recorded in the record corresponding to the first incoming record position serial number of the log file and the first outgoing call time recorded in the record corresponding to the first outgoing record position serial number;
determining the running time corresponding to the second function according to the second incoming call time recorded in the record corresponding to the second incoming record position serial number of the log file and the second outgoing call time recorded in the record corresponding to the second outgoing record position serial number;
and determining the self-running time of the first function according to the running time corresponding to the first function and the running time corresponding to the second function.
For example, a difference between a first outgoing call time recorded in an outgoing record of a first function and a first incoming call time recorded in an incoming record of the first function may be determined as a running time corresponding to the first function, and since there is a second function called by taking the first function as a parent, the running time corresponding to the first function includes a running time of the first function itself and a running time of the second function.
After determining a second exit record position sequence number corresponding to an exit record corresponding to the second function and a second entry record position sequence number corresponding to an entry record corresponding to the second function, the exit record and the entry record of the second function may be obtained from the log file according to the second exit record position sequence number and the second entry record position sequence number, and a difference between a second exit call time recorded in the exit record of the second function and a second entry call time recorded in the entry record of the second function is determined as an operation time of the second function.
The difference between the running time of the first function and the running time of the second function can be determined as the self running time of the first function.
In a possible implementation manner, the determining, in step 104, the self-running time of the first function according to the first function and the record of the sub-function of the first function in the log file may include:
when no index number consistent with the position sequence number corresponding to the entry record of the first function exists in the index file, determining that the first function does not call any function;
and determining the running time corresponding to the first function as the self running time of the first function.
For example, the index number corresponding to the position sequence number of the outgoing record in the index file is the same as the position sequence number of the incoming record where the parent call of the function call in the outgoing record is located. That is, when there is no index number that is consistent with the location sequence number of the entry record of the first function, it may be determined that the first function is not called as a parent of another function, that is, the first function does not call any function.
Still taking the above example as an example, assuming that the first function is the function b, and the location number corresponding to the entry record of the function b is 1, it may be determined that the first entry record location number of the entry record of the function b in the log file is 1. If the index number corresponding to the position sequence number 1 is 2, it can be determined that the first record output position sequence number corresponding to the record output of the function b is 2. If there is no position sequence number corresponding to the index number 1 (the first entry position sequence number of the entry record of the function b) in the index file, the function b does not call any function.
For example, when the first function does not call any function, the runtime of the first function is the runtime of the first function itself. The entry record of the first function can be obtained from the log file according to the first entry position sequence number of the first function, the exit record of the first function can be obtained from the log file according to the first exit position sequence number of the first function, the difference value between the first exit call time recorded in the record and the first entry call time recorded in the entry record is determined, the difference value is the running time of the first function, and the running time of the first function is determined to be the running time of the first function.
Therefore, the embodiment provided by the disclosure can obtain the first record position identifier of the first record of the first function and the second record position identifier of the second record of the sub-function of the first function by querying the index file, so as to quickly locate the first record position of the first record of the first function in the log file and the second record position of the second record of the sub-function of the first function in the log file, and further directly obtain the first record and the second record from the log file, so that the time overhead and the memory overhead can be reduced, and the efficiency of determining the self-running time of the function can be improved.
Fig. 4 is a block diagram illustrating a structure of an apparatus for determining a runtime of a function itself according to an embodiment of the present disclosure, and as shown in fig. 4, the apparatus may include:
the creating module 401 may be configured to create an index file according to a log file of a program, where the index file includes record position identifiers recorded in the log file of the program, where the record is used to record information for the program to execute function call, and call relationships between the functions;
a first determining module 402, configured to determine, from the index file, a first function and a record position identifier of a corresponding record of a sub-function of the first function in the log file according to the record position identifier and the call relationship;
an obtaining module 403, configured to obtain, from the log file, a first function and a record corresponding to a sub-function of the first function according to a record position identifier of the first function and the record corresponding to the sub-function of the first function in the log file;
the second determining module 404 may be configured to determine a self-running time of the first function according to the corresponding records of the first function and the sub-functions of the first function.
In this way, the index file created according to the log file includes the record position identifiers of the records corresponding to the functions in the log file of the program and the call relations among the functions, so that the record position identifiers of the first function and the sub-functions of the first function, which are recorded in the log file, can be obtained from the index file, the corresponding records of the first function and the sub-functions of the first function are obtained from the log file according to the record position identifiers, and the self-running time of the first function is determined according to the time information recorded in the corresponding records of the first function and the sub-functions of the first function. Therefore, according to the device for determining the self-running time of the function provided by the embodiment of the disclosure, compared with the method for obtaining and recording each record of each function by traversing a complete log file in the related art, the device can quickly locate the record positions of the first function and the corresponding record of the sub-function of the first function in the log file according to the record position identification, and further directly obtain the corresponding record of the first function and the sub-function of the first function from the log file, so that the time overhead and the memory overhead can be reduced, and the self-running time efficiency of the function can be improved.
In a possible implementation manner, the first determining module may be further configured to:
determining a first record position identification of a first record of a first function in the log file;
and determining a second record position identifier of a second record of a second function in the log file according to the call relation, wherein the second function is a sub-call of the first function.
In a possible implementation manner, the second determining module may be further configured to:
determining the self-running time of the first function according to the time information recorded in the first record of the first function in the log file and the time information recorded in the second record of the second function,
the first record of the first function is a record corresponding to the first record position identifier in the log file, and the second record of the second function is a record corresponding to the second record position identifier in the log file.
In a possible implementation manner, in the index file, the record corresponding to each function includes an entry record and an exit record of each function, the entry record is used for recording information that the program executes to enter the function call, the exit record is used for recording information that the program executes to exit the function call, and the position sequence numbers of the records in the log file sequentially change according to the sequence of the record generation.
In a possible implementation manner, in the index file, the recorded position sequence number corresponds to an index number, the index number corresponding to the recorded position sequence number corresponds to the recorded outgoing position sequence number, and the index number corresponding to the recorded outgoing position sequence number corresponds to the recorded incoming position sequence number where the parent call of the function in the outgoing record is located.
In a possible implementation manner, the first determining module may be further configured to:
determining a position sequence number corresponding to the entry record of the first function in the index file as a first entry record position sequence number of the entry record of the first function in the log file;
determining an index number corresponding to a position sequence number corresponding to an entry record of the first function in an index file, wherein the index number is a first exit record position sequence number of an exit record of the first function in the log file;
when an index number consistent with the first recording position sequence number exists, determining that the position sequence number corresponding to the index number is a second recording position sequence number of a second function, recorded in the log file, and the second function is a sub-call of the first function;
and determining a position sequence number corresponding to the index number consistent with the second recording position sequence number in the index file, and the position sequence number is the second recording position sequence number of the recording of the second function in the log file.
In a possible implementation manner, the second determining module is further configured to:
determining the running time corresponding to the first function according to the first incoming call time recorded in the record corresponding to the first incoming record position serial number of the log file and the first outgoing call time recorded in the record corresponding to the first outgoing record position serial number;
determining the running time corresponding to the second function according to the second incoming call time recorded in the record corresponding to the second incoming record position serial number of the log file and the second outgoing call time recorded in the record corresponding to the second outgoing record position serial number;
and determining the self-running time of the first function according to the running time corresponding to the first function and the running time corresponding to the second function.
FIG. 5 is a block diagram illustrating an apparatus 800 for determining the runtime of a function itself, according to an example embodiment. For example, the apparatus 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 5, the apparatus 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the apparatus 800. Examples of such data include instructions for any application or method operating on device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
A power supply component 806 provides power to the various components of the device 800. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 800.
The multimedia component 808 includes a screen that provides an output interface between the device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 800 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the apparatus 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the device 800. For example, the sensor assembly 814 may detect the open/closed status of the device 800, the relative positioning of components, such as a display and keypad of the device 800, the sensor assembly 814 may also detect a change in the position of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration/deceleration of the device 800, and a change in the temperature of the device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communications between the apparatus 800 and other devices in a wired or wireless manner. The device 800 may access a wireless network based on a communication standard, such as WiFi,2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium, such as the memory 804, is also provided that includes computer program instructions executable by the processor 820 of the device 800 to perform the above-described methods.
Fig. 6 is a block diagram illustrating an apparatus 1900 for determining a runtime of a function itself, according to an example embodiment. For example, the apparatus 1900 may be provided as a server. Referring to FIG. 6, the device 1900 includes a processing component 1922 further including one or more processors and memory resources, represented by memory 1932, for storing instructions, e.g., applications, executable by the processing component 1922. The application programs stored in memory 1932 may include one or more modules that each correspond to a set of instructions. Further, the processing component 1922 is configured to execute instructions to perform the above-described method.
The device 1900 may also include a power component 1926 configured to perform power management of the device 1900, a wired or wireless network interface 1950 configured to connect the device 1900 to a network, and an input/output (I/O) interface 1958. The device 1900 may operate based on an operating system stored in memory 1932, such as Windows Server, mac OS XTM, unixTM, linuxTM, freeBSDTM, or the like.
In an exemplary embodiment, a non-transitory computer readable storage medium, such as the memory 1932, is also provided that includes computer program instructions executable by the processing component 1922 of the apparatus 1900 to perform the above-described methods.
The present disclosure may be systems, methods, and/or computer program products. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied thereon for causing a processor to implement various aspects of the present disclosure.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as a punch card or an in-groove protruding structure with instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
The computer program instructions for carrying out operations of the present disclosure may be assembler instructions, instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, the electronic circuitry that can execute the computer-readable program instructions implements aspects of the present disclosure by utilizing the state information of the computer-readable program instructions to personalize the electronic circuitry, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA).
Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terms used herein were chosen in order to best explain the principles of the embodiments, the practical application, or technical improvements to the techniques in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (8)

1. A method for determining a runtime of a function itself, comprising:
creating an index file according to a log file of a program, wherein the index file comprises record position identifiers of records corresponding to functions in the log file of the program and call relations among the functions, and the records are used for recording information of function call executed by the program;
according to the recording position identification and the calling relation, determining a first function and a recording position identification of a corresponding record of a sub-function of the first function in the log file from the index file;
acquiring a first function and a record corresponding to a subfunction of the first function from a log file according to a record position identifier of the corresponding record of the first function and the subfunction of the first function in the log file;
determining the self-running time of the first function according to the first function and the corresponding records of the subfunctions of the first function;
determining the self-running time of the first function according to the first function and the corresponding records of the sub-functions of the first function, wherein the determining comprises the following steps:
determining the self-running time of the first function according to the time information recorded in the first record of the first function and the time information recorded in the second record of the second function in the log file,
a first record of the first function is a record corresponding to the first record position identifier in the log file, and a second record of the second function is a record corresponding to the second record position identifier in the log file;
in the index file, the records corresponding to the functions include an entry record and an exit record of the functions, the entry record is used for recording information of the program for executing the entry function call, the exit record is used for recording information of the program for executing the exit function call, and the position sequence numbers of the records in the log file are sequentially changed according to the sequence of the record generation.
2. The method of claim 1, wherein determining, from the index file, the record location identifier of the corresponding record in the log file of the first function and the sub-function of the first function according to the record location identifier and the call relation comprises:
determining a first record position identification of a first record of a first function in the log file;
and determining a second record position identifier of a second record of the second function in the log file according to the call relation, wherein the second function is a sub-call of the first function.
3. The method according to claim 1, wherein in the index file, the position sequence number of the record corresponds to an index number, the position sequence number of the entry record corresponds to an index number of the exit record, and the position sequence number of the exit record corresponds to a position sequence number of the entry record where a parent call of a function in the exit record is located.
4. The method according to claim 3, wherein the determining, from the index file, the record location identifier of the corresponding record of the first function and the sub-function of the first function in the log file according to the record location identifier and the call relation comprises:
determining a position sequence number corresponding to the entry record of the first function in the index file as a first entry record position sequence number of the entry record of the first function in the log file;
determining an index number corresponding to a position sequence number corresponding to an entry record of the first function in an index file, wherein the index number is a first exit record position sequence number of an exit record of the first function in the log file;
when an index number consistent with the first entry record position sequence number exists, determining that the position sequence number corresponding to the index number is a second exit record position sequence number of a second function, recorded in the log file, and the second function is a sub-call of the first function;
and determining a position sequence number corresponding to the index number consistent with the second recording position sequence number in the index file, and the position sequence number is the second recording position sequence number of the recording of the second function in the log file.
5. The method of claim 4, wherein determining the self-run time of the first function according to the first function and the record of the sub-function of the first function in the log file comprises:
determining the running time corresponding to the first function according to the first incoming call time recorded in the record corresponding to the first incoming record position serial number of the log file and the first outgoing call time recorded in the record corresponding to the first outgoing record position serial number;
determining the running time corresponding to the second function according to the second incoming call time recorded in the record corresponding to the second incoming record position serial number of the log file and the second outgoing call time recorded in the record corresponding to the second outgoing record position serial number;
and determining the self-running time of the first function according to the running time corresponding to the first function and the running time corresponding to the second function.
6. An apparatus for determining a runtime of a function itself, comprising:
the creating module is used for creating an index file according to the log file of the program, wherein the index file comprises record position identifiers of records corresponding to all functions in the log file of the program and call relations among all the functions, and the records are used for recording information of the program for executing function call;
a first determining module, configured to determine, from the index file, a first function and a record position identifier of a corresponding record of a sub-function of the first function in the log file according to the record position identifier and the call relationship;
the acquisition module is used for acquiring a first function and a record corresponding to the sub-function of the first function from the log file according to the record position identification of the first function and the record corresponding to the sub-function of the first function in the log file;
the second determining module is used for determining the self running time of the first function according to the first function and the corresponding records of the sub-functions of the first function;
the second determining module is configured to:
determining the self-running time of the first function according to the time information recorded in the first record of the first function and the time information recorded in the second record of the second function in the log file,
a first record of the first function is a record corresponding to the first record position identifier in the log file, and a second record of the second function is a record corresponding to the second record position identifier in the log file;
in the index file, the records corresponding to the functions include an entry record and an exit record of the functions, the entry record is used for recording information of the program for executing the entry function call, the exit record is used for recording information of the program for executing the exit function call, and the position sequence numbers of the records in the log file are sequentially changed according to the sequence of the record generation.
7. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to: performing the method of any one of claims 1 to 5.
8. A computer readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the method of any one of claims 1 to 5.
CN201910262630.9A 2019-04-02 2019-04-02 Method and device for determining self-running time of function Active CN111767249B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910262630.9A CN111767249B (en) 2019-04-02 2019-04-02 Method and device for determining self-running time of function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910262630.9A CN111767249B (en) 2019-04-02 2019-04-02 Method and device for determining self-running time of function

Publications (2)

Publication Number Publication Date
CN111767249A CN111767249A (en) 2020-10-13
CN111767249B true CN111767249B (en) 2022-11-04

Family

ID=72718544

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910262630.9A Active CN111767249B (en) 2019-04-02 2019-04-02 Method and device for determining self-running time of function

Country Status (1)

Country Link
CN (1) CN111767249B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1635470A (en) * 2003-12-30 2005-07-06 佳能株式会社 Operation log acquiring method, program and storage medium
CN109032929A (en) * 2018-06-29 2018-12-18 北京金山安全软件有限公司 Program log record obtaining method and device and electronic equipment
CN109522209A (en) * 2018-09-29 2019-03-26 中国平安人寿保险股份有限公司 Log stack information analysis method and device, computer installation and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7661094B2 (en) * 2005-05-10 2010-02-09 Alcatel-Lucent Usa Inc. Real-time software diagnostic tracing

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1635470A (en) * 2003-12-30 2005-07-06 佳能株式会社 Operation log acquiring method, program and storage medium
CN109032929A (en) * 2018-06-29 2018-12-18 北京金山安全软件有限公司 Program log record obtaining method and device and electronic equipment
CN109522209A (en) * 2018-09-29 2019-03-26 中国平安人寿保险股份有限公司 Log stack information analysis method and device, computer installation and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于堆栈回溯的异常处理;朱剑锋等;《计算机工程与设计》;20141216(第12期);全文 *

Also Published As

Publication number Publication date
CN111767249A (en) 2020-10-13

Similar Documents

Publication Publication Date Title
CN108093315B (en) Video generation method and device
JP7315796B2 (en) Circuit principle diagram check method, device and system
CN108495168B (en) Bullet screen information display method and device
CN106919629B (en) Method and device for realizing information screening in group chat
EP3147802B1 (en) Method and apparatus for processing information
CN108174269B (en) Visual audio playing method and device
CN106991018B (en) Interface skin changing method and device
CN105183571A (en) Function calling method and device
CN110234030A (en) The display methods and device of barrage information
CN112463418A (en) Cross-device information sharing method, device, medium and electronic device
CN111767006B (en) Data processing method and device
CN109992754B (en) Document processing method and device
CN110955800A (en) Video retrieval method and device
EP3190555A1 (en) Method for operating a display device and display
CN111694571B (en) Compiling method and device
CN110213062B (en) Method and device for processing message
CN110121115B (en) Method and device for determining wonderful video clip
CN105824513A (en) Message processing method and apparatus
CN111767249B (en) Method and device for determining self-running time of function
CN110858921A (en) Program video processing method and device
CN108549570B (en) User interface updating method and device
CN110493298B (en) Information synchronization method and device
CN107145441B (en) Page display method and device
CN111221512A (en) Function module mixing method, electronic device, and storage medium
EP3211868B1 (en) Method and device for processing information

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
GR01 Patent grant
GR01 Patent grant