The DBMS_HPROF
package provides an interface for profiling the execution of PL/SQL applications. It provides services for collecting the hierarchical profiler data, analyzing the raw profiler output and profiling information generation.
See Also:
Oracle Database Advanced Application Developer's Guide for more information about the "PL/SQL Hierarchical Profiler"This chapter contains the following topic:
This table list the package subprograms in alphabetical order.
Table 73-1 DBMS_HPROF Package Subprograms
Subprogram | Description |
---|---|
Analyzes the raw profiler output and produces hierarchical profiler information in database tables |
|
Starts hierarchical profiler data collection in the user's session |
|
Stops profiler data collection in the user's session.s |
This function analyzes the raw profiler output and produces hierarchical profiler information in database tables.
DBMS_HPROF.ANALYZE ( location VARCHAR2, filename VARCHAR2, summary_mode BOOLEAN DEFAULT FALSE, trace VARCHAR2 DEFAULT NULL, skip PLS_INTEGER DEFAULT 0, collect PLS_INTEGER DEFAULT NULL, run_comment VARCHAR2 DEFAULT NULL) RETURN NUMBER;
Table 73-2 ANALYZE Function Parameters
Parameter | Description |
---|---|
|
Name of a directory object. The raw profiler data file is read from the file system directory mapped to this directory object. Output files are also written to this directory. |
|
Name of the raw profiler data file to be analyzed. The file must exist in the directory specified by the |
|
By default (that is, when |
|
Analyze only the subtrees rooted at the specified trace entry. By default (when trace is The trace entry must be specified in a special quoted qualified format (including the schema name, module name & function name) as in for example, '" |
|
Used only when |
|
Used only when Analyze |
|
User-provided comment for this run |
A unique run identifier for this run of the analyzer. This can then be used to look up the results corresponding to this run from the hierarchical profiler tables.
Use the dbmshptab
.sql
script located in the rdbms
/admin
directory to create the hierarchical profiler database tables and other data structures required for persistently storing the results of analyzing the raw profiler data.
Running dbmshptab
.sql
drops the any previously created hierarchical profiler tables.
This procedure starts hierarchical profiler data collection in the user's session.
DBMS_HPROF.START_PROFILING ( location VARCHAR2 DEFAULT NULL, filename VARCHAR2 DEFAULT NULL, max_depth PLS_INTEGER DEFAULT NULL);
Table 73-3 START_PROFILING Procedure Parameters
Parameter | Description |
---|---|
|
Name of a directory object. The file system directory mapped to this directory object is where the raw profiler output is generated. |
|
Output filename for the raw profiler data. The file is created in the directory specified by the |
|
By default (that is, when |