CN117891723A - Code checking method, computing device and storage medium - Google Patents

Code checking method, computing device and storage medium Download PDF

Info

Publication number
CN117891723A
CN117891723A CN202311779433.7A CN202311779433A CN117891723A CN 117891723 A CN117891723 A CN 117891723A CN 202311779433 A CN202311779433 A CN 202311779433A CN 117891723 A CN117891723 A CN 117891723A
Authority
CN
China
Prior art keywords
application
code
executing
executed
application method
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311779433.7A
Other languages
Chinese (zh)
Inventor
韩天伟
刘文泽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tianjin Chezhijia Software Co ltd
Original Assignee
Tianjin Chezhijia Software 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 Tianjin Chezhijia Software Co ltd filed Critical Tianjin Chezhijia Software Co ltd
Priority to CN202311779433.7A priority Critical patent/CN117891723A/en
Publication of CN117891723A publication Critical patent/CN117891723A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The present invention relates to the field of application development, and in particular, to a code checking method, a computing device, and a storage medium, where the method includes: generating an inspection code including an inspection method; when each application method in the application file is executed, acquiring an application method code and an inspection code according to a class loader, and generating a first executable file which needs to be executed when the application method is called; executing a checking method when executing the first executable file, and acquiring method information of an application method; storing the acquired method information in a time sequence database according to the execution time of executing the application method; executing the called application method after the checking method is executed; and responding to the code execution condition query request, and querying the execution times of the application method in a preset time period in a time sequence database. The invention realizes the inspection of the application by executing the inspection method in the inspection code when executing each application method so as to judge whether the method is executed and the times of execution.

Description

Code checking method, computing device and storage medium
Technical Field
The present invention relates to the field of application development, and in particular, to a code checking method, a computing device, and a storage medium.
Background
In the current application development process, code quantity is accumulated continuously for each iteration development after project establishment, and as business requirements change, old business function codes are left in the project, so that useless codes in the project are increased. Thus requiring modification of the application code.
In the prior art, many useless code developers are not afraid of easy deletion because some code without references may be called in the reflection process. Since the method is generally referred to, the unreferenced code module needs to be deleted step by step from the source code of the call, which is time-consuming, and the situation of reflecting the call also exists to cause misdeletion.
For this reason, a new code checking method is required.
Disclosure of Invention
To this end, the present invention provides a code checking method in an effort to solve or at least alleviate the above-presented problems.
According to one aspect of the present invention, there is provided a code inspection method adapted to run in a computing device, generating inspection code comprising an inspection method adapted to obtain method information of an executed application method; when each application method in the application file is executed, acquiring an application method code and an inspection code according to a class loader, and generating a first executable file which needs to be executed when the application method is called; executing a checking method when executing the first executable file, and acquiring method information of an application method; storing the acquired method information in a time sequence database according to the execution time of executing the application method; executing the called application method after the checking method is executed; and responding to the code execution condition query request, and querying the execution times of the application method in a preset time period in a time sequence database.
Optionally, in the method according to the present invention, the code execution case query request includes one or more application methods to be queried, the method further comprising: after inquiring the execution times of one or more application methods in a preset time period, determining the application methods which are not executed in the preset time period as useless methods; the method code of the useless method is deleted from the application file.
Optionally, in the method according to the present invention, further comprising: determining the execution times of each application method in each time division within a preset time period; and taking the time period of which the execution times are larger than a preset calling threshold value in the time period as the peak time period of the application method to be called.
Optionally, in the method according to the present invention, executing the checking method when executing the first executable file, and acquiring method information of the application method includes: determining class names and method names of called application methods; generating method information according to the class names and the method names.
Optionally, in the method according to the present invention, storing the acquired method information in the time-series database according to the execution time of executing the application method includes: and storing the execution time of the application method in a storage queue according to the storage queue of the application method which is preset in the time sequence database.
Optionally, in the method according to the present invention, querying the time sequence database for the execution times of the application method in a preset time period includes: determining one or more execution times stored in a preset time period in a storage queue of the application method; and determining the execution times of the application method according to one or more execution times stored in a preset time period.
Optionally, in the method according to the present invention, when executing each application method in the application file, acquiring the application method code and the check code according to the class loader, generating the executable file to be executed when calling the application method includes: when executing the sub-method of the application method, acquiring the sub-method code and the check code of the application method according to the class loader, and generating a second executable file which needs to be executed when calling the sub-method; executing a checking method when executing the second executable file, and acquiring method information of the sub-method; storing the acquired sub-method information in a time sequence database according to the execution time of executing the sub-method; after the checking method is executed, the called sub-method is executed.
Optionally, in the method according to the invention, the timing database comprises an InfluxDB database.
According to another aspect of the present invention, there is provided a computing device comprising: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising instructions for performing the code checking method according to the present invention.
According to yet another aspect of the present invention, there is provided a computer readable storage medium storing one or more programs, the one or more programs comprising instructions, which when executed by a computing device, cause the computing device to perform a code checking method according to the present invention.
The code checking method of the present invention is suitable for being executed in a computing device, and comprises the following steps: generating an inspection code comprising an inspection method adapted to obtain method information of the executed application method; when each application method in the application file is executed, acquiring an application method code and an inspection code according to a class loader, and generating a first executable file which needs to be executed when the application method is called; executing a checking method when executing the first executable file, and acquiring method information of an application method; storing the acquired method information in a time sequence database according to the execution time of executing the application method; after the inspection method is executed, executing the called application method; and responding to the code execution condition query request, and querying the execution times of the application method in a preset time period in a time sequence database. The invention sets the checking code, when executing each application method, executes the checking method in the checking code, obtains the method information of the executed application and stores the method information in the time sequence database, realizes the checking of the application, and judges whether the method is executed or not and the executing times.
Drawings
To the accomplishment of the foregoing and related ends, certain illustrative aspects are described herein in connection with the following description and the annexed drawings, which set forth the various ways in which the principles disclosed herein may be practiced, and all aspects and equivalents thereof are intended to fall within the scope of the claimed subject matter. The above and other objects, features and advantages of the present disclosure will become more apparent from the following detailed description when read in conjunction with the accompanying drawings. Like reference numerals generally refer to like parts or elements throughout the present disclosure.
FIG. 1 shows a schematic diagram of a code inspection method 100 according to an exemplary embodiment of the invention;
FIG. 2 illustrates a block diagram of a computing device 200 according to an exemplary embodiment of the invention.
FIG. 3 shows a schematic diagram of a code setup and query timing database according to an exemplary embodiment of the invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art. Like reference numerals generally refer to like parts or elements.
Fig. 1 shows a schematic diagram of a code checking method 100 according to an exemplary embodiment of the invention. The code checking method of the present invention is suitable for execution in a computing device.
FIG. 2 illustrates a block diagram of a computing device according to an exemplary embodiment of the invention. In a basic configuration, computing device 200 includes at least one processing unit 220 and system memory 210. According to one aspect, depending on the configuration and type of computing device, system memory 210 includes, but is not limited to, volatile storage (e.g., random access memory), non-volatile storage (e.g., read-only memory), flash memory, or any combination of such memories. According to one aspect, system memory 210 includes an operating system 211.
According to one aspect, operating system 211 is suitable, for example, for controlling the operation of computing device 200. Further, examples are practiced in connection with a graphics library, other operating systems, or any other application program and are not limited to any particular application or system. This basic configuration is illustrated in fig. 2 by those components within dashed line 215. According to one aspect, computing device 200 has additional features or functionality. For example, according to one aspect, computing device 200 includes additional data storage devices (removable and/or non-removable) such as, for example, magnetic disks, optical disks, or tape.
As set forth hereinabove, according to one aspect, program modules 212 are stored in system memory 210. According to one aspect, program modules 212 may include one or more application programs, the invention is not limited to the type of application program, e.g., applications further include: email and contacts applications, word processing applications, spreadsheet applications, database applications, slide show applications, drawing or computer-aided application, web browser applications, etc.
According to one aspect, the examples may be practiced in a circuit comprising discrete electronic components, a packaged or integrated electronic chip containing logic gates, a circuit utilizing a microprocessor, or on a single chip containing electronic components or a microprocessor. For example, examples may be practiced via a system on a chip (SOC) in which each or many of the components shown in fig. 2 may be integrated on a single integrated circuit. According to one aspect, such SOC devices may include one or more processing units, graphics units, communication units, system virtualization units, and various application functions, all of which are integrated (or "burned") onto a chip substrate as a single integrated circuit. When operating via an SOC, the functionality described herein may be operated via dedicated logic integrated with other components of computing device 200 on a single integrated circuit (chip). Embodiments of the invention may also be practiced using other techniques capable of performing logical operations (e.g., AND, OR, AND NOT), including but NOT limited to mechanical, optical, fluidic, AND quantum techniques. In addition, embodiments of the invention may be practiced within a general purpose computer or in any other circuit or system.
According to one aspect, computing device 200 may also have one or more input devices 231, such as a keyboard, mouse, pen, voice input device, touch input device, or the like. Output devices 232 such as a display, speakers, printer, etc. may also be included. The foregoing devices are examples and other devices may also be used. Computing device 200 may include one or more communication connections 233 that allow communication with other computing devices 240. Examples of suitable communication connections 233 include, but are not limited to: RF transmitter, receiver and/or transceiver circuitry; universal Serial Bus (USB), parallel and/or serial ports. Computing device 200 may be communicatively connected to other computing devices 240 via communication connection 233.
Embodiments of the present invention also provide a non-transitory readable storage medium storing instructions for causing the computing device to perform a method according to embodiments of the present invention. The readable media of the present embodiments, including both permanent and non-permanent, removable and non-removable media, may be any method or technology for information storage. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of readable storage media include, but are not limited to: phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transitory readable storage medium.
According to one aspect, communication media is embodied by computer readable instructions, data structures, program modules, or other data in a modulated data signal (e.g., carrier wave or other transport mechanism) and includes any information delivery media. According to one aspect, the term "modulated data signal" describes a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal. By way of example, and not limitation, communication media includes wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, radio Frequency (RF), infrared, and other wireless media.
It should be noted that although the above-described computing device only shows processing unit 220, system memory 210, input device 231, output device 232, and communication connection 233, the device may include other components necessary to achieve proper operation in a particular implementation. Furthermore, it will be understood by those skilled in the art that the above-described apparatus may include only the components necessary to implement the embodiments of the present description, and not all the components shown in the drawings.
Returning to fig. 1, the code inspection method 100 of the present invention first performs step 110: an inspection code is generated comprising an inspection method adapted to obtain method information of the executed application method.
According to one embodiment of the present invention, the code checking method is adapted to analyze the execution process of each application of one or more applications (or called software, etc.), and after the application is updated multiple times, the code of the current version of the application is added when the update is more, and the application file size of the application becomes larger and larger. When the application is updated, the updated code will cover the original code as a new function. The original code may not be loaded in the application running process, but only increases the volume of the application file and reduces the efficiency of application running. When the original code needs to be deleted, a certain method in the original code is still called, for example, the newly added code is called in a reflection mode, and if the original code is deleted, the application may lack the code of the method, so that the corresponding function cannot be realized.
Therefore, the method and the device check the execution condition of the application by checking the method, judge whether each method in the application file of the application is called, if so, the method code of the method cannot be deleted from the application file, and if not, the method code of the method can be deleted from the application file.
According to one embodiment of the present invention, the application to be inspected in the present invention may be implemented in one or more embodiments, and the present invention is not limited to the specific number of applications to be inspected to determine the execution condition.
According to one embodiment of the present invention, application files of an application may be implemented as one or more, each application file may include one or more application methods, each application method corresponds to a class, and is used to implement a function.
According to one embodiment of the present invention, the generated check code includes a check method for acquiring method information of the executed application method. The checking method may specifically configure a notification in the application that is preceded by all method codes in an aspect j (Load-Time-waiting) section, and use the annotation @ Before in order to execute the following checking method Before the application method is executed.
According to one embodiment of the invention, the method information includes class names and method names of executed application methods, i.e. types and method names of called application methods.
Subsequently, step 120 is executed, where, when each application method in the application file is executed, the application method code and the check code are acquired according to the class loader, and a first executable file that needs to be executed when the application method is called is generated.
According to one embodiment of the invention, when the check code is set, the application is started, the application file is loaded into the memory so as to call the application method therein, the class loader acquires the application method code and the check code each time the application method is executed, and the check code can be set at the head of the application method in an annotated manner so as to call the execution check code when the application method is executed, and then the application method is executed.
According to one embodiment of the invention, the class loader may be embodied as a classloader. The invention is not limited to the specific type of class loader. The first executable file may be embodied as a binary executable file.
Subsequently, step 130 is executed, and a checking method is executed when the first executable file is executed, so as to obtain method information of the application method; specific: determining class names and method names of called application methods; generating method information according to the class names and the method names. The obtained method information is the method information of the application method into which the inspection code is inserted. The specific result of the generated method information is a class name+method name, and one example of the method information is as follows:
com.example.demo.serive.listUser
subsequently, step 140 is performed to store the acquired method information in a time-series database according to the execution time of executing the application method. Specific: and storing the execution time of the application method in a storage queue according to the storage queue of the application method which is preset in the time sequence database.
According to one embodiment of the invention, the timing database may be embodied as an InfluxDB database. The invention is not limited to the specific type of time series database.
The invention sets the time sequence database in advance, and specifically stores all application methods included in the application file in the time sequence database, such as method names and class names of all application methods. A store queue is then set for each application method, each store queue being used to store the time at which the application method was specifically executed.
When the execution time of the application method is stored in the storage queue, searching is carried out in a time sequence database according to the method name and the class name of the application method, the storage queue of data to be stored is determined, and then the execution time of the application method is stored in the storage queue according to the time sequence.
Subsequently, step 150 is performed, after the checking method is performed, the called application method is performed. After the inspection method is executed, the application method is normally executed so as to normally provide the application related functions.
According to one embodiment of the invention, when an application method is called, if one or more sub-methods are included under the application method, when the sub-method of the application method is executed each time, sub-method codes and check codes of the application method are acquired according to a class loader, and a second executable file which needs to be executed when the sub-method is called is generated; executing a checking method when executing the second executable file, and acquiring method information of the sub-method; storing the acquired sub-method information in a time sequence database according to the execution time of executing the sub-method; after the checking method is executed, the called sub-method is executed. When the method information of the sub-method is acquired, the class name and the method name of the sub-method are acquired, and the method information is generated according to the class name and the method name of the sub-method. The second executable file may be embodied as a binary executable file.
Finally, step 160 is executed to query the time sequence database for the execution times of the application method in the preset time period in response to the code execution condition query request.
According to one embodiment of the present invention, querying the time sequence database for the execution times of the application method within the preset time period includes: determining one or more execution times stored in a preset time period in a storage queue of the application method; and determining the execution times of the application method according to one or more execution times stored in a preset time period. For example, if two execution times are stored in the preset time period, it is determined that the application method is executed twice in the preset time period.
According to one embodiment of the invention, after the execution times of one or more application methods in a preset time period are inquired, the application methods which are not executed in the preset time period are determined to be useless methods; the method code of the useless method is deleted from the application file. The one or more application methods are in particular methods that require determining the execution situation, such as all application methods included in the application. The useless method is an application method which is executed for 0 times in a preset time period, and the application method can be determined not to provide actual functions in the application execution process without being called in the preset time period. The invention analyzes and judges the useless codes based on the actual call quantity of the application method in the application operation, accords with the actual condition of the application operation, and can avoid deleting the codes by mistake.
According to one embodiment of the invention, the method of the invention further comprises: determining the execution times of each application method in each time division within a preset time period; and taking the time period of which the execution times are larger than a preset calling threshold value in the time period as the peak time period of the application method. The preset time period can be 0-24 hours, and the specific selection mode of the preset time period is not limited. The time period can be specifically set as one time period per hour, and the specific setting mode of the time period is not limited in the invention. And presetting a calling threshold value, namely judging whether the application method is a judging threshold value of a peak period in a time period. The invention does not limit the specific set value of the preset calling threshold. The preset call threshold may be specifically set to 500 times. If the calling times of the application method are 600 times in 0-24 hours and 9-10 hours, the application method is used as the peak time when the application method is called. The invention can also determine the application method with the execution times larger than the high-frequency calling threshold value as the application method called by high frequency according to the execution times of each application method in the preset time period or the time period, if the execution times of the first application method and the second application method are larger than 100 times when 9-10 are executed, the application method called by high frequency when 9-10 are determined as the application method called by high frequency.
FIG. 3 shows a schematic diagram of a code setup and query timing database according to an exemplary embodiment of the invention. As shown in fig. 3, the present invention synchronizes all application methods in advance into a time series database, and writes the class name and the method name of each application method in the time series database. And then when the application is run and the application file is executed, the application method is called. When executing the application method, firstly executing the checking method, acquiring the class name and the method name of the called application method by the checking method, and storing the execution time of executing the application method in the corresponding storage queue.
According to one embodiment of the invention, when the execution condition of the application method needs to be known, a code execution condition query request is sent like a time sequence database, and particularly, the query can be performed according to conditions, such as the number of times of calling each application method in the query application file in a preset time period from 2022-06-01 to 2022-06-28, so as to judge that the application method is called.
According to one embodiment of the present invention, if the number of executions of the a application method is 0, it may be determined that the a method is not invoked within a preset period of time, that the method is a useless method within a statistical range, and the method code of the a application method may be deleted. If the B application method is called 10000 times in a preset time period, the fact that the B application method is called in a statistical range can be judged, and the method codes of the B application method cannot be deleted.
The code checking method of the present invention is suitable for being executed in a computing device, and comprises the following steps: generating an inspection code comprising an inspection method adapted to obtain method information of the executed application method; when each application method in the application file is executed, acquiring an application method code and an inspection code according to a class loader, and generating a first executable file which needs to be executed when the application method is called; executing a checking method when executing the first executable file, and acquiring method information of an application method; storing the acquired method information in a time sequence database according to the execution time of executing the application method; after the inspection method is executed, executing the called application method; and responding to the code execution condition query request, and querying the execution times of the application method in a preset time period in a time sequence database. The invention sets the checking code, when executing each application method, executes the checking method in the checking code, obtains the method information of the executed application and stores the method information in the time sequence database, realizes the checking of the application, and judges whether the method is executed or not and the executing times.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects.
Those skilled in the art will appreciate that the modules or units or groups of devices in the examples disclosed herein may be arranged in a device as described in this embodiment, or alternatively may be located in one or more devices different from the devices in this example. The modules in the foregoing examples may be combined into one module or may be further divided into a plurality of sub-modules.
Those skilled in the art will appreciate that the modules in the apparatus of the embodiments may be adaptively changed and disposed in one or more apparatuses different from the embodiments. The modules or units or groups of embodiments may be combined into one module or unit or group, and furthermore they may be divided into a plurality of sub-modules or sub-units or groups. Any combination of all features disclosed in this specification, as well as all processes or units of any method or apparatus so disclosed, may be employed, except that at least some of such features and or processes or units are mutually exclusive. Each feature disclosed in this specification may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features but not others included in other embodiments, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments.
Furthermore, some of the embodiments are described herein as methods or combinations of method elements that may be implemented by a processor of a computer system or by other means of performing the functions. Thus, a processor with the necessary instructions for implementing the described method or method element forms a means for implementing the method or method element. Furthermore, the elements of the apparatus embodiments described herein are examples of the following apparatus: the apparatus is for carrying out the functions performed by the elements for carrying out the objects of the invention.
The various techniques described herein may be implemented in connection with hardware or software or, alternatively, with a combination of both. Thus, the methods and apparatus of the present invention, or certain aspects or portions of the methods and apparatus of the present invention, may take the form of program code (i.e., instructions) embodied in tangible media, such as floppy diskettes, CD-ROMs, hard drives, or any other machine-readable storage medium, wherein, when the program is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the invention.
In the case of program code execution on programmable computers, the computing device will generally include a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device. Wherein the memory is configured to store program code; the processor is configured to execute the code checking method of the present invention according to instructions in said program code stored in the memory.
By way of example, and not limitation, computer readable media comprise computer storage media and communication media. Computer-readable media include computer storage media and communication media. Computer storage media stores information such as computer readable instructions, data structures, program modules, or other data. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. Combinations of any of the above are also included within the scope of computer readable media.
As used herein, unless otherwise specified the use of the ordinal terms "first," "second," "third," etc., to describe a general object merely denote different instances of like objects, and are not intended to imply that the objects so described must have a given order, either temporally, spatially, in ranking, or in any other manner.
While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of the above description, will appreciate that other embodiments are contemplated within the scope of the invention as described herein. Furthermore, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter. Accordingly, many modifications and variations will be apparent to practitioners skilled in the art. The disclosure of the present invention is intended to be illustrative, but not limiting, of the scope of the invention.

Claims (10)

1. A code checking method adapted to run in a computing device, the method comprising:
generating an inspection code comprising an inspection method adapted to obtain method information of the executed application method;
when each application method in the application file is executed, acquiring an application method code and an inspection code according to a class loader, and generating a first executable file which needs to be executed when the application method is called;
executing a checking method when executing the first executable file, and acquiring method information of the application method;
storing the acquired method information in a time sequence database according to the execution time of executing the application method;
after the inspection method is executed, executing the called application method;
and responding to a code execution condition query request, and querying the execution times of the application method in a preset time period in the time sequence database.
2. The method of claim 1, wherein the code execution case query request includes one or more application methods to be queried, the method further comprising:
after inquiring the execution times of one or more application methods in a preset time period, determining the application methods which are not executed in the preset time period as useless methods;
the method code of the useless method is deleted from the application file.
3. The method of claim 2, wherein the method further comprises:
determining the execution times of each application method in each time division within a preset time period;
and taking the time period of which the execution times are larger than a preset calling threshold value in the time period as the peak time period of the application method.
4. The method of claim 1, wherein the performing a check method while executing the first executable file, obtaining method information of the application method comprises:
determining class names and method names of called application methods;
and generating method information according to the class names and the method names.
5. The method of claim 1, wherein the storing the acquired method information in a time-series database according to an execution time of executing the application method comprises:
and storing the execution time of the application method in a storage queue according to the storage queue of the application method, which is preset in the time sequence database.
6. The method of claim 5, wherein the querying the time series database for the execution times of the application method within a preset time period comprises:
in a storage queue of the application method, determining one or more execution times stored in a preset time period;
and determining the execution times of the application method according to one or more execution times stored in a preset time period.
7. The method of claim 1, wherein the obtaining the application method code and the check code according to the class loader when executing each application method in the application file, and generating the executable file to be executed when calling the application method, comprises:
when executing the sub-method of the application method, acquiring the sub-method code and the check code of the application method according to a class loader, and generating a second executable file which needs to be executed when calling the sub-method;
executing a checking method when executing the second executable file, and acquiring method information of the sub-method;
storing the acquired sub-method information in a time sequence database according to the execution time of executing the sub-method;
after the inspection method is executed, executing the called sub-method.
8. The method of any of claims 1-7, the timing database comprising an InfluxDB database.
9. A computing device, comprising:
one or more processors;
a memory; and
one or more programs, wherein the one or more programs are stored in memory and configured to be executed by the one or more processors, the one or more programs comprising instructions for performing the method of any of claims 1-8.
10. A computer readable storage medium storing one or more programs, the one or more programs comprising instructions, which when executed by a computing device, cause the computing device to perform the method of any of claims 1-8.
CN202311779433.7A 2023-12-22 2023-12-22 Code checking method, computing device and storage medium Pending CN117891723A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311779433.7A CN117891723A (en) 2023-12-22 2023-12-22 Code checking method, computing device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311779433.7A CN117891723A (en) 2023-12-22 2023-12-22 Code checking method, computing device and storage medium

Publications (1)

Publication Number Publication Date
CN117891723A true CN117891723A (en) 2024-04-16

Family

ID=90641860

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311779433.7A Pending CN117891723A (en) 2023-12-22 2023-12-22 Code checking method, computing device and storage medium

Country Status (1)

Country Link
CN (1) CN117891723A (en)

Similar Documents

Publication Publication Date Title
US10613970B1 (en) Method and system for managing deployment of software application components based on software performance data
CN108459962B (en) Code normalization detection method and device, terminal equipment and storage medium
CN111339041A (en) File parsing and warehousing and file generating method and device
CN113127347B (en) Interface testing method, device, equipment and readable storage medium
US20070234328A1 (en) File handling for test environments
US20170249143A1 (en) Detecting open source components built into mobile applications
CN113495728A (en) Dependency relationship determination method, dependency relationship determination device, electronic equipment and medium
CN114116505A (en) Code testing method and device
CN111694992A (en) Data processing method and device
CN110688320B (en) Global variable detection method and device and terminal equipment
CN114816772B (en) Debugging method, debugging system and computing device for application running based on compatible layer
CN110334031B (en) Memory allocation code detection method and device, computer equipment and storage medium
CN117891723A (en) Code checking method, computing device and storage medium
CN113485712B (en) Kernel clipping method and computing device
CN115048082A (en) Micro front-end system construction method and device, server and readable storage medium
KR101737575B1 (en) Method and device for verifying data based on sql sentences generated automatically
US11734021B2 (en) Automated runtime service optimization via modification of a configuration file
CN111209056B (en) Method and device for loading function, readable storage medium and electronic equipment
CN115328816B (en) Test case management method, device, computing equipment and storage medium
CN115904953A (en) Test method, test device, computing equipment and storage medium
CN116541013A (en) Compiling method, computing device and storage medium
CN107168807B (en) Function analysis method and memory device
CN115658075A (en) Software package compiling method and device, computing equipment and storage medium
CN117271309A (en) Service testing method, system, electronic equipment and storage medium
CN118152009A (en) Static library determination method and computing 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