★ wanayoo — archive 1999 https://github.com/utPLSQL/utPLSQL/pull/417Nouvelle recherche | Portail wanayoo
Skip to content
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

Improved performance and stability of access to internal framework tables #417

Merged
merged 8 commits into from Jul 28, 2017

Conversation

@jgebal
Copy link
Member

@jgebal jgebal commented Jul 22, 2017

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.

jgebal added 3 commits Jul 21, 2017
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.
@jgebal jgebal added this to the v3.1.0 milestone Jul 22, 2017
@jgebal jgebal requested review from viniciusam and Pazus Jul 22, 2017
@coveralls
Copy link

@coveralls coveralls commented Jul 22, 2017

Coverage Status

Coverage increased (+0.5%) to 92.039% when pulling af5ae33 on jgebal:feature/table_access_iprovements into 55fe15f on utPLSQL:develop.

1 similar comment
@coveralls
Copy link

@coveralls coveralls commented Jul 22, 2017

Coverage Status

Coverage increased (+0.5%) to 92.039% when pulling af5ae33 on jgebal:feature/table_access_iprovements into 55fe15f on utPLSQL:develop.

g_coverage_id integer;
g_develop_mode boolean;
g_coverage_id integer;
g_develop_mode boolean := false;

This comment has been minimized.

@Pazus

Pazus Jul 22, 2017
Member

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

This comment has been minimized.

@Pazus

Pazus Jul 22, 2017
Member

Is it correct to check for develop here? We are stoping coverage regardless of the mode, aren't we?

This comment has been minimized.

@jgebal

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.

begin
l_return_code := dbms_profiler.stop_profiler();
g_develop_mode := false;

This comment has been minimized.

@Pazus

Pazus Jul 22, 2017
Member

I think we should call coverage_stop from here not to duplicate code

This comment has been minimized.

@jgebal

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.

/**
* 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

This comment has been minimized.

@Pazus

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?

@coveralls
Copy link

@coveralls coveralls commented Jul 22, 2017

Coverage Status

Coverage increased (+0.5%) to 92.113% when pulling 2185cec on jgebal:feature/table_access_iprovements into 55fe15f on utPLSQL:develop.

Copy link
Member

@Pazus Pazus left a comment

Left several comments in code

@jgebal jgebal changed the title Feature/table access iprovements Improved performance and stability of access to internal framework tables Jul 24, 2017
jgebal added 2 commits Jul 24, 2017
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
@coveralls
Copy link

@coveralls coveralls commented Jul 24, 2017

Coverage Status

Coverage increased (+0.8%) to 92.132% when pulling d609b36 on jgebal:feature/table_access_iprovements into 564a328 on utPLSQL:develop.

@Pazus
Pazus approved these changes Jul 25, 2017
@coveralls
Copy link

@coveralls coveralls commented Jul 27, 2017

Coverage Status

Coverage increased (+0.8%) to 92.132% when pulling 646b0b8 on jgebal:feature/table_access_iprovements into 33a6f45 on utPLSQL:develop.

…cess_iprovements

# Conflicts:
#	tests/lib/mystats/mystats_pkg.sql
@coveralls
Copy link

@coveralls coveralls commented Jul 28, 2017

Coverage Status

Coverage increased (+0.8%) to 92.132% when pulling a8d4ac7 on jgebal:feature/table_access_iprovements into f5cc486 on utPLSQL:develop.

@jgebal jgebal merged commit 6a527c6 into utPLSQL:develop Jul 28, 2017
1 of 2 checks passed
1 of 2 checks passed
continuous-integration/travis-ci/pr The Travis CI build failed
Details
coverage/coveralls Coverage increased (+0.8%) to 92.132%
Details
@jgebal jgebal deleted the jgebal:feature/table_access_iprovements branch Jul 28, 2017
@Pazus Pazus modified the milestones: v3.0.3, v3.1.0 Aug 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.