Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Improved performance and stability of access to internal framework tables #417
Conversation
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.
1 similar comment
| g_coverage_id integer; | ||
| g_develop_mode boolean; | ||
| g_coverage_id integer; | ||
| g_develop_mode boolean := false; |
Pazus
Jul 22, 2017
Member
how about making it not null?
how about making it not null?
| @@ -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 | |||
Pazus
Jul 22, 2017
Member
Is it correct to check for develop here? We are stoping coverage regardless of the mode, aren't we?
Is it correct to check for develop here? We are stoping coverage regardless of the mode, aren't we?
jgebal
Jul 24, 2017
Author
Member
No, not really.
We need to override coverage_stop in out unit tests (for now), so that when we test the framework, our "develop-mode" coverage will not stop, if we test execution for one of coverage reporters.
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.
No, not really.
We need to override coverage_stop in out unit tests (for now), so that when we test the framework, our "develop-mode" coverage will not stop, if we test execution for one of coverage reporters.
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.
| begin | ||
| l_return_code := dbms_profiler.stop_profiler(); | ||
| g_develop_mode := false; |
Pazus
Jul 22, 2017
Member
I think we should call coverage_stop from here not to duplicate code
I think we should call coverage_stop from here not to duplicate code
jgebal
Jul 24, 2017
Author
Member
We can't, as described in previous comment.
The start_develop/stop_develop override and block start/stop of coverage gathering.
We can't, as described in previous comment.
The start_develop/stop_develop override and block start/stop of coverage gathering.
| /** | ||
| * Public functions | ||
| */ | ||
| procedure coverage_start is | ||
| begin | ||
| ut_coverage_helper.coverage_start('utPLSQL Code coverage run '||ut_utils.to_string(systimestamp)); | ||
| if not ut_coverage_helper.is_started() then |
Pazus
Jul 22, 2017
Member
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?
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?
|
Left several comments in code |
Changed order of processing in if statement to make sure query in `is_tmp_table_populated` is executed when running unit tests.
# Conflicts: # source/core/ut_utils.pkb # source/core/ut_utils.pks
…cess_iprovements # Conflicts: # tests/lib/mystats/mystats_pkg.sql
When running coverage with several reporters the coverage reported by each of those was a but different.
This should be now resolved as the tmp table is populated only once per coverage run.