On Tue, Dec 29, 2020 at 03:37:53PM +0800, Li Yuanchao wrote:
When do compare, after group jobs, there are many one_size group, which can not find another job to make a group. Delete such groups to save time.
But, if there is no size > 1 group, 3 one_size groups will be kept to avoid 'No Data'.
Signed-off-by: Li Yuanchao lyc163mail@163.com
lib/matrix2.rb | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-)
diff --git a/lib/matrix2.rb b/lib/matrix2.rb index 14e9558..0e80858 100644 --- a/lib/matrix2.rb +++ b/lib/matrix2.rb @@ -123,18 +123,37 @@ end def combine_group_query_data(job_list, dims) suites_hash = {} groups = auto_group(job_list, dims)
- have_multi_member = multi_member?(groups)
- one_size_count = 0 groups.each do |group_key, value|
- suite_list = []
- value.each do |dimension_key, jobs|
groups[group_key][dimension_key], suites = create_matrix(jobs)
suite_list.concat(suites)
- if value.size < 2
one_size_count += 1
if have_multi_member || one_size_count > 3
if multi_member exists in groups delete all one_size group? or keep 3 group at leaest whatever?
Thanks, Weitao
groups.delete(group_key)
next
endend
- suites_hash[group_key] = suite_list
- get_groups_matrix(groups, group_key, value, suites_hash) end