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

5.27. PLVtmr: Program Performance Analyzer

The PLVtmr (PL/Vision TiMeR) package allows you to measure the elapsed time of PL/SQL code; it provides a programmatic layter around the GET_TIME function of Oracle's DBMS_UTILITY package. See Chapter 14 for details.

5.27.1. Control execution of timings

PROCEDURE turn_on;

Enables the timing package. All PLVtmr programs will execute as requested.

PROCEDURE turn_off;

Disables PLVtmr. Calls to timing programs will be ignored.

5.27.2. Setting the repetition value

PROCEDURE set_repeats (repeats_in IN NUMBER);

Sets the number of repetitions for all timing loops implemented inside the PLVtmr package (calibrate, func, currsucc, currfail).

FUNCTION repeats RETURN NUMBER;

Returns the current repetition value.

5.27.3. Setting the factoring value

PROCEDURE set_factor (factor_in IN NUMBER);

Sets the number of iterations when calling PLVtmr in a loop. This value allows PLVtmr to show total and individual elapsed times.

FUNCTION factor RETURN NUMBER;

Returns the current number of iterations.

5.27.4. Capturing the current timestamp

PROCEDURE capture (context_in IN VARCHAR2 := NULL);

Calls capture to capture the current timestamp (usually the start time of an elapsed time calculation). You can provide an optional context for the timing.

5.27.5. Retrieving and displaying elapsed time

FUNCTION elapsed RETURN NUMBER;

Returns the number of hundredths of seconds elapsed since last call to capture.

FUNCTION elapsed_message (prefix_in IN ...

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