-
Notifications
You must be signed in to change notification settings - Fork 189
Improved performance and stability of access to internal framework tables #417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
9c19355
78f3790
af5ae33
2185cec
f6e8271
d609b36
646b0b8
a8d4ac7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
Moved temp tables cleanup into ut_utils (authid definer), so that we can use truncate rather then delete. Refactored ut_coverage and ut_coverage_helper. Changed the RunAll script to use packaged version of mystats.
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,32 +16,41 @@ create or replace package body ut_coverage_helper is | |
| limitations under the License. | ||
| */ | ||
|
|
||
| g_coverage_id integer; | ||
| g_develop_mode boolean; | ||
| g_coverage_id integer; | ||
| g_develop_mode boolean := false; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. how about making it not null? |
||
| g_is_started boolean := false; | ||
|
|
||
| function is_develop_mode return boolean is | ||
| function is_develop_mode return boolean is | ||
| begin | ||
| return g_develop_mode; | ||
| end; | ||
|
|
||
| function is_started return boolean is | ||
| begin | ||
| return g_is_started; | ||
| end; | ||
|
|
||
| procedure coverage_start_internal(a_run_comment varchar2) is | ||
| begin | ||
| dbms_profiler.start_profiler(run_comment => a_run_comment, run_number => g_coverage_id); | ||
| g_is_started := true; | ||
| coverage_pause(); | ||
| end; | ||
|
|
||
| procedure coverage_start(a_run_comment varchar2) is | ||
| begin | ||
| if g_develop_mode is null then | ||
| if not g_is_started then | ||
| g_develop_mode := false; | ||
| coverage_start_internal(a_run_comment); | ||
| end if; | ||
| end; | ||
|
|
||
| procedure coverage_start_develop is | ||
| begin | ||
| g_develop_mode := true; | ||
| coverage_start_internal('utPLSQL Code coverage run in development MODE '||ut_utils.to_string(systimestamp)); | ||
| if not g_is_started then | ||
| g_develop_mode := true; | ||
| coverage_start_internal('utPLSQL Code coverage run in development MODE '||ut_utils.to_string(systimestamp)); | ||
| end if; | ||
| end; | ||
|
|
||
| procedure coverage_pause is | ||
|
|
@@ -59,17 +68,18 @@ create or replace package body ut_coverage_helper is | |
| end; | ||
|
|
||
| procedure coverage_stop is | ||
| l_return_code binary_integer; | ||
| begin | ||
| if not g_develop_mode then | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it correct to check for develop here? We are stoping coverage regardless of the mode, aren't we?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, not really. We will be able to remove the develop mode, once we move to testing ut3 with another ut3 installation. It needs to stay like this for now, otherwise we will not get a true picture of coverage for out own code. |
||
| l_return_code := dbms_profiler.stop_profiler(); | ||
| g_is_started := false; | ||
| dbms_profiler.stop_profiler(); | ||
| end if; | ||
| end; | ||
|
|
||
| procedure coverage_stop_develop is | ||
| l_return_code binary_integer; | ||
| begin | ||
| l_return_code := dbms_profiler.stop_profiler(); | ||
| g_develop_mode := false; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should call
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can't, as described in previous comment. |
||
| g_is_started := false; | ||
| dbms_profiler.stop_profiler(); | ||
| end; | ||
|
|
||
| function get_raw_coverage_data(a_object_owner varchar2, a_object_name varchar2) return unit_line_calls is | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we schec the state here and perform the same check in tha package itself.
Maybe we can remove the chack from here and leave it only in
ut_coverage_helper?