WO2022046061A1 - Generating projected resource consumption levels based on aggregate program source codes - Google Patents
Generating projected resource consumption levels based on aggregate program source codes Download PDFInfo
- Publication number
- WO2022046061A1 WO2022046061A1 PCT/US2020/048290 US2020048290W WO2022046061A1 WO 2022046061 A1 WO2022046061 A1 WO 2022046061A1 US 2020048290 W US2020048290 W US 2020048290W WO 2022046061 A1 WO2022046061 A1 WO 2022046061A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- program source
- source code
- resource consumption
- consumption level
- target program
- 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.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
Definitions
- FIG.1 is a block diagram of an example system for generating projected resource consumption levels based on aggregate program source code data.
- FIG.2 is a block diagram of an example client device to request projected resource consumption levels in the system of FIG.1.
- FIG.3 is a block diagram of an example server to generate projected resource consumption levels based on aggregate program source code data in the system of FIG.1.
- FIG.4 is a flowchart of an example method of processing a request to generate a projected resource consumption level in the system of FIG.1.
- FIG.5 is a flowchart of an example method of generating a projected resource consumption level in the method of FIG.4.
- DETAILED DESCRIPTION Developers developing program source code may encounter difficulties predicting resource consumption levels of their program source code under different runtime conditions. Execution of the code on their local machine may provide local resource consumption levels but does not provide insights as to how the program source code may scale and perform under different workload conditions.
- An example method of generating a projected resource consumption level for a target program source code uses aggregate program source code data.
- a common data repository stores the aggregate program source code data and respective local resource consumption levels.
- the projected resource consumption level is generated based on the aggregate program source code data and respective local resource consumption levels.
- the resulting projected resource consumption level may be output to the requesting client device.
- the projected resource consumption level may be generated based on similar program source codes, according to machine learning models or the like.
- FIG.1 is a block diagram of an example system 100 for generating projected resource consumption levels based on aggregate program source code data.
- the system 100 includes client devices 102-1, 102-2, and 102-3, a common data repository 104, a network 106, and a server 108.
- the client devices 102-1, 102-2, and 102-3 are computing devices, such as laptop computers, desktop computers, tablets, or the like at which developers may write program source code.
- the client devices 102-1, 102-2, and 102-3 may therefore each include a processor, a memory storing applications allowing the developers to write, compile, test and execute program source code.
- the client devices 102-1, 102-2, and 102-3 generate program source code data including the program source code itself, and program source code parameters such as annotations of the program source code, local resource consumption levels, and the like.
- the client devices 102-1, 102-2, and 102-3 are further to communicate the program source code data to the common data repository 104, for example via the network 106 and may therefore also each include a suitable communications interface (e.g., including transmitters, receivers, network interface devices, and the like) to communicate over the network 106.
- a suitable communications interface e.g., including transmitters, receivers, network interface devices, and the like
- the internal components of an example client device are described in further detail below.
- the program source code data is generated by each of the client devices 102-1, 102-2, and 102-3 when program source code is executed. For example, during development, developers may annotate the program source code with code instrumentation, such as a unique ID or the like, to identify or mark particular code elements.
- the annotation data may identify, for example, memory, network time, latency, packet size, storage footprint or the like associated with the program source code. Such annotation data may be included in the program source code data to be sent to the common data repository 104, as will be described further below. Additionally, during development, developers may execute the program source code locally to test performance. Execution and runtime parameters, such as machine information, resource consumption level, and the like may also be included in the program source code data to be sent to the common data repository 104, as will be described further below. [0013]
- the common data repository 104 is a repository, such as a data lake, accessible by multiple client devices for storing common data for further processing. In particular, the common data repository 104 stores aggregate program source code data.
- the common data repository 104 receives program source code data from multiple client devices, such as the client devices 102-1, 102-2, and 102-3. That is, the common data repository 104 may aggregate program source code data from multiple different developers writing code for different applications, in different environments, and the like. More specifically, the common data repository 104 includes program source code and associated execution parameters, including for multiple executions of program source code across multiple resources and configurations. As will be appreciated, the common data repository 104 may receive program source code data from more or fewer than the three client devices 102-1, 102-2, and 102-3 depicted in the present example.
- This aggregate program source code data from multiple client devices and developers stored at the common data repository 104 may then be accessed by the server 108 and used to predict and project resource consumption levels and other program source code metrics with greater accuracy, as described in greater detail below.
- the client devices 102-1, 102-2, and 102-3 communicate with the common data repository 104 via the network 106.
- the network 106 may include wired or wireless networks, including wide-area networks, such as the Internet, local area networks employing routers, switches, wireless access points, combinations of the above, and the like.
- the server 108 is to generate projected resource consumption levels based on the aggregate program source code data stored at the common data repository 104 and provide feedback to developers at at least one of the client devices 102-1, 102-2, and 102-3.
- the server 108 is also connected to the network 106 to access the common data repository 104, for example via an application programming interface (API).
- the common data repository 104 may be hosted at the server 108.
- the server 108 is generally to receive a request for a projected resource consumption level for a target program source code (e.g., from one of the client devices 102-1, 102-2, or 102-3), cross-analyze the target program source code in view of the aggregate program source code data stored at the common data repository 104, and generate a projected resource consumption level for the target program source code.
- the server 108 may apply a machine learning model to the target program source code to compare the target program source code to similar program source codes in the aggregate program source code data (e.g., by similar structure, annotation of code elements, local resource consumption levels, or the like) and to output a projected resource consumption level.
- the machine learning model may employ various classification or clustering methods to characterize the target program source code based on the code elements or annotation data to identify similar program source codes in the aggregate program source code data.
- the identified program source codes may have similar or comparable code elements, ordered in a similar structure, and a similar local resource consumption level when executed on similar machines (i.e., similar semantics and/or syntax).
- a target program source code having a single looping code element may be classified as similar to a program source code also having a single looping code element and five or fewer direct statements when their local runtimes are within the same order of magnitude or are within a threshold percentage of one another, or the like.
- the target program source code may not be similar to program source codes with single looping code elements having local runtimes several orders of magnitude larger or smaller, or outside the threshold percentage, or program source codes with additional classes, nested or additional loop elements, or the like. [0018] as well as various regression methods to predict the projected resource consumption level based on actual resource consumption levels of similar program source codes.
- the machine learning model may first identify similar program source codes in the aggregate program source code data, and then extrapolate the actual resource consumption levels of the similar program source codes to generate the projected resource consumption level of the target program source code.
- the machine learning model may analyze each code element individually to generate a projected resource consumption level associated with the individual code elements and sum, or otherwise aggregate, them to obtain the projected resource consumption level of the target program source code.
- the machine learning model may analyze the target program source code as a whole.
- the machine learning model may utilize a neural network to accept, as input, target program source codes, and output projected resource consumption levels.
- the neural network may be trained based on the aggregate program source code data, including previously submitted program source codes and their actual resource consumption levels, including resource consumption levels when executed in different environments.
- the projected resource consumption level may be, for example, an environment-specific resource consumption level, to predict resource requirements of the target program source code in different runtime environments, such as a prototype environment, a development environment, a production environment, or the like.
- the machine learning model may utilize the actual resource consumption levels of similar program source codes (e.g., having similar structure and/or similar local resource consumption levels) operating in the specified environment to predict the projected resource consumption level of the target program source code when the target program source code is executed in the specified environment.
- the server 108 may additionally identify related service program source code associated with the target program source code (i.e., program source code for related services, on which the target program may rely, or be executed simultaneously, or the like). For example, the server 108 may identify a related service program source code referenced within a code element of the target program source code. Additionally or alternately, the annotation data may identify a related service program source code. The server 108 may retrieve or determine, based on the aggregate program source code data stored at the common data repository 104, a related service resource consumption level and compute the projected resource consumption level for the target program source code in consideration of the related service resource consumption level.
- related service program source code i.e., program source code for related services, on which the target program may rely, or be executed simultaneously, or the like.
- the server 108 may identify a related service program source code referenced within a code element of the target program source code.
- the annotation data may identify a related service program source code.
- the server 108 may retrieve or determine, based on the aggregate program
- the server 108 may then return the projected resource consumption level to the requesting client device 102-1, 102-2, or 102-3.
- the server 108 may provide recommendations as to resource utilization or particular code elements. For example, the server 108 may identify underutilization of available resources and recommend that the application be moved to a resource with lower capacity.
- the recommendations may include a replacement code element for a given code element, wherein the replacement code element has a lower projected resource consumption level than the given code element.
- the correlations between the code elements and their associated projected resource consumption levels may be determined through testing, modeling, real world observations, or the like, and stored at the common data repository 104.
- the server 108 may generate recommendations in accordance with the teachings of PCT Application No. PCT/US2020/022117, the contents of which are incorporated herein by reference.
- the projected resource consumption level may be returned to the developer during development of the target program source code in near-real time, providing insights as to performance of the target program source code in different environments, under different workloads, and the like.
- FIG.2 certain internal components of the client device 102-1 are illustrated.
- the client devices 102-2 and 102-3 may include similar components.
- the client device 102-1 includes a processor 200, which may include a central processing unit (CPU), a microcontroller, a microprocessor, a processing core, or similar device capable of executing instructions.
- the processor 200 may also include or be interconnected with a non- transitory machine-readable storage medium, such as a memory 202, that may be electronic, magnetic, optical, or other physical storage device that stores executable instructions.
- a memory 202 may store an application 204 for generating program source code data.
- the application 204 may be an integrated development (IDE) application, or other suitable application to support code development functions.
- the application includes program source code execution instructions 206, annotation instructions 208, local environment instructions 210, resource consumption instructions 212, and transmission instructions 214. It will be understood that execution of the instructions 206, 208, 210, 212, and 214 by the processor 200 configures the client device 102-1 or the processor 200 to perform the functionality described herein.
- the program source code execution instructions 206 when executed, cause the processor 200 to execute the program source code, and in response, generate program source code data including the program source code itself.
- the annotation instructions 208 when executed, cause the processor 200 to generate annotation data identifying unique IDs and other annotations or instrumentation details of particular code elements within the program source code.
- the processor 200 further includes the annotation data of the program source code to the program source code data.
- the local environment instructions 210 when executed, cause the processor 200 to obtain parameters of the local operating environment, such as an Internet Protocol (IP) address, memory size, disk size, and the like of the client device 102-1 executing the program source code.
- IP Internet Protocol
- the resource consumption instructions 212 when executed, cause the processor 200 to obtain resource consumption parameters of the program source code executing in the local environment.
- Example resource consumption levels may include memory usage, processor usage, network bandwidth usage, power usage, cooling resource usage, and the like.
- the resource consumption levels may be associated, in some examples, with particular code elements of the program source code, for example, based on unique IDs or other annotations in the program source code.
- the processor 200 further adds the resource consumption parameters to the program source code data.
- other forms of computing resources such as lambda functions, and the respective configurations of said resources may be queried as an execution parameter and included in the program source code data.
- the transmission instructions 214 when executed, cause the processor 200 to send the program source code data to the common data repository 104 via the network 106.
- the processor 200 may further send a request for a projected resource consumption level to the server 108.
- the request may include a runtime condition for which a projected resource consumption level is sought.
- the request sent to the server 108 may include the program source code data.
- the client device 102-4 may transmit the program source code data to the server 108, which, in turn, may store the program source code data at the common data repository 104.
- the processor 200 may output, at a display, the projected resource consumption level and the runtime condition.
- the client device 102-1 further includes a communications interface 216 interconnected with the processor 200.
- the communications interface 216 includes suitable hardware (e.g., transmitters, receivers, network interface controllers and the like) allowing the client device 102-1 to communicate with other computing devices, such as the server 108.
- the specific components of the communications interface 216 are selected based on the type of network or other links that the client device 102-1 communicates over.
- FIG.3 depicts certain internal components of the server 108.
- the server 108 includes a processor 300, which may include a central processing unit (CPU), a microcontroller, a microprocessor, a processing core, or similar device capable of executing instructions.
- the processor 300 may also include or be interconnected with a non- transitory machine-readable storage medium, such as a memory 302, that may be electronic, magnetic, optical, or other physical storage device that stores executable instructions.
- the memory 302 may store an application 304 for generating projected resource consumption levels.
- the application 304 includes request processing instructions 306, model application instructions 308, related service instructions 310, feedback generation instructions 312, and output instructions 314.
- the request processing instructions 306 when executed, cause the processor 300 to process a request for a projected resource consumption level received at the server 108.
- the request may indicate a target program source code for which a projected resource consumption level is sought.
- the processor 300 may therefore obtain the target program source code, for example by extracting the target program source code from the request or retrieving the target program source code from the common data repository 104.
- the model application instructions 308, when executed, cause the processor 300 to apply a model to the target program source code to generate the projected resource consumption level.
- the memory 302 may additionally store a machine learning model 316 for projecting resource consumption levels.
- the machine learning model 316 may utilize the aggregate program code data stored at the common data repository 104 to generate projected resource consumption levels.
- the machine learning model 316 may receive a target program source code and compare annotation data of the target program source code to annotation data of other program source codes in the common data repository 104. By comparing the annotation data, the machine learning model 316 may identify program source codes from the common data repository 104 which may provide insights as to projected resource consumption levels of the target program source code. For example, program source codes having similarly annotated code elements or similar structure to the target program source code may be identified.
- the machine learning model 316 may aggregate resource consumption levels of the identified program source codes and evaluate the local operating environment parameters in view of the aggregate resource consumption levels to determine the projected resource consumption levels of the target program source code.
- the model application instructions 308 may apply the machine learning model 316 to the target program source code and as a result, obtain projected resource consumption levels of the target program source code.
- the related service instructions 310 when executed, cause the processor 300 to identify a related service program code associated with the target program source code, obtain a related service resource consumption level, and generate a projected resource consumption level of the target program source code based at least in part on the related service resource consumption level.
- FIG.4 an example method 400 of generating projected resource consumption levels is depicted. The performance of the method 400 is described in conjunction with its performance in the system 100, and in particular, by the server 108 via execution of the application 304 by the processor 300, with reference to the components in the system 100.
- the method 400 may be performed by other suitable devices or systems.
- the method 400 is initiated at block 402.
- the server 108 receives a request for a projected resource consumption level.
- the client device 102-1 may initiate the request for a projected resource consumption level.
- the request indicates a target program source code for which a projected resource consumption level is sought, and may further indicate a runtime condition under which the projected resource consumption level is sought.
- the request may include the target program source code.
- the client device 102-1 may send target program source code data to the server 108.
- the server 108 may extract the target program source code from the target program source code data.
- the server 108 may additionally receive, as part of the target program source code data, annotation data identifying annotations, such as unique IDs and the like, of particular code elements in the target program source code, local operating environment parameters of an instance of execution of the target program source code, and local resource consumption parameters of the instance of execution of the target program source code.
- annotation data such as unique IDs and the like
- the server 108 may store the target program source code data at the common data repository 104.
- the request may simply include an identifier of the target program source code, and hence, the server 108 may use the identifier to retrieve the target program source code and associated annotation data, local operating environment parameters, and resource consumption parameters from the common data repository 104.
- the runtime conditions may specify particular operating environment parameters (i.e., specifying particular machine capacities), a designated environment (i.e., a particular server, public cloud environment or the like), or similar for executing the target program source code for which the projected resource consumption level is sought.
- the server 108 generates a projected resource consumption level for the target program source code.
- the server 108 applies a model to the target program source code to generate projected resource consumption levels for the target program source code under the specified runtime condition.
- the model utilizes the target program source code data and the aggregate source code data from the common data repository 104 to generate the projected resource consumption levels for the target program source code.
- the server 108 may use the annotation data for the target program source code to identify similar program source code stored at the common data repository 104. Similar program source code may be identified based on the annotation data (e.g., having similarly annotated code elements, program structure, or the like), local resource consumption levels, or the like.
- the server 108 may aggregate respective resource consumption levels for the similar program source code under various runtime conditions. The server 108 may thus use the resource consumption levels to extrapolate a projected resource consumption level for the target program source code under the specified runtime condition.
- the model applied by the server 108 may perform other suitable operations to generate a projected resource consumption level for the target program source code under the specified runtime condition.
- the model applied by the server 108 may be, for example, the machine learning model 316.
- other models such as an arithmetic average, may also be applied to generate the projected resource consumption levels for the target program source code.
- the server 108 generates projected resource consumption levels based on a related service associated with the target program source code.
- the server 108 may use the annotation data to identify a related service program code stored in the common data repository 104, which is associated with the target program source code.
- the related service program code may include services on which the target program source code relies or references, or services which are otherwise executed concurrently as the target program source code.
- the server 108 may retrieve or otherwise obtain a related service resource consumption level for the related service program code. For example, when the related service resource consumption level under the specified runtime conditions is available in the common data repository 104, the server 108 may simply retrieve said value.
- the server 108 may apply a model, such as the machine learning model 316 to the related service program code, for example, as described in relation to block 404, to obtain the related service resource consumption level.
- the server 108 may then use the related service resource consumption level to generate the projected resource consumption level of the target program source code under the specified runtime conditions.
- the blocks 404 and 406 may be performed concurrently with one another, and in some examples, may influence one another.
- the server 108 may generate feedback for the target program source code. The feedback may be based on the aggregate program source code data, the related service program code data, combinations of the above, and similar.
- the server 108 may compare the projected resource consumption level to the available resources.
- the server 108 may utilize the annotation data of the target program source code to evaluate minimum, average and maximum usages and compare the projected resource consumption levels across broader runtime conditions based on the aggregate program source code data. If the target program code generally has a projected resource consumption level utilizing less than a threshold percentage of available resources, this underutilization may be flagged to be potentially moved to a resource with lower capacity, therefore reducing costs.
- the feedback may include recommendations for improving the efficiency (i.e., the projected resource consumption level) based on the aggregate program code data. For example, based on annotation data of the aggregate program code data, the server 108 may determine replacement code elements to improve the projected resource consumption level.
- the server 108 outputs the projected resource consumption level.
- the server 108 may send an indication of the projected resource consumption level to the client device 102- 1.
- the projected resource consumption level may be displayed at a display of the client device 102-1.
- the server 108 may return the runtime conditions for the projected resource consumption level.
- the server 108 may additionally return any feedback generated block 506.
- an example system and method for generating projected resource consumption levels may store aggregate program source code data at a common data repository.
- the data may be analyzed to determine key metrics of application performance including resource consumption levels.
- the projected resource consumption levels and other feedback may be returned to developers in near-real time to integrate during the development process.
- analyzing multiple program source codes across multiple resources and configurations provides insight into how the program source code may perform in different configurations, and under different runtime conditions (i.e., under different workloads, in different environments).
- the aggregation of program source code data at the common data repository additionally supports the integration and composition of different, but related services (e.g., which are executed concurrently, or which reference one another).
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
An example method includes: storing, at a common data repository, aggregate program source code data including program source codes and respective local resource consumption levels: receiving a request for a projected resource consumption level for a target program source code; generating, based on the target program source code and aggregate program source code data, a projected resource consumption level for the target program source code; and outputting the projected resource consumption level.
Description
GENERATING PROJECTED RESOURCE CONSUMPTION LEVELS BASED ON AGGREGATE PROGRAM SOURCE CODES BACKGROUND [0001] When writing source code for various programs, developers may execute and test their code to ensure functionality, as well as to determine resource consumption levels of their program source code on their local machines. It may be difficult to predict resource consumption levels of the program source code under production environment conditions. BRIEF DESCRIPTION OF THE DRAWINGS [0002] FIG.1 is a block diagram of an example system for generating projected resource consumption levels based on aggregate program source code data. [0003] FIG.2 is a block diagram of an example client device to request projected resource consumption levels in the system of FIG.1. [0004] FIG.3 is a block diagram of an example server to generate projected resource consumption levels based on aggregate program source code data in the system of FIG.1. [0005] FIG.4 is a flowchart of an example method of processing a request to generate a projected resource consumption level in the system of FIG.1. [0006] FIG.5 is a flowchart of an example method of generating a projected resource consumption level in the method of FIG.4. DETAILED DESCRIPTION
[0007] Developers developing program source code may encounter difficulties predicting resource consumption levels of their program source code under different runtime conditions. Execution of the code on their local machine may provide local resource consumption levels but does not provide insights as to how the program source code may scale and perform under different workload conditions. Some systems may perform analysis on data gathered from executing an application, however may not accurately account for different runtime conditions, related services, and the like which may affect the performance of the program source code. [0008] An example method of generating a projected resource consumption level for a target program source code uses aggregate program source code data. A common data repository stores the aggregate program source code data and respective local resource consumption levels. Upon receipt of a request for a projected resource consumption level for the target program source code, the projected resource consumption level is generated based on the aggregate program source code data and respective local resource consumption levels. The resulting projected resource consumption level may be output to the requesting client device. [0009] For example, the projected resource consumption level may be generated based on similar program source codes, according to machine learning models or the like. In particular, the projected resource consumption level may be generated under different runtime conditions (i.e., for different environments to predict performance in environments having different types of resources or under different loads). The target program source code may be associated with a local resource consumption level, which may be extrapolated to determine projected resource consumption levels in different environments. The target program source code may also be analyzed to identify other services associated with the target program which may affect the projected resource consumption level.
[0010] FIG.1 is a block diagram of an example system 100 for generating projected resource consumption levels based on aggregate program source code data. The system 100 includes client devices 102-1, 102-2, and 102-3, a common data repository 104, a network 106, and a server 108. [0011] The client devices 102-1, 102-2, and 102-3 are computing devices, such as laptop computers, desktop computers, tablets, or the like at which developers may write program source code. The client devices 102-1, 102-2, and 102-3 may therefore each include a processor, a memory storing applications allowing the developers to write, compile, test and execute program source code. The client devices 102-1, 102-2, and 102-3 generate program source code data including the program source code itself, and program source code parameters such as annotations of the program source code, local resource consumption levels, and the like. The client devices 102-1, 102-2, and 102-3 are further to communicate the program source code data to the common data repository 104, for example via the network 106 and may therefore also each include a suitable communications interface (e.g., including transmitters, receivers, network interface devices, and the like) to communicate over the network 106. The internal components of an example client device are described in further detail below. [0012] The program source code data is generated by each of the client devices 102-1, 102-2, and 102-3 when program source code is executed. For example, during development, developers may annotate the program source code with code instrumentation, such as a unique ID or the like, to identify or mark particular code elements. The annotation data may identify, for example, memory, network time, latency, packet size, storage footprint or the like associated with the program source code. Such annotation data may be included in the program source code data to be sent to the common data repository 104, as will be described further below. Additionally, during development, developers may execute the program source code locally to test performance. Execution and runtime parameters, such as machine information, resource consumption level, and the like may also be included in the program
source code data to be sent to the common data repository 104, as will be described further below. [0013] The common data repository 104 is a repository, such as a data lake, accessible by multiple client devices for storing common data for further processing. In particular, the common data repository 104 stores aggregate program source code data. The common data repository 104 receives program source code data from multiple client devices, such as the client devices 102-1, 102-2, and 102-3. That is, the common data repository 104 may aggregate program source code data from multiple different developers writing code for different applications, in different environments, and the like. More specifically, the common data repository 104 includes program source code and associated execution parameters, including for multiple executions of program source code across multiple resources and configurations. As will be appreciated, the common data repository 104 may receive program source code data from more or fewer than the three client devices 102-1, 102-2, and 102-3 depicted in the present example. This aggregate program source code data from multiple client devices and developers stored at the common data repository 104 may then be accessed by the server 108 and used to predict and project resource consumption levels and other program source code metrics with greater accuracy, as described in greater detail below. [0014] The client devices 102-1, 102-2, and 102-3 communicate with the common data repository 104 via the network 106. The network 106 may include wired or wireless networks, including wide-area networks, such as the Internet, local area networks employing routers, switches, wireless access points, combinations of the above, and the like. [0015] The server 108 is to generate projected resource consumption levels based on the aggregate program source code data stored at the common data repository 104 and provide feedback to developers at at least one of the client devices 102-1, 102-2, and 102-3. The server 108 is also connected to the network 106 to access the common data repository 104, for example via an
application programming interface (API). In other examples, the common data repository 104 may be hosted at the server 108. [0016] In operation, the server 108 is generally to receive a request for a projected resource consumption level for a target program source code (e.g., from one of the client devices 102-1, 102-2, or 102-3), cross-analyze the target program source code in view of the aggregate program source code data stored at the common data repository 104, and generate a projected resource consumption level for the target program source code. [0017] For example, the server 108 may apply a machine learning model to the target program source code to compare the target program source code to similar program source codes in the aggregate program source code data (e.g., by similar structure, annotation of code elements, local resource consumption levels, or the like) and to output a projected resource consumption level. For example, the machine learning model may employ various classification or clustering methods to characterize the target program source code based on the code elements or annotation data to identify similar program source codes in the aggregate program source code data. The identified program source codes may have similar or comparable code elements, ordered in a similar structure, and a similar local resource consumption level when executed on similar machines (i.e., similar semantics and/or syntax). For example, a target program source code having a single looping code element may be classified as similar to a program source code also having a single looping code element and five or fewer direct statements when their local runtimes are within the same order of magnitude or are within a threshold percentage of one another, or the like. In contrast, the target program source code may not be similar to program source codes with single looping code elements having local runtimes several orders of magnitude larger or smaller, or outside the threshold percentage, or program source codes with additional classes, nested or additional loop elements, or the like.
[0018] as well as various regression methods to predict the projected resource consumption level based on actual resource consumption levels of similar program source codes. That is, the machine learning model may first identify similar program source codes in the aggregate program source code data, and then extrapolate the actual resource consumption levels of the similar program source codes to generate the projected resource consumption level of the target program source code. [0019] In some examples, the machine learning model may analyze each code element individually to generate a projected resource consumption level associated with the individual code elements and sum, or otherwise aggregate, them to obtain the projected resource consumption level of the target program source code. In other examples, the machine learning model may analyze the target program source code as a whole. In further examples, the machine learning model may utilize a neural network to accept, as input, target program source codes, and output projected resource consumption levels. In particular, the neural network may be trained based on the aggregate program source code data, including previously submitted program source codes and their actual resource consumption levels, including resource consumption levels when executed in different environments. [0020] The projected resource consumption level may be, for example, an environment-specific resource consumption level, to predict resource requirements of the target program source code in different runtime environments, such as a prototype environment, a development environment, a production environment, or the like. For example, the machine learning model may utilize the actual resource consumption levels of similar program source codes (e.g., having similar structure and/or similar local resource consumption levels) operating in the specified environment to predict the projected resource consumption level of the target program source code when the target program source code is executed in the specified environment.
[0021] In other examples, the server 108 may additionally identify related service program source code associated with the target program source code (i.e., program source code for related services, on which the target program may rely, or be executed simultaneously, or the like). For example, the server 108 may identify a related service program source code referenced within a code element of the target program source code. Additionally or alternately, the annotation data may identify a related service program source code. The server 108 may retrieve or determine, based on the aggregate program source code data stored at the common data repository 104, a related service resource consumption level and compute the projected resource consumption level for the target program source code in consideration of the related service resource consumption level. [0022] The server 108 may then return the projected resource consumption level to the requesting client device 102-1, 102-2, or 102-3. In some examples, in addition to the projected resource consumption level, the server 108 may provide recommendations as to resource utilization or particular code elements. For example, the server 108 may identify underutilization of available resources and recommend that the application be moved to a resource with lower capacity. In other examples, the recommendations may include a replacement code element for a given code element, wherein the replacement code element has a lower projected resource consumption level than the given code element. The correlations between the code elements and their associated projected resource consumption levels may be determined through testing, modeling, real world observations, or the like, and stored at the common data repository 104. For example, the server 108 may generate recommendations in accordance with the teachings of PCT Application No. PCT/US2020/022117, the contents of which are incorporated herein by reference. [0023] Advantageously, the projected resource consumption level may be returned to the developer during development of the target program source code in near-real time, providing insights as to performance of the target
program source code in different environments, under different workloads, and the like. [0024] Turning to FIG.2, certain internal components of the client device 102-1 are illustrated. As will be appreciated, the client devices 102-2 and 102-3 may include similar components. The client device 102-1 includes a processor 200, which may include a central processing unit (CPU), a microcontroller, a microprocessor, a processing core, or similar device capable of executing instructions. [0025] The processor 200 may also include or be interconnected with a non- transitory machine-readable storage medium, such as a memory 202, that may be electronic, magnetic, optical, or other physical storage device that stores executable instructions. In particular, the memory 202 may store an application 204 for generating program source code data. The application 204 may be an integrated development (IDE) application, or other suitable application to support code development functions. The application includes program source code execution instructions 206, annotation instructions 208, local environment instructions 210, resource consumption instructions 212, and transmission instructions 214. It will be understood that execution of the instructions 206, 208, 210, 212, and 214 by the processor 200 configures the client device 102-1 or the processor 200 to perform the functionality described herein. [0026] The program source code execution instructions 206, when executed, cause the processor 200 to execute the program source code, and in response, generate program source code data including the program source code itself. [0027] The annotation instructions 208, when executed, cause the processor 200 to generate annotation data identifying unique IDs and other annotations or instrumentation details of particular code elements within the program source code. The processor 200 further includes the annotation data of the program source code to the program source code data.
[0028] The local environment instructions 210, when executed, cause the processor 200 to obtain parameters of the local operating environment, such as an Internet Protocol (IP) address, memory size, disk size, and the like of the client device 102-1 executing the program source code. The processor 200 further adds the local operating environment parameters to the program source code data. [0029] The resource consumption instructions 212, when executed, cause the processor 200 to obtain resource consumption parameters of the program source code executing in the local environment. Example resource consumption levels may include memory usage, processor usage, network bandwidth usage, power usage, cooling resource usage, and the like. The resource consumption levels may be associated, in some examples, with particular code elements of the program source code, for example, based on unique IDs or other annotations in the program source code. The processor 200 further adds the resource consumption parameters to the program source code data. [0030] In other examples, other forms of computing resources, such as lambda functions, and the respective configurations of said resources may be queried as an execution parameter and included in the program source code data. As will be appreciated, in other examples, other sampling methods may also be employed, and the resulting parameters included in the program source code data. [0031] The transmission instructions 214, when executed, cause the processor 200 to send the program source code data to the common data repository 104 via the network 106. The processor 200 may further send a request for a projected resource consumption level to the server 108. In particular, the request may include a runtime condition for which a projected resource consumption level is sought. In some examples, the request sent to the server 108 may include the program source code data. For example, rather than transmitting the program source code data directly to the common data repository 104, the client device 102-4 may transmit the program source code
data to the server 108, which, in turn, may store the program source code data at the common data repository 104. Responsive to an indication of the projected resource consumption level, the processor 200 may output, at a display, the projected resource consumption level and the runtime condition. [0032] The client device 102-1 further includes a communications interface 216 interconnected with the processor 200. The communications interface 216 includes suitable hardware (e.g., transmitters, receivers, network interface controllers and the like) allowing the client device 102-1 to communicate with other computing devices, such as the server 108. The specific components of the communications interface 216 are selected based on the type of network or other links that the client device 102-1 communicates over. [0033] FIG.3 depicts certain internal components of the server 108. The server 108 includes a processor 300, which may include a central processing unit (CPU), a microcontroller, a microprocessor, a processing core, or similar device capable of executing instructions. [0034] The processor 300 may also include or be interconnected with a non- transitory machine-readable storage medium, such as a memory 302, that may be electronic, magnetic, optical, or other physical storage device that stores executable instructions. In particular, the memory 302 may store an application 304 for generating projected resource consumption levels. The application 304 includes request processing instructions 306, model application instructions 308, related service instructions 310, feedback generation instructions 312, and output instructions 314. It will be understood that execution of the instructions 306, 308, 310, 312, and 314 by the processor 300 configures the server 108 or the processor 300 to perform the functionality described herein. [0035] The request processing instructions 306, when executed, cause the processor 300 to process a request for a projected resource consumption level received at the server 108. In particular, the request may indicate a target program source code for which a projected resource consumption level is sought. The processor 300 may therefore obtain the target program source
code, for example by extracting the target program source code from the request or retrieving the target program source code from the common data repository 104. [0036] The model application instructions 308, when executed, cause the processor 300 to apply a model to the target program source code to generate the projected resource consumption level. [0037] For example, the memory 302 may additionally store a machine learning model 316 for projecting resource consumption levels. The machine learning model 316 may utilize the aggregate program code data stored at the common data repository 104 to generate projected resource consumption levels. For example, the machine learning model 316 may receive a target program source code and compare annotation data of the target program source code to annotation data of other program source codes in the common data repository 104. By comparing the annotation data, the machine learning model 316 may identify program source codes from the common data repository 104 which may provide insights as to projected resource consumption levels of the target program source code. For example, program source codes having similarly annotated code elements or similar structure to the target program source code may be identified. The machine learning model 316 may aggregate resource consumption levels of the identified program source codes and evaluate the local operating environment parameters in view of the aggregate resource consumption levels to determine the projected resource consumption levels of the target program source code. [0038] Accordingly, the model application instructions 308 may apply the machine learning model 316 to the target program source code and as a result, obtain projected resource consumption levels of the target program source code. [0039] The related service instructions 310, when executed, cause the processor 300 to identify a related service program code associated with the target program source code, obtain a related service resource consumption
level, and generate a projected resource consumption level of the target program source code based at least in part on the related service resource consumption level. [0040] The feedback generation instructions 312, when executed, cause the processor 300 to generate feedback for the target program source code based on the projected resource consumption level. Generally, the feedback is to increase the efficiency of the target program source code, for example by reducing computational complexity, resources required, or costs associated with the resources utilized. [0041] The output instructions 314, when executed, cause the processor 300 to send an indication of the projected resource consumption levels for the target program source code to the requesting client device. [0042] Referring now to FIG.4, an example method 400 of generating projected resource consumption levels is depicted. The performance of the method 400 is described in conjunction with its performance in the system 100, and in particular, by the server 108 via execution of the application 304 by the processor 300, with reference to the components in the system 100. In other examples, the method 400 may be performed by other suitable devices or systems. [0043] The method 400 is initiated at block 402. At block 402, the server 108 receives a request for a projected resource consumption level. In the present example, the client device 102-1 may initiate the request for a projected resource consumption level. The request indicates a target program source code for which a projected resource consumption level is sought, and may further indicate a runtime condition under which the projected resource consumption level is sought. [0044] In some examples, the request may include the target program source code. For example, the client device 102-1 may send target program source code data to the server 108. In such examples, the server 108 may
extract the target program source code from the target program source code data. In addition to the target program source code, the server 108 may additionally receive, as part of the target program source code data, annotation data identifying annotations, such as unique IDs and the like, of particular code elements in the target program source code, local operating environment parameters of an instance of execution of the target program source code, and local resource consumption parameters of the instance of execution of the target program source code. [0045] In some examples, in response to receiving the target program source code data from the client device 102-1, the server 108 may store the target program source code data at the common data repository 104. [0046] In other examples, the request may simply include an identifier of the target program source code, and hence, the server 108 may use the identifier to retrieve the target program source code and associated annotation data, local operating environment parameters, and resource consumption parameters from the common data repository 104. [0047] The runtime conditions may specify particular operating environment parameters (i.e., specifying particular machine capacities), a designated environment (i.e., a particular server, public cloud environment or the like), or similar for executing the target program source code for which the projected resource consumption level is sought. [0048] At block 404, the server 108 generates a projected resource consumption level for the target program source code. [0049] For example, referring to FIG.5, an example method 500 of generating a projected resource consumption level is depicted. [0050] At block 502, the server 108 applies a model to the target program source code to generate projected resource consumption levels for the target program source code under the specified runtime condition. In particular, the model utilizes the target program source code data and the aggregate source
code data from the common data repository 104 to generate the projected resource consumption levels for the target program source code. [0051] For example, the server 108 may use the annotation data for the target program source code to identify similar program source code stored at the common data repository 104. Similar program source code may be identified based on the annotation data (e.g., having similarly annotated code elements, program structure, or the like), local resource consumption levels, or the like. Based on the similar program source code, the server 108 may aggregate respective resource consumption levels for the similar program source code under various runtime conditions. The server 108 may thus use the resource consumption levels to extrapolate a projected resource consumption level for the target program source code under the specified runtime condition. [0052] As will be appreciated, in other examples, the model applied by the server 108 may perform other suitable operations to generate a projected resource consumption level for the target program source code under the specified runtime condition. In particular, the model applied by the server 108 may be, for example, the machine learning model 316. In other examples, other models, such as an arithmetic average, may also be applied to generate the projected resource consumption levels for the target program source code. [0053] At block 504, the server 108 generates projected resource consumption levels based on a related service associated with the target program source code. [0054] For example, the server 108 may use the annotation data to identify a related service program code stored in the common data repository 104, which is associated with the target program source code. The related service program code may include services on which the target program source code relies or references, or services which are otherwise executed concurrently as the target program source code.
[0055] Having identified the related service program code, the server 108 may retrieve or otherwise obtain a related service resource consumption level for the related service program code. For example, when the related service resource consumption level under the specified runtime conditions is available in the common data repository 104, the server 108 may simply retrieve said value. In other examples, the server 108 may apply a model, such as the machine learning model 316 to the related service program code, for example, as described in relation to block 404, to obtain the related service resource consumption level. [0056] The server 108 may then use the related service resource consumption level to generate the projected resource consumption level of the target program source code under the specified runtime conditions. As will be appreciated, the blocks 404 and 406 may be performed concurrently with one another, and in some examples, may influence one another. [0057] At block 506, the server 108 may generate feedback for the target program source code. The feedback may be based on the aggregate program source code data, the related service program code data, combinations of the above, and similar. [0058] For example, the server 108 may compare the projected resource consumption level to the available resources. In particular, the server 108 may utilize the annotation data of the target program source code to evaluate minimum, average and maximum usages and compare the projected resource consumption levels across broader runtime conditions based on the aggregate program source code data. If the target program code generally has a projected resource consumption level utilizing less than a threshold percentage of available resources, this underutilization may be flagged to be potentially moved to a resource with lower capacity, therefore reducing costs. [0059] In some examples, the feedback may include recommendations for improving the efficiency (i.e., the projected resource consumption level) based on the aggregate program code data. For example, based on annotation data of
the aggregate program code data, the server 108 may determine replacement code elements to improve the projected resource consumption level. [0060] Returning to FIG.4, at block 406, the server 108 outputs the projected resource consumption level. For example, the server 108 may send an indication of the projected resource consumption level to the client device 102- 1. The projected resource consumption level may be displayed at a display of the client device 102-1. In some examples, in addition to the projected resource consumption level, the server 108 may return the runtime conditions for the projected resource consumption level. The server 108 may additionally return any feedback generated block 506. [0061] As described above, an example system and method for generating projected resource consumption levels may store aggregate program source code data at a common data repository. By aggregating the program source code data at the common data repository, and combining annotation data from instrumented program source codes, the data may be analyzed to determine key metrics of application performance including resource consumption levels. The projected resource consumption levels and other feedback may be returned to developers in near-real time to integrate during the development process. [0062] Advantageously, analyzing multiple program source codes across multiple resources and configurations provides insight into how the program source code may perform in different configurations, and under different runtime conditions (i.e., under different workloads, in different environments). The aggregation of program source code data at the common data repository additionally supports the integration and composition of different, but related services (e.g., which are executed concurrently, or which reference one another). By providing developers with feedback on the cost and projected resource consumption levels, applications may be optimized for performance in a production environment, while reducing development time may be reduced, and increasing accuracy of budget forecasting.
[0063] The scope of the claims should not be limited by the above examples, but should be given the broadest interpretation consistent with the description as a whole.
Claims
CLAIMS 1. A method comprising: storing, at a common data repository, aggregate program source code data including program source codes and respective local resource consumption levels; receiving a request for a projected resource consumption level for a target program source code; generating, based on the target program source code and aggregate program source code data, the projected resource consumption level for the target program source code; and outputting the projected resource consumption level. 2. The method of claim 1, wherein the request includes the target program source code and a local resource consumption level for the target program source code; and wherein the projected resource consumption level is further based on the local resource consumption level for the target program source code. 3. The method of claim 1, wherein the request further comprises a runtime condition; and wherein the projected resource consumption level is generated for the target program source code under the runtime condition. 4. The method of claim 1, wherein generating the projected resource consumption level comprises: aggregating the respective local resource consumption levels of the program source codes stored at the common data repository in a machine learning model; and
applying the machine learning model to the target program source code to generate the projected resource consumption level. 5. The method of claim 1, further comprising generating a recommendation for the target program source code based on the projected resource consumption level and outputting the recommendation with the projected resource consumption level. 6. The method of claim 1, wherein generating the projected resource consumption level comprises: identifying a related service program code associated with the target program source code; obtaining a related service resource consumption level for the related service program code; and wherein the projected resource consumption level is further based on the related service resource consumption level. 7. A server comprising: a memory storing a model for projecting resource consumption levels based on aggregate program source code data; a communications interface to communicate with a client device; and a processor interconnected with the memory and the communications interface, the processor to: receive, from the client device, a request for a projected resource consumption level for a target program source code; obtain the target program source code;
apply the model to the target program source code to obtain the projected resource consumption level for the target program source code; and send an indication of the projected resource consumption level to the client device. 8. The server of claim 7, wherein the model comprises a machine learning model. 9. The server of claim 7, wherein, to obtain the projected resource consumption level for the target program source code, the model is to: identify, based on annotation data of the target program source code, similar program source code from the aggregate program source code data; aggregate respective local resource consumption levels for the similar program source code; and extrapolate the projected resource consumption level based on the respective local resource consumption levels for the similar program source code. 10. The server of claim 7, wherein the request includes target program source code data; and wherein the processor is further to, in response to the request, store the target program source code data at a common data repository. 11. The server of claim 10, wherein the target program source code data includes: annotation data identifying code elements within the target program source code; local operating environment parameters of an instance of execution of the target program source code; and local resource consumption parameters of the instance of execution of the target program source code. 12. The server of claim 7, wherein the processor is further to:
identify a related service program source code associated with the target program source code; apply the model to the related service program source code to obtain a related service resource consumption level; and generate the projected resource consumption level for the target program source code in view of the related service resource consumption level. 13. A non-transitory machine-readable storage medium storing machine- readable instructions, which, when executed, cause a processor of a computing device to: execute program source code and in response, generate program source code data, the program source code data including the program source code; send the program source code data to a common data repository; and send, to a server, a request for a projected resource consumption level for the program source code, the request including a runtime condition for the projected resource consumption level of the program source code. 14. The non-transitory machine-readable storage medium of claim 13, wherein, to generate program source code data, the instructions, when executed, cause the processor to: generate annotation data identifying code elements within the program source code; obtain local operating environment parameters of the computing device during execution of the program source code; and obtain resource consumption parameters of the computing device during execution of the program source code. 15. The non-transitory machine-readable storage medium of claim 13, wherein the instructions, when executed, further cause the processor to, responsive to an indication of the projected resource consumption level, output, at a display, the projected resource consumption level and the runtime condition.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/US2020/048290 WO2022046061A1 (en) | 2020-08-27 | 2020-08-27 | Generating projected resource consumption levels based on aggregate program source codes |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/US2020/048290 WO2022046061A1 (en) | 2020-08-27 | 2020-08-27 | Generating projected resource consumption levels based on aggregate program source codes |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2022046061A1 true WO2022046061A1 (en) | 2022-03-03 |
Family
ID=80355568
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/US2020/048290 Ceased WO2022046061A1 (en) | 2020-08-27 | 2020-08-27 | Generating projected resource consumption levels based on aggregate program source codes |
Country Status (1)
| Country | Link |
|---|---|
| WO (1) | WO2022046061A1 (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20220300280A1 (en) * | 2021-03-18 | 2022-09-22 | Dell Products, L.P. | Predictive build quality assessment |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20100083248A1 (en) * | 2008-09-30 | 2010-04-01 | Wood Timothy W | Optimizing a prediction of resource usage of multiple applications in a virtual environment |
| US20120079497A1 (en) * | 2010-09-29 | 2012-03-29 | International Business Machines Corporation | Predicting Resource Requirements for a Computer Application |
| US20170212829A1 (en) * | 2016-01-21 | 2017-07-27 | American Software Safety Reliability Company | Deep Learning Source Code Analyzer and Repairer |
-
2020
- 2020-08-27 WO PCT/US2020/048290 patent/WO2022046061A1/en not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20100083248A1 (en) * | 2008-09-30 | 2010-04-01 | Wood Timothy W | Optimizing a prediction of resource usage of multiple applications in a virtual environment |
| US20120079497A1 (en) * | 2010-09-29 | 2012-03-29 | International Business Machines Corporation | Predicting Resource Requirements for a Computer Application |
| US20130080142A1 (en) * | 2010-09-29 | 2013-03-28 | International Business Machines Corporation | Predicting Resource Requirements for a Computer Application |
| US20170212829A1 (en) * | 2016-01-21 | 2017-07-27 | American Software Safety Reliability Company | Deep Learning Source Code Analyzer and Repairer |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20220300280A1 (en) * | 2021-03-18 | 2022-09-22 | Dell Products, L.P. | Predictive build quality assessment |
| US11847446B2 (en) * | 2021-03-18 | 2023-12-19 | Dell Products, L.P. | Predictive build quality assessment |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8225291B2 (en) | Automated detection of application performance bottlenecks | |
| Panda et al. | Proxy benchmarks for emerging big-data workloads | |
| Malik et al. | System and architecture level characterization of big data applications on big and little core server architectures | |
| CN105247493A (en) | Identifying impacted tests from statically collected data | |
| Muraña et al. | Characterization, modeling and scheduling of power consumption of scientific computing applications in multicores | |
| EP3808099B1 (en) | Real time telemetry monitoring tool | |
| Marantos et al. | A flexible tool for estimating applications performance and energy consumption through static analysis | |
| Gutiérrez Hermosillo Muriedas et al. | perun: Benchmarking energy consumption of high-performance computing applications | |
| Fu et al. | Llmco2: Advancing accurate carbon footprint prediction for llm inferences | |
| Ferreira da Silva et al. | Accurately simulating energy consumption of I/O-intensive scientific workflows | |
| US8812659B2 (en) | Feedback-based symptom and condition correlation | |
| WO2022046061A1 (en) | Generating projected resource consumption levels based on aggregate program source codes | |
| Spafford et al. | Automated design space exploration with aspen | |
| Proficz et al. | Performance and power-aware modeling of MPI applications for cluster computing | |
| AL NIDAWI et al. | ENERGY CONSUMPTION PATTERNS OF MOBILE APPLICATIONS IN ANDROID PLATFORM: A SYSTEMATIC LITERATURE REVIEW. | |
| Procaccianti | Energy-efficient software | |
| Badawy et al. | Optimizing thin client caches for mobile cloud computing: Design space exploration using genetic algorithms | |
| Kasioulis et al. | Power estimation models for edge computing devices | |
| Liu et al. | Automatic performance debugging of SPMD-style parallel programs | |
| Voevodin et al. | Universal assessment system for analyzing the quality of supercomputer resources usage | |
| Ferro et al. | Challenges in HPC evaluation: Towards a methodology for scientific application requirements | |
| Wang et al. | Ainet0: AI Forecasting Based Carbon Neutral Cloud Resource Management for Net Zero Targets | |
| Müller | Ml-based power consumption prediction models for edge devices | |
| Ghari et al. | SparkPerf: A Machine Learning Benchmarking Framework for Spark-based Data Science Projects | |
| Patel et al. | Preliminary scaling characterization of tpcx-ai |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20951785 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 20951785 Country of ref document: EP Kind code of ref document: A1 |