Improved performance and stability of access to internal framework tables#417
Improved performance and stability of access to internal framework tables#417jgebal merged 8 commits intoutPLSQL:developfrom jgebal:feature/table_access_iprovements
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; |
| procedure coverage_stop is | ||
| l_return_code binary_integer; | ||
| begin | ||
| if not g_develop_mode then |
There was a problem hiding this comment.
Is it correct to check for develop here? We are stoping coverage regardless of the mode, aren't we?
There was a problem hiding this comment.
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.
| l_return_code binary_integer; | ||
| begin | ||
| l_return_code := dbms_profiler.stop_profiler(); | ||
| g_develop_mode := false; |
There was a problem hiding this comment.
I think we should call coverage_stop from here not to duplicate code
There was a problem hiding this comment.
We can't, as described in previous comment.
The start_develop/stop_develop override and block start/stop of coverage gathering.
| 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 |
There was a problem hiding this comment.
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?
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.