IP Library Granted Patent US 10,216,605
Granted Patent B2
US 10,216,605 · App. 14/975,902 · Granted Feb 26, 2019

Elapsed time indications for source code in development environment

Inventors: Benjamin D. Cox (Hursley, GB); Daniel P. Craggs (Montreal, CA); Christopher J. Poole (Hursley, GB)
Assignee: International Business Machines Corporation
G06F11/34G06F11/3419G06F11/3466G06F2201/865
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,216,605
App. No.
14/975,902
Granted
Feb 26, 2019
Kind
B2
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.

Claims (52)

1. A method for providing elapsed time indications for source code in a development environment, 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, 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;

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; and

resetting, by the one or more processors, the method, when the source code is run on a different hardware environment.

2. The method of claim 1 , wherein displaying the elapsed time further comprises representing the source code as an abstract representation.

3. The method as claimed in claim 2 , further comprising:

recording the annotation as metadata for the specific defined block in the abstract representation.

4. The method of claim 1 , further comprising:

determining, by the one or more processors, that the elapsed time for the specific defined block of source code differs by a threshold amount from an elapsed time of a previous iteration for the specific defined block of code; and

providing, by the one or more processors, an alert based on the determining.

5. The method of claim 1 , wherein the monitoring comprises parsing the source code during the executing.

6. The method of claim 1 , further comprising:

updating, by the one or more processors, the source code; and

resetting the average elapsed time based on the source code being updated.

7. The method of claim 1 , further comprising:

updating, by the one or more processors, the source code; and

adjusting the average elapsed time for each of the defined blocks of updated source code.

8. The method of claim 1 , wherein the executing is in a debugging mode, further comprising:

allowing for user input in timing values of the blocks in the source code.

9. A system for providing elapsed time indications for source code in a development environment, comprising:

a memory; and

one or more processors communicatively coupled to the memory, 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, 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;

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; and

resetting, by the one or more processors, the method, when the source code is run on a different hardware environment.

10. The system of claim 9 , wherein displaying the elapsed time further comprises representing the source code as an abstract representation.

11. The system of claim 10 , the method further comprising:

recording the annotation as metadata for the specific defined block in the abstract representation.

12. The system of claim 9 , wherein the monitoring comprises parsing the source code during the executing.

13. A computer program product for providing elapsed time indications for source code in a development environment, the 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, 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;

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; and

resetting, by the one or more processors, the method, when the source code is run on a different hardware environment.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 21, 2015
From: COX, BENJAMIN D.; CRAGGS, DANIEL P.; POOLE, CHRISTOPHER J.
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 037336/0848 →
Priority Claims (1)
GB 1422918.1 · Dec 22, 2014 · national
Continuity (1)
Related Publication 20160179654A1 · Jun 23, 2016