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

Function `get_reporters_list` is slow on 11g and causes instability of utPLSQL-cli #814

Closed
jgebal opened this Issue Jan 12, 2019 · 1 comment

Comments

Projects
None yet
1 participant
@jgebal
Copy link
Member

jgebal commented Jan 12, 2019

It seems that querying oracle dba_types/all_types data-dictionary table with connect by in 11g can cause some performance and stability issues.

The code of ut_runner.get_reporters_list needs to be rewritten to provide better performance and stability.

Also, to avoid round trips to DB from client, the function should expose additional info.
Today it returns:

  reporter_object_name varchar2(250), -- full reporter name in format: owner.name 
  is_output_reporter   varchar2(1), -- Y/N indication of reporter providing output for API

Should now return:

  reporter_object_name varchar2(250), -- full reporter name in format: owner.name 
  is_output_reporter   varchar2(1), -- Y/N indication of reporter providing output for API
  owner                varchar2(128), -- reporter owner (ut3 owner name)
  name                 varchar2(128), -- reporter name
  description          varchar2(4000), -- reporter description

That way, the result-set is backward-compatible but client can consume the data in new format too.

References: utPLSQL/utPLSQL-cli#98

@jgebal

This comment has been minimized.

Copy link
Member Author

jgebal commented Jan 12, 2019

After reviewing how java-api is using reporters and checking performance of description retrieval with:

select ut3_latest_release.ut_documentation_reporter().get_description() from dual union all
select ut3_latest_release.ut_coverage_cobertura_reporter().get_description() from dual union all
select ut3_latest_release.ut_coverage_html_reporter().get_description() from dual union all
select ut3_latest_release.ut_coverage_sonar_reporter().get_description() from dual union all
select ut3_latest_release.ut_coveralls_reporter().get_description() from dual union all
select ut3_latest_release.ut_junit_reporter().get_description() from dual union all
select ut3_latest_release.ut_xunit_reporter().get_description() from dual union all
select ut3_latest_release.ut_realtime_reporter().get_description() from dual union all
select ut3_latest_release.ut_sonar_test_reporter().get_description() from dual union all
select ut3_latest_release.ut_teamcity_reporter().get_description() from dual union all
select ut3_latest_release.ut_tfs_junit_reporter().get_description() from dual;

It doesn't make sense to extend the function signature, as retrieval of individual description is faster than doing this with data-dictionary.

The function signature will remain unchanged.

  reporter_object_name varchar2(250), -- full reporter name in format: owner.name 
  is_output_reporter   varchar2(1), -- Y/N indication of reporter providing output for API

@jgebal jgebal added this to the v3.1.4 milestone Jan 12, 2019

@jgebal jgebal added the enhancement label Jan 12, 2019

jgebal added a commit that referenced this issue Jan 12, 2019

Improved performance of `get_reporters_list`
by avoiding the costly and slow `connect by`

Resolves #814

@jgebal jgebal closed this in #815 Jan 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.