1: PACKAGE BODY PO_TIMING_UTL AS
2: /* $Header: PO_TIMING_UTL.plb 120.0 2005/07/20 10:42 bao noship $ */
3:
4: -- Use this pacakge to record timing information of the program modules
5: -- for the current session.
1: PACKAGE BODY PO_TIMING_UTL AS
2: /* $Header: PO_TIMING_UTL.plb 120.0 2005/07/20 10:42 bao noship $ */
3:
4: -- Use this pacakge to record timing information of the program modules
5: -- for the current session.
6: -- All modules are identified by module name, which will be provided by the
18: -- Example:
19: -- DECLARE
20: -- l_timing PO_TBL_VARCHAR4000;
21: -- BEGIN
22: -- PO_TIMING_UTL.init;
23: -- PO_TIMING_UTL.start_time('A');
24: -- PO_TIMING_UTL.start_time('B');
25: -- PO_TIMING_UTL.stop_time('B');
26: -- PO_TIMING_UTL.start_time('B');
19: -- DECLARE
20: -- l_timing PO_TBL_VARCHAR4000;
21: -- BEGIN
22: -- PO_TIMING_UTL.init;
23: -- PO_TIMING_UTL.start_time('A');
24: -- PO_TIMING_UTL.start_time('B');
25: -- PO_TIMING_UTL.stop_time('B');
26: -- PO_TIMING_UTL.start_time('B');
27: -- PO_TIMING_UTL.stop_time('B');
20: -- l_timing PO_TBL_VARCHAR4000;
21: -- BEGIN
22: -- PO_TIMING_UTL.init;
23: -- PO_TIMING_UTL.start_time('A');
24: -- PO_TIMING_UTL.start_time('B');
25: -- PO_TIMING_UTL.stop_time('B');
26: -- PO_TIMING_UTL.start_time('B');
27: -- PO_TIMING_UTL.stop_time('B');
28: -- PO_TIMING_UTL.stop_time('A');
21: -- BEGIN
22: -- PO_TIMING_UTL.init;
23: -- PO_TIMING_UTL.start_time('A');
24: -- PO_TIMING_UTL.start_time('B');
25: -- PO_TIMING_UTL.stop_time('B');
26: -- PO_TIMING_UTL.start_time('B');
27: -- PO_TIMING_UTL.stop_time('B');
28: -- PO_TIMING_UTL.stop_time('A');
29: --
22: -- PO_TIMING_UTL.init;
23: -- PO_TIMING_UTL.start_time('A');
24: -- PO_TIMING_UTL.start_time('B');
25: -- PO_TIMING_UTL.stop_time('B');
26: -- PO_TIMING_UTL.start_time('B');
27: -- PO_TIMING_UTL.stop_time('B');
28: -- PO_TIMING_UTL.stop_time('A');
29: --
30: -- PO_TIMING_UTL.get_formatted_timing_info (FND_API.G_TRUE, l_timing);
23: -- PO_TIMING_UTL.start_time('A');
24: -- PO_TIMING_UTL.start_time('B');
25: -- PO_TIMING_UTL.stop_time('B');
26: -- PO_TIMING_UTL.start_time('B');
27: -- PO_TIMING_UTL.stop_time('B');
28: -- PO_TIMING_UTL.stop_time('A');
29: --
30: -- PO_TIMING_UTL.get_formatted_timing_info (FND_API.G_TRUE, l_timing);
31: -- END;
24: -- PO_TIMING_UTL.start_time('B');
25: -- PO_TIMING_UTL.stop_time('B');
26: -- PO_TIMING_UTL.start_time('B');
27: -- PO_TIMING_UTL.stop_time('B');
28: -- PO_TIMING_UTL.stop_time('A');
29: --
30: -- PO_TIMING_UTL.get_formatted_timing_info (FND_API.G_TRUE, l_timing);
31: -- END;
32: --
26: -- PO_TIMING_UTL.start_time('B');
27: -- PO_TIMING_UTL.stop_time('B');
28: -- PO_TIMING_UTL.stop_time('A');
29: --
30: -- PO_TIMING_UTL.get_formatted_timing_info (FND_API.G_TRUE, l_timing);
31: -- END;
32: --
33: -- In this example, l_timing record will contain entries like the following:
34: -- A-1: Start=11:33:25.529, End=11:33:25.529, Duration=+00 00:00:00.000140
35: -- B-1: Start=11:33:25.529, End=11:33:25.529, Duration=+00 00:00:00.000020
36: -- B-2: Start=11:33:25.529, End=11:33:25.529, Duration=+00 00:00:00.000020
37:
38: d_pkg_name CONSTANT VARCHAR2(50) :=
39: PO_LOG.get_package_base('PO_TIMING_UTL');
40:
41: g_module_list PO_TBL_VARCHAR100;
42:
43: TYPE timing_rec_type IS RECORD (start_time timestamp, end_time timestamp);
257: );
258: RAISE;
259: END get_formatted_timing_info;
260:
261: END PO_TIMING_UTL;