CN113127001A - Code compiling process monitoring method, device, equipment and medium - Google Patents

Code compiling process monitoring method, device, equipment and medium Download PDF

Info

Publication number
CN113127001A
CN113127001A CN202110467285.XA CN202110467285A CN113127001A CN 113127001 A CN113127001 A CN 113127001A CN 202110467285 A CN202110467285 A CN 202110467285A CN 113127001 A CN113127001 A CN 113127001A
Authority
CN
China
Prior art keywords
code
compiling
time length
upper limit
base
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.)
Granted
Application number
CN202110467285.XA
Other languages
Chinese (zh)
Other versions
CN113127001B (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 Miha Youliyue Technology Co ltd
Original Assignee
Shanghai Miha Youliyue 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 Miha Youliyue Technology Co ltd filed Critical Shanghai Miha Youliyue Technology Co ltd
Priority to CN202110467285.XA priority Critical patent/CN113127001B/en
Publication of CN113127001A publication Critical patent/CN113127001A/en
Application granted granted Critical
Publication of CN113127001B publication Critical patent/CN113127001B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention discloses a method, a device, equipment and a medium for monitoring a code compiling process. The method comprises the following steps: determining the code compiling upper limit time length corresponding to the code base to which the current compiled code belongs according to the code base identifier to which the current compiled code belongs; counting the accumulated compiling time length of compiling the codes in the code base to which the current compiling codes belong; and when the accumulated compiling time length is greater than the code compiling upper limit time length, stopping compiling and sending out a compiling overtime early warning. Through the technical scheme of the embodiment of the invention, the problem that the whole time consumption for completing the final resource packaging process is too long due to the fact that errors occur in the application resource packaging process and the errors cannot be found in time in the prior art is solved, and errors and overtime caused by code compiling are avoided.

Description

Code compiling process monitoring method, device, equipment and medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a method, a device, equipment and a medium for monitoring a code compiling process.
Background
In the development process of the application program, when the application program installation package is packaged and constructed, a code compiling process is started, and the compiling time is longer and longer along with more and more application program codes consumed by the process.
In the current code compiling process, too long packing time caused by compiling errors and code expansion in a large number of code compiling processes, or too large code base to generate subsequent installation packages can cause that the whole construction of the application program installation package is slowed down, or the whole installation package body packing can not be completed.
Disclosure of Invention
The embodiment of the invention provides a method, a device, equipment and a medium for monitoring a code compiling process, which are used for effectively controlling and managing the code compiling process and avoiding errors and overtime caused by code compiling.
In a first aspect, an embodiment of the present invention provides a method for monitoring a code compilation process, where the method includes:
determining the code compiling upper limit time length corresponding to the code base to which the current compiled code belongs according to the code base identifier to which the current compiled code belongs;
counting the accumulated compiling time length of compiling the codes in the code base to which the current compiling codes belong;
and when the accumulated compiling time length is greater than the code compiling upper limit time length, stopping compiling and sending out a compiling overtime early warning.
Optionally, when the accumulated compiling time length is greater than the code compiling upper limit time length, stopping compiling and sending out a compiling timeout warning, including:
inquiring whether the accumulated compiling time length is greater than the code compiling upper limit time length or not according to a preset time interval;
and when the accumulated compiling time length is greater than the code compiling upper limit time length, stopping compiling and sending out a compiling overtime early warning.
Optionally, after the compile time-out warning is issued, the method further includes:
and generating a compiling overtime alarm log, wherein the log comprises a code base corresponding to the compiling overtime code and a compiling overtime time point.
Optionally, before determining the code compiling upper limit time corresponding to the code library to which the current compiled code belongs, the method further includes:
when the code is compiled, starting a code compiling timer; correspondingly, after determining the code compiling upper limit time length corresponding to the code base to which the current compiled code belongs, the method further includes:
and taking the code compiling upper limit time as the timing time of the code compiling timer.
Optionally, the type of the code library to which the current compiled code belongs includes: the system comprises a bottom layer code file library, an application logic code library, an editor bottom layer file code library, an editor tool code library and a self-defined third party code and plug-in code library.
Optionally, the upper limit time length for code compiling corresponding to each code library is determined according to the bottom code file library, the application logic code library, the editor bottom file code library, the editor tool code library, the customized third party code and the code file volume in the plug-in code library.
Optionally, when the accumulated compiling time length is less than or equal to the code compiling upper limit time length, the method further includes:
continuously compiling codes in the code base of which the codes are not compiled according to the compiling sequence of the code base;
and when the codes in all the code libraries are compiled, finishing the construction of the application program installation package.
In a second aspect, an embodiment of the present invention further provides a device for monitoring a code compiling process, where the device includes:
the compiling upper limit time determining module is used for determining the code compiling upper limit time length corresponding to the code base to which the current compiling code belongs according to the code base identifier to which the current compiling code belongs;
the compiling time counting module is used for counting the accumulated compiling time length for compiling the codes in the code base to which the current compiling codes belong;
and the compiling overtime early warning module is used for stopping compiling and sending out compiling overtime early warning when the accumulated compiling time length is greater than the code compiling upper limit length.
Optionally, the compile timeout warning module is specifically configured to:
inquiring whether the accumulated compiling time length is greater than the code compiling upper limit time length or not according to a preset time interval;
and when the accumulated compiling time length is greater than the code compiling upper limit time length, stopping compiling and sending out a compiling overtime early warning.
Optionally, the compile time-out early warning module is further configured to:
and after the compiling overtime early warning is sent out, generating a compiling overtime alarm log, wherein the log comprises a code base corresponding to a compiling overtime code and a compiling overtime time point.
Optionally, the compiling upper limit time determining module is further configured to start a code compiling timer when the code is compiled;
and after determining the code compiling upper limit time length corresponding to the code base to which the current compiling code belongs, taking the code compiling upper limit time length as the timing time length of the code compiling timer.
Optionally, the type of the code library to which the current compiled code belongs includes: the system comprises a bottom layer code file library, an application logic code library, an editor bottom layer file code library, an editor tool code library and a self-defined third party code and plug-in code library.
Optionally, the code compiling process monitoring device further includes a code compiling upper limit time length determining module, which is configured to determine code compiling upper limit time lengths corresponding to the code libraries according to the bottom layer code file library, the application logic code library, the editor bottom layer file code library, the editor tool code library, the customized third party code and the code file volumes in the plug-in code library.
Optionally, the compile upper limit time determination module is further configured to: and when the accumulated compiling time length is less than or equal to the code compiling upper limit time length, acquiring a starting code of a code base to which the current compiling code belongs in a next code base in a preset code base compiling sequence as a new current compiling code.
And the compiling overtime early warning module is also used for finishing the construction of the application program installation package after the codes in all the code libraries are compiled. In a third aspect, an embodiment of the present invention further provides a computer device, where the computer device includes:
one or more processors;
a memory for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the code compilation process monitoring method provided by any embodiment of the invention.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the code compiling process monitoring method according to any embodiment of the present invention.
The embodiment of the invention has the following advantages or beneficial effects:
according to the embodiment of the invention, when code compiling is started, according to the code base identifier of the current compiled code, the code compiling upper limit time length corresponding to the code base of the current compiled code is determined; the method comprises the steps of counting accumulated compiling time length of compiling codes in a code base to which the current compiling codes belong, monitoring the code compiling process according to the granularity level of the code base, stopping compiling and sending out compiling overtime early warning when the accumulated compiling time length is larger than the code compiling upper limit time length, solving the problems that errors occur in the application resource packing process in the prior art, the errors cannot be found in time, the whole time consumption for completing the final resource packing process is too long, effectively controlling and managing the code compiling process can be achieved, and errors and overtime caused by code compiling are avoided.
Drawings
Fig. 1 is a flowchart of a method for monitoring a code compiling process according to an embodiment of the invention;
fig. 2 is a flowchart of a method for monitoring a code compiling process according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a code compiling process monitoring apparatus according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a computer device according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a method for monitoring a code compiling process according to an embodiment of the present invention, which is applicable to monitoring a packaging and compiling process of an application installation package. The method can be executed by a code compiling process monitoring device, and the device can be realized by software and/or hardware and is integrated in computer equipment with an application development function, such as an intelligent mobile terminal, a computer, a server and the like.
As shown in fig. 1, the code compilation process monitoring method includes the following steps:
s110, according to the code base identification of the current compiled code, determining the code compiling upper limit time length corresponding to the code base of the current compiled code.
Specifically, in this embodiment, all codes to be compiled are distinguished according to the granularity level of the code base, and the code base may be classified according to the code function category or in other manners. For example, the types of code libraries may include an underlying code file library, an application logic code library, an editor underlying file code library, an editor tool code library, and a custom third party code and plug-in code library.
When the compiling is started, the corresponding codes can be read according to the compiling sequence of the preset code library file for compiling. For example, the underlying code file library is compiled first, and the currently compiled code may be the start code or any line of code in the underlying code file library that is being compiled. Further, the code base to which the current compiled code belongs may be determined according to a code base identifier carried by the current compiled code itself or a code base identifier in the acquisition path, so as to acquire a code compiling upper limit duration corresponding to the code base to which the current compiled code belongs, as the time upper limit monitored in the compiling process of the code base.
In a possible implementation manner, the upper limit time length of code compiling may also be set according to the size of the code file volume in the code library to which the current compiled code belongs. Specifically, when reading a code file in a code library for compiling, it can be known that the volume size of the code file is greater than or equal to 30M, and the corresponding upper limit time for code compiling can be set to 3 minutes. If the volume size of the code file is less than 20M, the corresponding code compiling upper limit time length can be set to be 2 minutes. The corresponding relation between the volume size of the code file and the upper limit time length of code compiling can be confirmed and set according to the code compiling historical data of the computer equipment.
And S120, counting the accumulated compiling time length of compiling the codes in the code base to which the current compiling codes belong.
In this embodiment, after the code compilation is started, a timer function is started to time the code compilation in the same code base, so as to obtain the duration of the code compilation in the code base of the currently compiled code.
And S130, stopping compiling and sending out a compiling overtime early warning when the accumulated compiling time length is greater than the code compiling upper limit length.
Generally speaking, the time of the upper limit of the compiling time of the code is longer than the time of the normal compiling completion of all the codes in the code library, so that the compiling completion of all the codes can be ensured under the condition that no compiling error or code expansion or other errors exist in the time of the upper limit of the compiling of the code. If the compiling is not finished when the upper limit time of the code compiling is reached, the problem of the compiling process is shown, the compiling needs to be stopped, and the compiling overtime early warning is sent out to prompt the user to intervene, otherwise, the whole process of the code compiling and the packaging of the application program installation package is influenced in an indefinite waiting mode.
In a preferred real-time mode, after the compiling is stopped and the compiling timeout early warning is given, a compiling timeout alarm log is generated, wherein the log comprises a code base corresponding to a compiling timeout code and a compiling timeout time point, so that a compiling abnormal event is recorded.
According to the technical scheme of the embodiment, when code compiling is started, according to the code base identifier to which the current compiled code belongs, the code compiling upper limit time length corresponding to the code base to which the current compiled code belongs is determined; the method comprises the steps of counting accumulated compiling time length of compiling codes in a code base to which the current compiling codes belong, monitoring the code compiling process according to the granularity level of the code base, stopping compiling and sending out compiling overtime early warning when the accumulated compiling time length is larger than the code compiling upper limit time length, solving the problems that errors occur in the application resource packing process in the prior art, the errors cannot be found in time, the whole time consumption for completing the final resource packing process is too long, effectively controlling and managing the code compiling process can be achieved, and errors and overtime caused by code compiling are avoided.
Example two
Fig. 2 is a flowchart of a method for monitoring a code compiling process according to a second embodiment of the present invention, which belongs to the same inventive concept as the first embodiment, and further illustrates a process of monitoring a code compiling process based on the first embodiment. Explanations of the same or corresponding terms as those in the above embodiments are omitted here.
Referring to fig. 2, the code compiling process monitoring method provided in this embodiment includes the following steps:
s210, when the code is compiled, starting a code compiling timer.
In order to count the time length of code compilation, at the beginning of code compilation, a pre-programmed timer function code, such as codecomposetimer class, is called to monitor the time of the code compilation process. The CodeCompileTimer class can realize the function of detecting whether the timing round is time or not.
S220, according to the code base identification of the current compiled code, determining the code compiling upper limit time length corresponding to the code base of the current compiled code.
Further, a timing duration needs to be set for the timer. In this embodiment, the corresponding code compiling upper limit time length is set according to the code text volume of each code library. For example, when compiling the code of the game installation package, the code libraries are classified according to types and are divided into a CSharp-first pass which is a C # bottom code file library, a CSharp which is a game logic code library, an Editor-first pass which is an Editor bottom file code library, an Editor which is an Editor tool code library, and an other which is a self-defined three-party and plug-in code library. The code compilation upper limit time of each code library is 3 minutes for CSharp-first pass, 3 minutes for CSharp, 1 minute for Editor-first pass, 1 minute for Editor, and 5 minutes for other, respectively.
And S230, taking the code compiling upper limit time as the timing time of the code compiling timer.
The upper limit time length of code compiling of each code base is used as the timing time length of the timer, so that all codes can be compiled within the timing time length under the condition that errors such as compiling errors or code expansion do not exist.
S240, inquiring whether the accumulated compiling time length reaches the timing time length or not according to a preset time interval.
And S250, when the accumulated compiling time length reaches the time length, stopping compiling and sending out a compiling overtime early warning.
When the timing duration of the timer is over and the compiling is not completed, it is indicated that a problem occurs in the compiling process, the compiling needs to be terminated, and a compiling overtime early warning is sent to prompt a user to intervene, otherwise, the compiling of the code and the packaging of the application program installation package are influenced in an indefinite waiting manner.
On the other hand, when the codes in the code base corresponding to the timing duration have completed compiling of all the codes in the code base within the timing duration of the timer, it indicates that the code compiling process of the code base is completed smoothly, and continues to compile the codes in the code base of which the codes are not compiled according to the preset code base compiling sequence. And monitoring the code compiling process of the code base for subsequent code compiling according to the steps until the code compiling in all the code bases is completed so as to complete the construction of the application program installation package.
According to the technical scheme of the embodiment of the invention, when code compiling is started, a code compiling timer is started, and the timing duration of the timer is determined according to the code base identifier to which the current compiled code belongs; the method comprises the steps of counting accumulated compiling time length of compiling codes in a code base to which the current compiling codes belong, monitoring the code compiling process according to the granularity level of the code base, stopping compiling and sending out compiling overtime early warning when the accumulated compiling time length is equal to the time length of a timer, solving the problems that errors occur in the application resource packaging process in the prior art, the errors cannot be found in time, the whole time consumption of the process of completing final resource packaging is too long, effectively controlling and managing the code compiling process can be achieved, and errors and overtime caused by code compiling are avoided.
The following is an embodiment of the code compilation process monitoring device provided in the embodiments of the present invention, and the device and the code compilation process monitoring method in the embodiments described above belong to the same inventive concept, and can implement the code compilation process monitoring method in the embodiments described above. For details which are not described in detail in the embodiments of the code compilation process monitoring device, reference may be made to the embodiments of the code compilation process monitoring method described above.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a code compilation process monitoring apparatus according to a third embodiment of the present invention, which is applicable to monitoring a packaging and compiling process of an application installation package.
As shown in fig. 3, the code compiling process monitoring apparatus specifically includes a target wallpaper determining module 310, a transition wallpaper determining module 320, and a wallpaper display module 330.
The compiling upper limit time determining module 310 is configured to determine, according to the code library identifier to which the current compiled code belongs, a code compiling upper limit time length corresponding to the code library to which the current compiled code belongs; a compiling time counting module 320, configured to count an accumulated compiling time period for compiling the code in the code base to which the current compiled code belongs; and the compiling timeout early warning module 330 is configured to stop compiling and send out a compiling timeout early warning when the accumulated compiling time is longer than the code compiling upper limit.
According to the technical scheme of the embodiment, when code compiling is started, according to the code base identifier to which the current compiled code belongs, the code compiling upper limit time length corresponding to the code base to which the current compiled code belongs is determined; the method comprises the steps of counting accumulated compiling time length of compiling codes in a code base to which the current compiling codes belong, monitoring the code compiling process according to the granularity level of the code base, stopping compiling and sending out compiling overtime early warning when the accumulated compiling time length is larger than the code compiling upper limit time length, solving the problems that errors occur in the application resource packing process in the prior art, the errors cannot be found in time, the whole time consumption for completing the final resource packing process is too long, effectively controlling and managing the code compiling process can be achieved, and errors and overtime caused by code compiling are avoided.
Optionally, the compile time-out early warning module 330 is specifically configured to:
inquiring whether the accumulated compiling time length is greater than the code compiling upper limit time length or not according to a preset time interval;
and when the accumulated compiling time length is greater than the code compiling upper limit time length, stopping compiling and sending out a compiling overtime early warning.
Optionally, the compile time-out warning module 330 is further configured to:
and after the compiling overtime early warning is sent out, generating a compiling overtime alarm log, wherein the log comprises a code base corresponding to a compiling overtime code and a compiling overtime time point.
Optionally, the compiling upper limit time determining module 310 is further configured to start a code compiling timer when the code is compiled;
and after determining the code compiling upper limit time length corresponding to the code base to which the current compiling code belongs, taking the code compiling upper limit time length as the timing time length of the code compiling timer.
Optionally, the type of the code library to which the current compiled code belongs includes: the system comprises a bottom layer code file library, an application logic code library, an editor bottom layer file code library, an editor tool code library and a self-defined third party code and plug-in code library.
Optionally, the code compiling process monitoring device further includes a code compiling upper limit time length determining module, which is configured to determine code compiling upper limit time lengths corresponding to the code libraries according to the bottom layer code file library, the application logic code library, the editor bottom layer file code library, the editor tool code library, the customized third party code and the code file volumes in the plug-in code library.
Optionally, the compile time upper limit determination module 310 is further configured to: and when the accumulated compiling time length is less than or equal to the code compiling upper limit time length, acquiring a starting code of a code base to which the current compiling code belongs in a next code base in a preset code base compiling sequence as a new current compiling code.
And the compiling timeout early warning module 330 is further configured to complete the construction of the application program installation package after the codes in all the code libraries are compiled.
The code compiling process monitoring device provided by the embodiment of the invention can execute the code compiling process monitoring method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
Example four
Fig. 4 is a schematic structural diagram of a computer device according to a fourth embodiment of the present invention. FIG. 4 illustrates a block diagram of an exemplary computer device 12 suitable for use in implementing embodiments of the present invention. The computer device 12 shown in FIG. 4 is only one example and should not bring any limitations to the functionality or scope of use of embodiments of the present invention. The computer device in the embodiment of the present invention may be a smart phone, a tablet Personal Computer (PC), a server cluster device, or another computer device with an arithmetic capability.
As shown in FIG. 4, computer device 12 is in the form of a general purpose computing device. The components of computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Computer device 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by computer device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)30 and/or cache memory 32. Computer device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, and commonly referred to as a "hard drive"). Although not shown in FIG. 4, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. System memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
Computer device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with computer device 12, and/or with any devices (e.g., network card, modem, etc.) that enable computer device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, computer device 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via network adapter 20. As shown, network adapter 20 communicates with the other modules of computer device 12 via bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with computer device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes various functional applications and data processing by executing programs stored in the system memory 28, for example, implementing steps of a code compilation process monitoring method provided by the embodiment of the present invention, the method including:
determining the code compiling upper limit time length corresponding to the code base to which the current compiled code belongs according to the code base identifier to which the current compiled code belongs;
counting the accumulated compiling time length of compiling the codes in the code base to which the current compiling codes belong;
and when the accumulated compiling time length is greater than the code compiling upper limit time length, stopping compiling and sending out a compiling overtime early warning.
Of course, those skilled in the art can understand that the processor can also implement the technical solution of the code compiling process monitoring method provided by any embodiment of the invention.
EXAMPLE five
This embodiment provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a method for monitoring a code compiling process according to any embodiment of the present invention, where the method includes:
determining the code compiling upper limit time length corresponding to the code base to which the current compiled code belongs according to the code base identifier to which the current compiled code belongs;
counting the accumulated compiling time length of compiling the codes in the code base to which the current compiling codes belong;
and when the accumulated compiling time length is greater than the code compiling upper limit time length, stopping compiling and sending out a compiling overtime early warning.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer-readable storage medium may be, for example but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, 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), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code 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).
It will be understood by those skilled in the art that the modules or steps of the invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of computing devices, and optionally they may be implemented by program code executable by a computing device, such that it may be stored in a memory device and executed by a computing device, or it may be separately fabricated into various integrated circuit modules, or it may be fabricated by fabricating a plurality of modules or steps thereof into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method for monitoring a code compilation process, comprising:
determining the code compiling upper limit time length corresponding to the code base to which the current compiled code belongs according to the code base identifier to which the current compiled code belongs;
counting the accumulated compiling time length of compiling the codes in the code base to which the current compiling codes belong;
and when the accumulated compiling time length is greater than the code compiling upper limit time length, stopping compiling and sending out a compiling overtime early warning.
2. The method of claim 1, wherein stopping compilation and issuing a compilation timeout warning when the accumulated compilation time duration is greater than the code compilation upper limit duration comprises:
inquiring whether the accumulated compiling time length is greater than the code compiling upper limit time length or not according to a preset time interval;
and when the accumulated compiling time length is greater than the code compiling upper limit time length, stopping compiling and sending out a compiling overtime early warning.
3. The method of claim 1, wherein after issuing a compile time out warning, the method further comprises:
and generating a compiling overtime alarm log, wherein the log comprises a code base corresponding to the compiling overtime code and a compiling overtime time point.
4. The method of claim 1, wherein before determining the code compilation upper limit time corresponding to the code library to which the current compiled code belongs, the method further comprises:
when the code is compiled, starting a code compiling timer; correspondingly, after determining the code compiling upper limit time length corresponding to the code base to which the current compiled code belongs, the method further includes:
and taking the code compiling upper limit time as the timing time of the code compiling timer.
5. The method of any of claims 1-4, wherein the type of codebase to which the current compiled code belongs comprises: the system comprises a bottom layer code file library, an application logic code library, an editor bottom layer file code library, an editor tool code library and a self-defined third party code and plug-in code library.
6. The method of claim 5, further comprising: and determining the upper limit time length of code compiling corresponding to each code base according to the bottom code file base, the application logic code base, the editor bottom file code base, the editor tool code base, the self-defined third party code and the code file volume in the plug-in code base.
7. The method of any of claims 1-4, wherein when the cumulative compile time duration is less than or equal to the code compile upper time duration, the method further comprises:
continuously compiling codes in the code base of which the codes are not compiled according to a preset code base compiling sequence;
and when the codes in all the code libraries are compiled, finishing the construction of the application program installation package.
8. A code compilation process monitoring apparatus, comprising:
the compiling upper limit time determining module is used for determining the code compiling upper limit time length corresponding to the code base to which the current compiling code belongs according to the code base identifier to which the current compiling code belongs;
the compiling time counting module is used for counting the accumulated compiling time length for compiling the codes in the code base to which the current compiling codes belong;
and the compiling overtime early warning module is used for stopping compiling and sending out compiling overtime early warning when the accumulated compiling time length is greater than the code compiling upper limit length.
9. A computer device, characterized in that the computer device comprises:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the code compilation process monitoring method of any of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a method for monitoring a compilation process of a code according to any one of claims 1 to 7.
CN202110467285.XA 2021-04-28 2021-04-28 Method, device, equipment and medium for monitoring code compiling process Active CN113127001B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110467285.XA CN113127001B (en) 2021-04-28 2021-04-28 Method, device, equipment and medium for monitoring code compiling process

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110467285.XA CN113127001B (en) 2021-04-28 2021-04-28 Method, device, equipment and medium for monitoring code compiling process

Publications (2)

Publication Number Publication Date
CN113127001A true CN113127001A (en) 2021-07-16
CN113127001B CN113127001B (en) 2024-03-08

Family

ID=76780739

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110467285.XA Active CN113127001B (en) 2021-04-28 2021-04-28 Method, device, equipment and medium for monitoring code compiling process

Country Status (1)

Country Link
CN (1) CN113127001B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020108107A1 (en) * 1998-11-16 2002-08-08 Insignia Solutions, Plc Hash table dispatch mechanism for interface methods
US20150032446A1 (en) * 2012-03-23 2015-01-29 Dolby Laboratories Licensing Corporation Method and system for signal transmission control
CN106406973A (en) * 2016-11-17 2017-02-15 杭州华恩教育科技有限公司 System and method for dynamically compiling and running external code
CN111209005A (en) * 2020-01-06 2020-05-29 腾讯科技(深圳)有限公司 Method and apparatus for compiling program file, and computer-readable storage medium
CN111857730A (en) * 2020-07-24 2020-10-30 苏州浪潮智能科技有限公司 Method and equipment for compiling operating system
CN112328259A (en) * 2020-11-26 2021-02-05 北京五八信息技术有限公司 Compiling time length processing method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020108107A1 (en) * 1998-11-16 2002-08-08 Insignia Solutions, Plc Hash table dispatch mechanism for interface methods
US20150032446A1 (en) * 2012-03-23 2015-01-29 Dolby Laboratories Licensing Corporation Method and system for signal transmission control
CN106406973A (en) * 2016-11-17 2017-02-15 杭州华恩教育科技有限公司 System and method for dynamically compiling and running external code
CN111209005A (en) * 2020-01-06 2020-05-29 腾讯科技(深圳)有限公司 Method and apparatus for compiling program file, and computer-readable storage medium
CN111857730A (en) * 2020-07-24 2020-10-30 苏州浪潮智能科技有限公司 Method and equipment for compiling operating system
CN112328259A (en) * 2020-11-26 2021-02-05 北京五八信息技术有限公司 Compiling time length processing method and device

Also Published As

Publication number Publication date
CN113127001B (en) 2024-03-08

Similar Documents

Publication Publication Date Title
CN108958729B (en) Data processing method, device and storage medium
EP2763055B1 (en) A telecommunication method and mobile telecommunication device for providing data to a mobile application
CN113127050B (en) Application resource packaging process monitoring method, device, equipment and medium
CN114168222B (en) Method and device for acquiring time consumption during starting, terminal equipment and storage medium
WO2017049893A1 (en) Application program testing method, testing apparatus, and mobile terminal
CN112667405B (en) Information processing method, device, equipment and storage medium
CN109144741A (en) The method, apparatus and electronic equipment of interprocess communication
CN109597653A (en) Method, BIOS and the BMC of BIOS and BMC command interaction
CN113658351B (en) Method and device for producing product, electronic equipment and storage medium
CN117033146B (en) Identification method, device, equipment and medium for appointed consensus contract execution process
CN113190427A (en) Caton monitoring method and device, electronic equipment and storage medium
CN109284193A (en) A kind of distributed data processing method and server based on multithreading
CN113127001B (en) Method, device, equipment and medium for monitoring code compiling process
CN115656788B (en) Chip testing system, method, equipment and storage medium
CN112463574A (en) Software testing method, device, system, equipment and storage medium
CN115756322A (en) Data storage method and device, electronic equipment and storage medium
CN113127002B (en) Method, device, equipment and medium for monitoring code compiling process
CN113138793B (en) Application resource packaging process monitoring method, device, equipment and medium
CN108197029A (en) A kind of method and apparatus for obtaining progress information
CN112673354B (en) System state detection method, system state device and terminal equipment
CN112434013A (en) Data table migration method and device, electronic equipment and storage medium
CN113127051B (en) Application resource packaging process monitoring method, device, equipment and medium
CN112506592A (en) Method, device, equipment and storage medium for determining page loading duration
CN115629678B (en) Touch information processing method, device, equipment and storage medium
CN112579215B (en) Scheduling function generation method and device

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