Skip to Main Content
Advanced Oracle PL/SQL Programming with Packages
book

Advanced Oracle PL/SQL Programming with Packages

by Steven Feuerstein
October 1996
Intermediate to advanced content levelIntermediate to advanced
687 pages
16h 41m
English
O'Reilly Media, Inc.
Content preview from Advanced Oracle PL/SQL Programming with Packages

14.3. Retrieving and Displaying the Elapsed Time

PLVtmr offers several different programs to retrieve and display the elapsed time: elapsed, elapsed_message, and show_elapsed. To get a non-NULL result from these programs, you must first have called the capture procedure.

The elapsed function returns the number of hundredths of seconds since the last call to capture. Its header is:

FUNCTION elapsed RETURN NUMBER;

You will want to use elapsed when you wish to store the elapsed time, rather than display it, or when you wish to display it in a format not supported by the other programs of PLVtmr.

14.3.1. elapsed_message Function

The elapsed_message function returns the elapsed time displayed within a standard format that incorporates the iteration factor (see Section 14.4). The header for elapsed_message follows:

FUNCTION elapsed_message
   (prefix_in IN VARCHAR2 := NULL,
    adjust_in IN NUMBER := 0,
    reset_in IN BOOLEAN := TRUE,
    reset_context_in IN VARCHAR2 := NULL)
RETURN VARCHAR2;

The first argument, prefix_in, is another "context" string. In addition to the string provided in the call to capture, you can pass additional information to the PLVtmr package to display with the elapsed timing message. The value of the adjust_in argument allows you adjust or calibrate your timing with any overhead computations you may have made. The reset_in argument indicates whether or not the capture procedure should be called to "reset" the starting time of the next elapsed timing. The final argument, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Oracle Database 12c PL/SQL Programming

Oracle Database 12c PL/SQL Programming

Michael McLaughlin
Oracle PL/SQL for DBAs

Oracle PL/SQL for DBAs

Arup Nanda, Steven Feuerstein
Expert Oracle PL/SQL

Expert Oracle PL/SQL

Ron Hardman, Michael McLaughlin

Publisher Resources

ISBN: 1565922387Supplemental ContentCatalog PageErrata