[why] When do group compare, if returned groups of auto_group like below (the dimension number less than 2 for group_key):
groups = { group_key_1 => { dimension_1 => matrix_1 }, group_key_2 => {} }
the group_key will be deleted, then, group compare will have no output.
[how] Reduce dimension number limit from 2 to 1.
[example]
lukaiyi@z9 ~% compare "suite=iperf" -d "os" in z9
[before] <null>
[after]
os_arch=aarch64/os_version=20/pp.iperf.protocol=tcp/pp.iperf.runtime=300/tbox_group=vm-hi1620-2p8g--liangt
openeuler metric -------------------- ------------------------------ fails:runs | 18:18 stderr.EOF' 18:18 stderr.has_stderr
openeuler metric -------------------- ------------------------------ %stddev \ 3.496630e+10 ± 19% iperf.tcp.receiver.bps 3.497117e+10 ± 19% iperf.tcp.sender.bps 300.23 iperf.time.elapsed_time 300.23 iperf.time.elapsed_time.max ...
Signed-off-by: Lu Kaiyi 2392863668@qq.com --- lib/matrix2.rb | 2 +- lib/params_group.rb | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/lib/matrix2.rb b/lib/matrix2.rb index 2065039..9753a6f 100644 --- a/lib/matrix2.rb +++ b/lib/matrix2.rb @@ -116,7 +116,7 @@ def combine_group_query_data(query_data, dims) job_list = query_data['hits']['hits'] groups = auto_group(job_list, dims) groups.each do |group_key, value| - if value.size < 2 + if value.size < 1 groups.delete(group_key) next end diff --git a/lib/params_group.rb b/lib/params_group.rb index 40191a9..48d651b 100644 --- a/lib/params_group.rb +++ b/lib/params_group.rb @@ -34,8 +34,7 @@ def auto_group(jobs_list, dimensions) return [] if dimensions.empty?
jobs_list = extract_jobs_list(jobs_list) - groups = group(jobs_list, dimensions) - return remove_singleton(groups) + group(jobs_list, dimensions) end
def extract_jobs_list(jobs_list)