The present invention relates to application development and more particularly to collecting and outputting runtime information for software applications running on a computing system.
Developing software applications can be difficult. Typically, the development process results in errors during compilation that must be debugged before the final program is complete. Debugging these errors can be complex and difficult, especially as the software application becomes more complex. Inadequate debugging tools and/or weak instrumentation data often compound this difficulty. In addition, complex applications demand optimization to conserve memory, processing time, or other overhead considerations. Therefore, improvements are desirable.
In accordance with the present invention, the above and other problems are solved by the following:
In one aspect of the present invention, a method of collecting runtime information for an application in a computing system is described. The method includes locating trace statements in a source code of the application, collecting information regarding the trace statements, and outputting the information for use by a user.
In another aspect of the present invention, a system for collecting runtime information for an application in a computing system is described. The system includes a locate module, a collect module, and an output module. The locate module locates trace statements in a source code of an application. The collect module collects information regarding the trace statements. The output module outputs the information for use by a user.
The invention may be implemented as a computer process, a computing system, or as an article of manufacture such as a computer program product. The computer program product may be a computer storage medium readable by a computer system and encoding a computer program of instructions for executing a computer process. The computer program product may also be a propagated signal on a carrier readable by a computing system and encoding a computer program of instructions for executing a computer process.
A more complete appreciation of the present invention and its scope may be obtained from the accompanying drawings, that are briefly described below, from the following detailed descriptions of presently preferred embodiments of the invention and from the appended claims.
Referring now to the drawings in which like reference numbers represent corresponding parts throughout:
In the following description of preferred embodiments of the present invention, reference is made to the accompanying drawings that form a part hereof, and in which is shown by way of illustration specific embodiments in which the invention may be practiced. It is understood that other embodiments may be utilized and structural changes may be made without departing from the scope of the present invention.
In general, the present disclosure describes methods, systems, and an article of manufacture containing the methods for tracing in a software application on a computing system. Trace statements can be inserted throughout the source code. The trace function can be enabled or disabled. When enabled, the trace system will track information about the trace statements, cookie information, header information, form variables, query strings, application state objects, session state objects, control tree, and server variables. When disabled, the trace statements are ignored at run time. The collected information can be output to the bottom of the page rendered or to a separate application.
This type of debugging structure provides cross-language debugging support that can be used both locally and remotely from a web server. The trace capability enables both controls and page developers to append instrumentation messages through their source code. These instrumentation messages can be used to simplify the process of identifying what occurs during a given web request and help track down resulting problems.
This process has numerous advantages. One such advantage is that the tracing function provides a secure, accessible means for collecting and viewing runtime information about an application that developers can use to monitor request execution. Another such advantage is that this function provides a general mechanism for outputting debug statements during request execution, to a trace viewer application or to the browser window.
Referring now to
FIG. 2 and the following discussion are intended to provide a brief, general description of a suitable computing environment in which the invention might be implemented. Although not required, the invention is described in the general context of computer-executable instructions, such as program modules, being executed by a computing system. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types.
Those skilled in the art will appreciate that the invention might be practiced with other computer system configurations, including handheld devices, palm devices, multiprocessor systems, microprocessor-based or programmable consumer electronics, network personal computers, minicomputers, mainframe computers, and the like. The invention might also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules might be located in both local and remote memory storage devices.
Referring now to
Preferably, the system memory 204 includes read only memory (ROM) 208 and random access memory (RAM) 210. A basic input/output system 212 (BIOS), containing the basic routines that help transfer information between elements within the computing system 200, such as during start-up, is typically stored in the ROM 208.
Preferably, the computing system 200 further includes a secondary storage is device 213, such as a hard disk drive, for reading from and writing to a hard disk (not shown), and a compact flash card 214.
The hard disk drive 213 and compact flash card 214 are connected to the system bus 206 by a hard disk drive interface 220 and a compact flash card interface 222, respectively. The drives and cards and their associated computer-readable media provide nonvolatile storage of computer readable instructions, data structures, program modules and other data for the computing system 200.
Although the exemplary environment described herein employs a hard disk drive 213 and a compact flash card 214, it should be appreciated by those skilled in the art that other types of computer-readable media, capable of storing data, can be used in the exemplary system. Examples of these other types of computer-readable mediums include magnetic cassettes, flash memory cards, digital video disks, Bernoulli cartridges, CD ROMS, DVD ROMS, random access memories (RAMs), read only memories (ROMs), and the like.
A number of program modules may be stored on the hard disk 213, compact flash card 214, ROM 208, or RAM 210, including an operating system 226, one or more application programs 228, other program modules 230, and program data 232. A user may enter commands and information into the computing system 200 through an input device 234. Examples of input devices might include a keyboard, mouse, microphone, joystick, game pad, satellite dish, scanner, and a telephone. These and other input devices are often connected to the processing unit 202 through an interface 240 that is coupled to the system bus 206. These input devices also might be connected by any number of interfaces, such as a parallel port, serial port, game port, or a universal serial bus (USB). A display device 242, such as a monitor, is also connected to the system bus 206 via an interface, such as a video adapter 244. The display device 242 might be internal or external. In addition to the display device 242, computing systems, in general, typically include other peripheral devices (not shown), such as speakers, printers, and palm devices.
When used in a LAN networking environment, the computing system 200 is connected to the local network through a network interface or adapter 252. When used in a WAN networking environment, such as the Internet, the computing system 200 typically includes a modem 254 or other means, such as a direct connection, for establishing communications over the wide area network. The modem 254, which can be internal or external, is connected to the system bus 206 via the interface 240. In a networked environment, program modules depicted relative to the computing system 200, or portions thereof, may be stored in a remote memory storage device. It will be appreciated that the network connections shown are exemplary and other means of establishing a communications link between the computing systems may be used.
The computing system 200 might also include a recorder 260 connected to the memory 204. The recorder 260 includes a microphone for receiving sound input and is in communication with the memory 204 for buffering and storing the sound input. Preferably, the recorder 260 also includes a record button 261 for activating the microphone and communicating the sound input to the memory 204.
A computing device, such as computing system 200, typically includes at least some form of computer-readable media. Computer readable media can be any available media that can be accessed by the computing system 200. By way of example, and not limitation, computer-readable media might comprise computer storage media and communication media.
Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and that can be accessed by the computing system 200.
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. The term “modulated data signal” means 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, RF, infrared, and other wireless media. Combinations of any of the above should also be included within the scope of computer-readable media. Computer-readable media may also be referred to as computer program product.
Referring now to
In this three-tier architecture, the database tier 306 is the ultimate repository of information or data. The client tier 302 provides the user-interface logic for interfacing with a user of the three-tier architecture. The server tier 304 typically contains the business rules and controls the interface between the client tier 302 and the database tier 306. The client tier 302 typically interacts with the server tier 304, which in turn interacts with the database tier 306 to update the database 326 and retrieve data from the database.
Many users can interface with the server tier 304 simultaneously through a router 328. As stated previously, the client tier 302 might contain several, thousands, or millions of client computing systems 308, 310, 312, 314, for example a web browser or a rich client. All of these computing systems 308, 310, 312, 314 interact with the router 328 sending requests to the server tier 304 for information and receiving information back from the server tier 304. For example, the client computing system 308 might request a list of books for sale from the server tier 304. The client computing system 308 sends the request to the router 328. The router 328 routes the request to a server computing system, such as the server computing system 316, for example a web server or network server. The router 328 might be a dumb router or a smart router as is commonly known. Preferably, the router 328 routes the client requests based on load. In other words, the router 328 determines which server computing system 316, 318, 320, 322, 324 in the server tier 304 has the most capacity available at the time of the request and accordingly routes the request.
The server computing system 316 receives the request from the client computing system 308, through the router 328, and accesses the database 326 to retrieve the requested information. The database 326 sends the requested information to the server computing system 316. The server computing system 316 processes or formats the information and returns the resulting information to the client computing system 308 through the router 328 for use by the user. As the number of requests to the server tier 304 increases, more server computing systems can be added to the server tier 304. Thus, the multi-tier architecture is scalable.
Typically, by default the trace function is not enabled on a page, such that the “Trace.IsEnabled” variable will return false. It is noted that the trace function can be enabled and disabled at any point within the source code. Thus, if a user wanted trace information for only a portion of the application, the above syntax can be inserted at the point in the source code that the user wants to begin tracing. The following syntax can be inserted at the point in the source code that the user wants to stop tracing:
If the detect module 404 detects that the trace function is not enabled, operational flow branches “NO” to the ignore operation 406. The ignore operation 406 ignores the trace statements and no messages will be output during a web request. Ignoring the trace statements saves system performance. Operational flow proceeds to termination point 408 where operational flow ends.
If the detect module 404 detects that the trace function is enabled, or, in other words, that a true value is returned for the “Trace.IsEnabled” variable, operational flow branches “YES” to a locate operation 410. The locate operation 410 locates the trace statements within the source code that occurred during a web request. Preferably, these trace statements are placed in the source code by a user. The trace property is exposed in the HttpContext for a request. The trace property is also available directly from the Page class. The trace statements can be organized using a “category” string. For example, the following is a sample page containing a trace statement:
Preferably, trace messages can be organized by using a “tracemode” attribute exposed on the page directive. A value of “SortByTime” will cause the trace messages to be output in the order in which they were written. A value of “SortByCategory” will cause the trace messages to be output alphabetically by category.
A collect operation 412 collects runtime information for the trace statements. Such runtime information might include when did the request occur; what was the http status code; and what was the request type, i.e., get, or a post request.
A control operation 414 collects server control information, or the tree of controls for a page. For example, the page might contain a form that contains a text box and a button. The following is an example control using tracing:
An output operation 422 will output all of the runtime information, including the information collected by the collect operation 412, the control operation 414, the cookie operation 416, the header operation 418, and the variable operation 420, for use by the user. A find operation 424 finds an output configuration. An output module 426 detects whether the output configuration dictates output to a separate application. If the output module 426 determines that the output configuration does not dictate output to a separate application, operational flow branches “NO” to the page operation 428. The page operation 428 outputs the information collected by the output operation 422 to the bottom of the page being rendered. Preferably, displaying the output to the bottom of the page is the default display mode. Thus, the Page class will automatically output an HTML table at the conclusion of page rendering that details all of the assorted category trace logs. For example:
Operational flow terminates at termination point 408.
If the output module 426 determines that the output configuration does dictate output to a separate application, operational flow branches “YES” to a separate operation 430. The separate operation 430 directs the output to a separate application. Of course, the tracing system 400 might also check for enablement of output to the bottom of the page as described above after outputting to a separate application. Outputting the runtime information to a separate application has advantages. One such advantage is that the application can be run without the user, who is running the application, seeing the output while a separate user views the output information. Operational flow terminates at termination point 408.
The operational flow chart depicted in
In another application example, the developer has enabled the trace function. The detect module 404 detects that the trace function is enabled, and operational flow branches “YES” to the locate operation 410. The locate operation 410 locates the trace statements. The collection operation 412 collects information for the trace statements. The control operation 414 collect server control operation. The cookie operation 416 collects cookie information. The header operation 418 collects header information. The server operation 420 collects server information.
The output operation 422 outputs the runtime information collected by the collection operation 412, the control operation 414, the cookie operation 416, header operation 418, and the server operation 420. The detect operation 424 detects that the output configuration for outputting the runtime information is to the bottom of the page being rendered. The output module 426 detects that the output is not to a separate application, and operational branches “NO” to the page operation 428. Operational flow ends at termination point 408.
In another application example, operational flow proceeds as described above to the detect operation 424. The detect operation 424 detects that the output configuration dictates outputting to a separate application. The output module 426 detects outputting to a separate application, and operational flow branches “YES” to the separate operation 430. The separate operation 430 outputs the runtime information to a separate application. Operational flow ends at termination point 408.
The logical operations of the various embodiments illustrated herein are is implemented (1) as a sequence of computer implemented steps or program modules running on a computing system and/or (2) as interconnected logic circuits or circuit modules within the computing system. The implementation is a matter of choice dependent on the performance requirements of the computing system implementing the invention. Accordingly, the logical operations making up the embodiments of the present invention described herein are referred to variously as operations, steps, engines, or modules.
The various embodiments described above are provided by way of illustration only and should not be construed to limit the invention. Those skilled in the art will readily recognize various modifications and changes that may be made to the present invention without following the example embodiments and applications illustrated and described herein, and without departing from the true spirit and scope of the present invention, which is set forth in the following claims.
| Number | Name | Date | Kind |
|---|---|---|---|
| 3937925 | Boothroyd | Feb 1976 | A |
| 3956615 | Anderson et al. | May 1976 | A |
| 4186871 | Anderson et al. | Feb 1980 | A |
| 4807154 | Scully et al. | Feb 1989 | A |
| 4847785 | Stephens | Jul 1989 | A |
| 4949300 | Christenson et al. | Aug 1990 | A |
| 4979148 | Bush et al. | Dec 1990 | A |
| 5299315 | Chin et al. | Mar 1994 | A |
| 5349657 | Lee | Sep 1994 | A |
| 5388156 | Blackledge, Jr. et al. | Feb 1995 | A |
| 5465332 | Deloye et al. | Nov 1995 | A |
| 5517655 | Collins et al. | May 1996 | A |
| 5548340 | Bertram | Aug 1996 | A |
| 5550560 | Kanada et al. | Aug 1996 | A |
| 5604908 | Mortson | Feb 1997 | A |
| 5638176 | Hobbs et al. | Jun 1997 | A |
| 5640449 | Worley et al. | Jun 1997 | A |
| 5664228 | Mital | Sep 1997 | A |
| 5675520 | Pitt, III et al. | Oct 1997 | A |
| 5706505 | Fraley et al. | Jan 1998 | A |
| 5732256 | Smith | Mar 1998 | A |
| 5732267 | Smith | Mar 1998 | A |
| 5745103 | Smith | Apr 1998 | A |
| 5748890 | Goldberg et al. | May 1998 | A |
| 5774670 | Montulli | Jun 1998 | A |
| 5793982 | Shrader et al. | Aug 1998 | A |
| 5812996 | Rubin et al. | Sep 1998 | A |
| 5835724 | Smith | Nov 1998 | A |
| 5855020 | Kirsch | Dec 1998 | A |
| 5878141 | Daly et al. | Mar 1999 | A |
| 5878282 | Mital | Mar 1999 | A |
| 5897622 | Blinn et al. | Apr 1999 | A |
| 5911068 | Zimmerman et al. | Jun 1999 | A |
| 5918007 | Blackledge, Jr. et al. | Jun 1999 | A |
| 5940075 | Mutschler, III et al. | Aug 1999 | A |
| 5940847 | Fein et al. | Aug 1999 | A |
| 5949300 | Christenson et al. | Sep 1999 | A |
| 5953524 | Meng et al. | Sep 1999 | A |
| 5956489 | San Andres et al. | Sep 1999 | A |
| 5961601 | Iyengar | Oct 1999 | A |
| 5963952 | Smith | Oct 1999 | A |
| 5983227 | Nazem et al. | Nov 1999 | A |
| 5991802 | Allard et al. | Nov 1999 | A |
| 6006230 | Ludwig et al. | Dec 1999 | A |
| 6014637 | Fell et al. | Jan 2000 | A |
| 6014666 | Helland et al. | Jan 2000 | A |
| 6032207 | Wilson | Feb 2000 | A |
| 6038551 | Barlow et al. | Mar 2000 | A |
| 6067578 | Zimmerman et al. | May 2000 | A |
| 6072664 | Aoyagi et al. | Jun 2000 | A |
| 6076108 | Courts et al. | Jun 2000 | A |
| 6101607 | Bachand et al. | Aug 2000 | A |
| 6108717 | Kimura et al. | Aug 2000 | A |
| 6115744 | Robins | Sep 2000 | A |
| 6121968 | Arcuri et al. | Sep 2000 | A |
| 6138150 | Nichols et al. | Oct 2000 | A |
| 6167524 | Goodnow et al. | Dec 2000 | A |
| 6178461 | Chan et al. | Jan 2001 | B1 |
| 6185608 | Hon et al. | Feb 2001 | B1 |
| 6202199 | Wygodny et al. | Mar 2001 | B1 |
| 6205480 | Broadhurst et al. | Mar 2001 | B1 |
| 6212192 | Mirashrafi et al. | Apr 2001 | B1 |
| 6218958 | Eichstaedt et al. | Apr 2001 | B1 |
| 6230160 | Chan et al. | May 2001 | B1 |
| 6230313 | Callahan et al. | May 2001 | B1 |
| 6246422 | Emberling et al. | Jun 2001 | B1 |
| 6247044 | Gosling et al. | Jun 2001 | B1 |
| 6253228 | Ferris et al. | Jun 2001 | B1 |
| 6253234 | Hunt et al. | Jun 2001 | B1 |
| 6279151 | Breslau et al. | Aug 2001 | B1 |
| 6286133 | Hopkins | Sep 2001 | B1 |
| 6326957 | Nathan et al. | Dec 2001 | B1 |
| 6334157 | Oppermann et al. | Dec 2001 | B1 |
| 6343148 | Nagy | Jan 2002 | B2 |
| 6351767 | Batchelder et al. | Feb 2002 | B1 |
| 6353447 | Truluck et al. | Mar 2002 | B1 |
| 6354477 | Trummer | Mar 2002 | B1 |
| 6363352 | Dailey et al. | Mar 2002 | B1 |
| 6370561 | Allard et al. | Apr 2002 | B1 |
| 6373841 | Goh et al. | Apr 2002 | B1 |
| 6397253 | Quinlan et al. | May 2002 | B1 |
| 6401099 | Koppolu et al. | Jun 2002 | B1 |
| 6405241 | Gosling et al. | Jun 2002 | B2 |
| 6412008 | Fields et al. | Jun 2002 | B1 |
| 6430575 | Dourish et al. | Aug 2002 | B1 |
| 6460071 | Hoffman | Oct 2002 | B1 |
| 6460141 | Olden | Oct 2002 | B1 |
| 6463442 | Bent et al. | Oct 2002 | B1 |
| 6480894 | Courts et al. | Nov 2002 | B1 |
| 6487665 | Andrews et al. | Nov 2002 | B1 |
| 6505238 | Tran | Jan 2003 | B1 |
| 6539501 | Edwards | Mar 2003 | B1 |
| 6546516 | Wright et al. | Apr 2003 | B1 |
| 6557038 | Becker et al. | Apr 2003 | B1 |
| 6560598 | Delo et al. | May 2003 | B2 |
| 6560618 | Ims | May 2003 | B1 |
| 6564251 | Katariya et al. | May 2003 | B2 |
| 6591272 | Williams | Jul 2003 | B1 |
| 6606418 | Mitchell et al. | Aug 2003 | B2 |
| 6622168 | Datta | Sep 2003 | B1 |
| 6633416 | Benson | Oct 2003 | B1 |
| 6725219 | Nelson et al. | Apr 2004 | B2 |
| 6728421 | Kokemohr | Apr 2004 | B2 |
| 20010054020 | Barth et al. | Dec 2001 | A1 |
| 20020004815 | Muhlestein et al. | Jan 2002 | A1 |
| 20020008703 | Merrill et al. | Jan 2002 | A1 |
| 20020083171 | Hoogenboom et al. | Jun 2002 | A1 |
| 20020108102 | Muhlestein et al. | Aug 2002 | A1 |
| 20020188890 | Shupps et al. | Dec 2002 | A1 |
| 20030009476 | Fomenko et al. | Jan 2003 | A1 |
| 20030009519 | Gosling et al. | Jan 2003 | A1 |
| 20030009567 | Farouk | Jan 2003 | A1 |
| 20030018827 | Gutherie et al. | Jan 2003 | A1 |
| 20030025728 | Ebbo et al. | Feb 2003 | A1 |
| 20030028565 | Landsman et al. | Feb 2003 | A1 |
| 20030074634 | Emmelmann | Apr 2003 | A1 |
| 20030097639 | Niyogi et al. | May 2003 | A1 |
| 20040003112 | Alles et al. | Jan 2004 | A1 |
| 20040003139 | Cottrille et al. | Jan 2004 | A1 |
| 20040003248 | Arkhipov | Jan 2004 | A1 |
| 20040015879 | Pauw et al. | Jan 2004 | A1 |
| 20040073873 | Croney et al. | Apr 2004 | A1 |
| Number | Date | Country |
|---|---|---|
| 01111679 | Dec 2000 | EP |
| 1156415 | Nov 2001 | EP |
| 1164473 | Dec 2001 | EP |
| WO 9821651 | May 1998 | WO |
| WO 9844695 | Oct 1998 | WO |
| WO 9934288 | Jul 1999 | WO |