Elapsed time indications for source code in development environment
AssigneeInternational Business Machines Corporation
InventorsBenjamin D. Cox, Daniel P. Craggs, Christopher J. Poole
Life of this patent
Estimating the term…
Abstract
Method and system are provided for providing elapsed time indications for source code in a development environment. The method includes: defining blocks of source code to be timed during source code execution; monitoring defined blocks of source code during execution to determine an elapsed time for the execution of the defined block of source code; recording the elapsed time for a defined block of source code; and providing an elapsed time indication for the defined block of source code.
Claims19
A computer-implemented method, comprising:
- importing, by one or more processors, source code, into an integrated development environment;
- defining, by the one or more processors, blocks of the source code to be timed during source code execution in the integrated development environment, wherein the defining comprises setting breakpoints in the source code to differentiate the blocks, wherein each block comprises a line of the source code;
- executing, by the one or more processors, the source code, in the integrated development environment repetitively;
- monitoring defined blocks of the source code during the repetitive executing to determine, for each iteration, an elapsed time and an average elapsed time for the execution of each defined block of the defined blocks of the source code and a standard deviation for each defined block of the defined blocks;
- annotating a specific defined block of the source code of the defined blocks of source code with the average elapsed time for the specific defined block of the source code and the standard deviation for the specific defined block of the source code;
- and
- subsequent to the annotating, executing, the specific defined block of the source code in the integrated development environment, wherein the executing comprises:
- providing an elapsed time indication for the elapsed time for the specific defined block of the source code by displaying the elapsed time indication in a graphical user interface of the integrated development environment;
- and
- displaying, in the graphical interface, an alert, if the elapsed time exceeds the average elapsed time for the specific defined block of the source code by greater than the standard deviation for the specific defined block of the source code;
- determining, by the one or more processors, that the source code has been changed by a compiler;
- and
- resetting, by the one or more processors, the average elapsed time based on the changed source code, wherein the resetting comprises adjusting the average elapsed time for each of the defined blocks of the changed source code.
A system, comprising:
- one or more memories;
- and
- one or more processors communicatively coupled to the one or more memories, wherein the system performs a method comprising:
- importing, by the one or more processor, source code, into an integrated development environment;
- defining, by the one or more processors, blocks of the source code to be timed during source code execution in the integrated development environment, wherein the defining comprises setting breakpoints in the source code to differentiate the blocks, wherein each block comprises a line of the source code;
- executing, by the one or more processors, the source code, in the integrated development environment repetitively;
- monitoring defined blocks of the source code during the repetitive executing to determine, for each iteration, an elapsed time and an average elapsed time for the execution of each defined block of the defined blocks of the source code and a standard deviation for each defined block of the defined blocks;
- annotating a specific defined block of the source code of the defined blocks of source code with the average elapsed time for the specific defined block of the source code and the standard deviation for the specific defined block of the source code;
- and
- subsequent to the annotating, executing, the specific defined block of the source code in the integrated development environment, wherein the executing comprises:
- providing an elapsed time indication for the elapsed time for the specific defined block of the source code by displaying the elapsed time indication in a graphical user interface of the integrated development environment;
- and
- displaying, in the graphical interface, an alert, if the elapsed time exceeds the average elapsed time for the specific defined block of the source code by greater than the standard deviation for the specific defined block of the source code;
- determining, by the one or more processors, that the source code has been changed by a compiler;
- and
- resetting, by the one or more processors, the average elapsed time based on the changed source code, wherein the resetting comprises adjusting the average elapsed time for each of the defined blocks of the changed source code.
A computer program product comprising:
- a computer readable storage medium having program instructions embodied therewith, the program instructions being executable by a processor to cause the processor to perform a method comprising:
- importing, by the one or more processor, source code, into an integrated development environment;
- defining, by the one or more processors, blocks of the source code to be timed during source code execution in the integrated development environment, wherein the defining comprises setting breakpoints in the source code to differentiate the blocks, wherein each block comprises a line of the source code;
- executing, by the one or more processors, the source code, in the integrated development environment repetitively;
- monitoring defined blocks of the source code during the repetitive executing to determine, for each iteration, an elapsed time and an average elapsed time for the execution of each defined block of the defined blocks of the source code and a standard deviation for each defined block of the defined blocks;
- annotating a specific defined block of the source code of the defined blocks of source code with the average elapsed time for the specific defined block of the source code and the standard deviation for the specific defined block of the source code;
- and
- subsequent to the annotating, executing, the specific defined block of the source code in the integrated development environment, wherein the executing comprises:
- providing an elapsed time indication for the elapsed time for the specific defined block of the source code by displaying the elapsed time indication in a graphical user interface of the integrated development environment;
- and
- displaying, in the graphical interface, an alert, if the elapsed time exceeds the average elapsed time for the specific defined block of the source code by greater than the standard deviation for the specific defined block of the source code;
- determining, by the one or more processors, that the source code has been changed by a compiler;
- and
- resetting, by the one or more processors, the average elapsed time based on the changed source code, wherein the resetting comprises adjusting the average elapsed time for each of the defined blocks of the changed source code.
Dependencies are inferred from the claim text.