compare values by each metrics based on groups matrices, and format compare result as echart data_set
background: For support compare with user-defined template feature, the work-flow of user-defined template feature: load_compare_template.yaml --> query_results(ES) ---> auto group jobs_list ---> create groups_matrices ---> compare_values by each metrics ---> format/show results
current patch is the step: compare_values by each metrics ---> format/show results
Signed-off-by: Lu Weitao luweitaobe@163.com --- lib/compare_matrixes.rb | 107 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+)
diff --git a/lib/compare_matrixes.rb b/lib/compare_matrixes.rb index 078028a..7e6dfb1 100644 --- a/lib/compare_matrixes.rb +++ b/lib/compare_matrixes.rb @@ -399,8 +399,115 @@ def compare_group_matrices(group_matrices, options) result_str end
+# compare group_matrices with each dimension(matrix) of each group, +# and reorganize the result as group-metric-compare-values +# +# Input: groups_matrices +# { +# group_key_1 => { +# dimension_1 => matrix_1, (openeuler 20.03) +# dimension_2 => matrix_2, (openeuler 20.09) +# dimension_3 => matrix_3, (centos 7.6) +# }, +# group_key_2 => {...} +# } +# +# output: compare_metrics_values +# { +# group_key_1 => { +# metric_1 => { +# 'average' => { +# 'dimension_1' => xxx +# 'dimension_2' => xxx +# 'dimension_3' => xxx +# }, +# 'standard_deviation' => { +# 'dimension_1' => xxx +# 'dimension_2' => xxx +# 'dimension_3' => xxx +# }, +# 'change' => { +# 'dimension_2 vs dimension_1' => xxx +# 'dimension_3 vs dimension_1' => xxx +# 'dimension_3 vs dimension_2' => xxx +# } +# }, +# metric_2 => {...} +# } +# } +def compare_metrics_values(groups_matrices) + metrics_compare_values = {} + groups_matrices.each do |group_key, dimensions| + metrics_compare_values[group_key] = get_metric_values(dimensions) + end + metrics_compare_values +end + +def get_metric_values(dimensions) + metrics_values = {} + dimensions.each do |dim, matrix| + matrix.each do |metric, values| + metrics_values[metric] ||= {} + metrics_values[metric]['average'] ||= {} + metrics_values[metric]['standard_deviation'] ||= {} + metric_value = get_values(values, true) + metrics_values[metric]['average'][dim] = metric_value[:average] + metrics_values[metric]['standard_deviation'][dim] = metric_value[:stddev] + end + end + get_metric_change(metrics_values) + metrics_values +end + +def get_metric_change(metrics_values) + metrics_values.each do |metric, values| + metrics_values[metric]['change'] = {} + next if values['average'].size < 2 + + dimension_list = values['average'].keys + change_titles = get_change_titles(dimension_list) + change_titles.each do |pk| + change = get_compare_value(values['average'][pk[0]], values['average'][pk[1]], true) + values['change'] = { "#{pk[1]} vs #{pk[0]}" => change } + end + end +end + +# create all dimension combinations as change_title +# input: dimension_list +# eg: ['openeuler 20.03', 'debian sid', 'centos 7.6'] +# return: Array(base_dimension: String, pk_dimension: String) +# [ +# ['openeuler 20.03', 'debian sid'], +# ['openeuler 20.03', 'centos 7.6'], +# ['debian sid', 'centos 7.6'] +# ] +def get_change_titles(dimension_list) + dims = [] + dimension_list_size = dimension_list.size + (1..dimension_list_size - 1).each do |i| + (i..dimension_list_size - 1).each do |j| + dims << [dimension_list[i - 1], dimension_list[j]] + end + end + dims +end + +def show_chart_compare_result(chart_result) + print JSON.pretty_generate(chart_result) +end + # Format Fields
+def format_for_chart(metrics_compare_values, template_params) + chart_result = {} + chart_result['title'] = template_params['title'] || nil + chart_result['unit'] = template_params['unit'] || nil + chart_result['x_name'] = template_params['x_params'].join('|') || nil + chart_result['tables'] = metrics_compare_values + chart_result +end + def format_fails_runs(fails, runs) fails_width = (SUB_LONG_COLUMN_WIDTH * FAILS_PROPORTION).to_i runs_width = SUB_LONG_COLUMN_WIDTH - fails_width - 1
On Tue, Nov 03, 2020 at 02:49:49PM +0800, Lu Weitao wrote:
compare values by each metrics based on groups matrices, and format compare result as echart data_set
background: For support compare with user-defined template feature, the work-flow of user-defined template feature: load_compare_template.yaml --> query_results(ES) ---> auto group jobs_list ---> create groups_matrices ---> compare_values by each metrics ---> format/show results
current patch is the step: compare_values by each metrics ---> format/show results
Signed-off-by: Lu Weitao luweitaobe@163.com
lib/compare_matrixes.rb | 107 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+)
diff --git a/lib/compare_matrixes.rb b/lib/compare_matrixes.rb index 078028a..7e6dfb1 100644 --- a/lib/compare_matrixes.rb +++ b/lib/compare_matrixes.rb @@ -399,8 +399,115 @@ def compare_group_matrices(group_matrices, options) result_str end
+# compare group_matrices with each dimension(matrix) of each group, +# and reorganize the result as group-metric-compare-values +# +# Input: groups_matrices +# { +# group_key_1 => { +# dimension_1 => matrix_1, (openeuler 20.03) +# dimension_2 => matrix_2, (openeuler 20.09) +# dimension_3 => matrix_3, (centos 7.6) +# }, +# group_key_2 => {...} +# } +# +# output: compare_metrics_values +# { +# group_key_1 => { +# metric_1 => { +# 'average' => { +# 'dimension_1' => xxx +# 'dimension_2' => xxx +# 'dimension_3' => xxx +# }, +# 'standard_deviation' => { +# 'dimension_1' => xxx +# 'dimension_2' => xxx +# 'dimension_3' => xxx +# }, +# 'change' => { +# 'dimension_2 vs dimension_1' => xxx +# 'dimension_3 vs dimension_1' => xxx +# 'dimension_3 vs dimension_2' => xxx +# } +# }, +# metric_2 => {...} +# } +# } +def compare_metrics_values(groups_matrices)
- metrics_compare_values = {}
- groups_matrices.each do |group_key, dimensions|
- metrics_compare_values[group_key] = get_metric_values(dimensions)
- end
- metrics_compare_values
+end
+def get_metric_values(dimensions)
- metrics_values = {}
- dimensions.each do |dim, matrix|
- matrix.each do |metric, values|
metrics_values[metric] ||= {}
metrics_values[metric]['average'] ||= {}
metrics_values[metric]['standard_deviation'] ||= {}
metric_value = get_values(values, true)
metrics_values[metric]['average'][dim] = metric_value[:average]
metrics_values[metric]['standard_deviation'][dim] = metric_value[:stddev]
- end
- end
- get_metric_change(metrics_values)
set_metric_change(metrics_values), maybe better. :)
- metrics_values
+end
+def get_metric_change(metrics_values)
- metrics_values.each do |metric, values|
- metrics_values[metric]['change'] = {}
- next if values['average'].size < 2
- dimension_list = values['average'].keys
- change_titles = get_change_titles(dimension_list)
- change_titles.each do |pk|
"dimension_list" "change_titles" are called once, Could we remove it?
"pk" meaning is vague. Could we do like this? get_change_titles(dimension_list).each do |contestant_a, contestant_b|
Thanks, Zhang Yuhang
change = get_compare_value(values['average'][pk[0]], values['average'][pk[1]], true)
values['change'] = { "#{pk[1]} vs #{pk[0]}" => change }
- end
- end
+end
+# create all dimension combinations as change_title +# input: dimension_list +# eg: ['openeuler 20.03', 'debian sid', 'centos 7.6'] +# return: Array(base_dimension: String, pk_dimension: String) +# [ +# ['openeuler 20.03', 'debian sid'], +# ['openeuler 20.03', 'centos 7.6'], +# ['debian sid', 'centos 7.6'] +# ] +def get_change_titles(dimension_list)
- dims = []
- dimension_list_size = dimension_list.size
- (1..dimension_list_size - 1).each do |i|
- (i..dimension_list_size - 1).each do |j|
dims << [dimension_list[i - 1], dimension_list[j]]
- end
- end
- dims
+end
+def show_chart_compare_result(chart_result)
- print JSON.pretty_generate(chart_result)
+end
# Format Fields
+def format_for_chart(metrics_compare_values, template_params)
- chart_result = {}
- chart_result['title'] = template_params['title'] || nil
- chart_result['unit'] = template_params['unit'] || nil
- chart_result['x_name'] = template_params['x_params'].join('|') || nil
- chart_result['tables'] = metrics_compare_values
- chart_result
+end
def format_fails_runs(fails, runs) fails_width = (SUB_LONG_COLUMN_WIDTH * FAILS_PROPORTION).to_i runs_width = SUB_LONG_COLUMN_WIDTH - fails_width - 1 -- 2.23.0
On Tue, Nov 03, 2020 at 03:28:37PM +0800, Zhang Yuhang wrote:
On Tue, Nov 03, 2020 at 02:49:49PM +0800, Lu Weitao wrote:
compare values by each metrics based on groups matrices, and format compare result as echart data_set
background: For support compare with user-defined template feature, the work-flow of user-defined template feature: load_compare_template.yaml --> query_results(ES) ---> auto group jobs_list ---> create groups_matrices ---> compare_values by each metrics ---> format/show results
current patch is the step: compare_values by each metrics ---> format/show results
Signed-off-by: Lu Weitao luweitaobe@163.com
lib/compare_matrixes.rb | 107 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+)
diff --git a/lib/compare_matrixes.rb b/lib/compare_matrixes.rb index 078028a..7e6dfb1 100644 --- a/lib/compare_matrixes.rb +++ b/lib/compare_matrixes.rb @@ -399,8 +399,115 @@ def compare_group_matrices(group_matrices, options) result_str end
+# compare group_matrices with each dimension(matrix) of each group, +# and reorganize the result as group-metric-compare-values +# +# Input: groups_matrices +# { +# group_key_1 => { +# dimension_1 => matrix_1, (openeuler 20.03) +# dimension_2 => matrix_2, (openeuler 20.09) +# dimension_3 => matrix_3, (centos 7.6) +# }, +# group_key_2 => {...} +# } +# +# output: compare_metrics_values +# { +# group_key_1 => { +# metric_1 => { +# 'average' => { +# 'dimension_1' => xxx +# 'dimension_2' => xxx +# 'dimension_3' => xxx +# }, +# 'standard_deviation' => { +# 'dimension_1' => xxx +# 'dimension_2' => xxx +# 'dimension_3' => xxx +# }, +# 'change' => { +# 'dimension_2 vs dimension_1' => xxx +# 'dimension_3 vs dimension_1' => xxx +# 'dimension_3 vs dimension_2' => xxx +# } +# }, +# metric_2 => {...} +# } +# } +def compare_metrics_values(groups_matrices)
- metrics_compare_values = {}
- groups_matrices.each do |group_key, dimensions|
- metrics_compare_values[group_key] = get_metric_values(dimensions)
- end
- metrics_compare_values
+end
+def get_metric_values(dimensions)
- metrics_values = {}
- dimensions.each do |dim, matrix|
- matrix.each do |metric, values|
metrics_values[metric] ||= {}
metrics_values[metric]['average'] ||= {}
metrics_values[metric]['standard_deviation'] ||= {}
metric_value = get_values(values, true)
metrics_values[metric]['average'][dim] = metric_value[:average]
metrics_values[metric]['standard_deviation'][dim] = metric_value[:stddev]
- end
- end
- get_metric_change(metrics_values)
set_metric_change(metrics_values), maybe better. :)
yes!
- metrics_values
+end
+def get_metric_change(metrics_values)
- metrics_values.each do |metric, values|
- metrics_values[metric]['change'] = {}
- next if values['average'].size < 2
- dimension_list = values['average'].keys
- change_titles = get_change_titles(dimension_list)
- change_titles.each do |pk|
"dimension_list" "change_titles" are called once, Could we remove it?
get_change_titles(values['average'].keys).each do |a, b| 这样代码少了两行,理解起来似乎稍微麻烦点。
使用变量,感觉有助于理解代码
"pk" meaning is vague. Could we do like this? get_change_titles(dimension_list).each do |contestant_a, contestant_b|
seems better, let me try
Thanks, Weitao
Thanks, Zhang Yuhang
change = get_compare_value(values['average'][pk[0]], values['average'][pk[1]], true)
values['change'] = { "#{pk[1]} vs #{pk[0]}" => change }
- end
- end
+end
+# create all dimension combinations as change_title +# input: dimension_list +# eg: ['openeuler 20.03', 'debian sid', 'centos 7.6'] +# return: Array(base_dimension: String, pk_dimension: String) +# [ +# ['openeuler 20.03', 'debian sid'], +# ['openeuler 20.03', 'centos 7.6'], +# ['debian sid', 'centos 7.6'] +# ] +def get_change_titles(dimension_list)
- dims = []
- dimension_list_size = dimension_list.size
- (1..dimension_list_size - 1).each do |i|
- (i..dimension_list_size - 1).each do |j|
dims << [dimension_list[i - 1], dimension_list[j]]
- end
- end
- dims
+end
+def show_chart_compare_result(chart_result)
- print JSON.pretty_generate(chart_result)
+end
# Format Fields
+def format_for_chart(metrics_compare_values, template_params)
- chart_result = {}
- chart_result['title'] = template_params['title'] || nil
- chart_result['unit'] = template_params['unit'] || nil
- chart_gresult['x_name'] = template_params['x_params'].join('|') || nil
- chart_result['tables'] = metrics_compare_values
- chart_result
+end
def format_fails_runs(fails, runs) fails_width = (SUB_LONG_COLUMN_WIDTH * FAILS_PROPORTION).to_i runs_width = SUB_LONG_COLUMN_WIDTH - fails_width - 1 -- 2.23.0
On Tue, Nov 03, 2020 at 03:28:37PM +0800, Zhang Yuhang wrote:
On Tue, Nov 03, 2020 at 02:49:49PM +0800, Lu Weitao wrote:
compare values by each metrics based on groups matrices, and format compare result as echart data_set
background: For support compare with user-defined template feature, the work-flow of user-defined template feature: load_compare_template.yaml --> query_results(ES) ---> auto group jobs_list ---> create groups_matrices ---> compare_values by each metrics ---> format/show results
current patch is the step: compare_values by each metrics ---> format/show results
Signed-off-by: Lu Weitao luweitaobe@163.com
lib/compare_matrixes.rb | 107 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+)
diff --git a/lib/compare_matrixes.rb b/lib/compare_matrixes.rb index 078028a..7e6dfb1 100644 --- a/lib/compare_matrixes.rb +++ b/lib/compare_matrixes.rb @@ -399,8 +399,115 @@ def compare_group_matrices(group_matrices, options) result_str end
+# compare group_matrices with each dimension(matrix) of each group, +# and reorganize the result as group-metric-compare-values +# +# Input: groups_matrices +# { +# group_key_1 => { +# dimension_1 => matrix_1, (openeuler 20.03) +# dimension_2 => matrix_2, (openeuler 20.09) +# dimension_3 => matrix_3, (centos 7.6) +# }, +# group_key_2 => {...} +# } +# +# output: compare_metrics_values +# { +# group_key_1 => { +# metric_1 => { +# 'average' => { +# 'dimension_1' => xxx +# 'dimension_2' => xxx +# 'dimension_3' => xxx +# }, +# 'standard_deviation' => { +# 'dimension_1' => xxx +# 'dimension_2' => xxx +# 'dimension_3' => xxx +# }, +# 'change' => { +# 'dimension_2 vs dimension_1' => xxx +# 'dimension_3 vs dimension_1' => xxx +# 'dimension_3 vs dimension_2' => xxx +# } +# }, +# metric_2 => {...} +# } +# } +def compare_metrics_values(groups_matrices)
- metrics_compare_values = {}
- groups_matrices.each do |group_key, dimensions|
- metrics_compare_values[group_key] = get_metric_values(dimensions)
- end
- metrics_compare_values
+end
+def get_metric_values(dimensions)
- metrics_values = {}
- dimensions.each do |dim, matrix|
- matrix.each do |metric, values|
metrics_values[metric] ||= {}
metrics_values[metric]['average'] ||= {}
metrics_values[metric]['standard_deviation'] ||= {}
metric_value = get_values(values, true)
metrics_values[metric]['average'][dim] = metric_value[:average]
metrics_values[metric]['standard_deviation'][dim] = metric_value[:stddev]
- end
- end
- get_metric_change(metrics_values)
set_metric_change(metrics_values), maybe better. :)
这里会触发rubo warning 还是只能用get了
Thanks, Weitao
- metrics_values
+end
+def get_metric_change(metrics_values)
- metrics_values.each do |metric, values|
- metrics_values[metric]['change'] = {}
- next if values['average'].size < 2
- dimension_list = values['average'].keys
- change_titles = get_change_titles(dimension_list)
- change_titles.each do |pk|
"dimension_list" "change_titles" are called once, Could we remove it?
"pk" meaning is vague. Could we do like this? get_change_titles(dimension_list).each do |contestant_a, contestant_b|
Thanks, Zhang Yuhang
change = get_compare_value(values['average'][pk[0]], values['average'][pk[1]], true)
values['change'] = { "#{pk[1]} vs #{pk[0]}" => change }
- end
- end
+end
+# create all dimension combinations as change_title +# input: dimension_list +# eg: ['openeuler 20.03', 'debian sid', 'centos 7.6'] +# return: Array(base_dimension: String, pk_dimension: String) +# [ +# ['openeuler 20.03', 'debian sid'], +# ['openeuler 20.03', 'centos 7.6'], +# ['debian sid', 'centos 7.6'] +# ] +def get_change_titles(dimension_list)
- dims = []
- dimension_list_size = dimension_list.size
- (1..dimension_list_size - 1).each do |i|
- (i..dimension_list_size - 1).each do |j|
dims << [dimension_list[i - 1], dimension_list[j]]
- end
- end
- dims
+end
+def show_chart_compare_result(chart_result)
- print JSON.pretty_generate(chart_result)
+end
# Format Fields
+def format_for_chart(metrics_compare_values, template_params)
- chart_result = {}
- chart_result['title'] = template_params['title'] || nil
- chart_result['unit'] = template_params['unit'] || nil
- chart_result['x_name'] = template_params['x_params'].join('|') || nil
- chart_result['tables'] = metrics_compare_values
- chart_result
+end
def format_fails_runs(fails, runs) fails_width = (SUB_LONG_COLUMN_WIDTH * FAILS_PROPORTION).to_i runs_width = SUB_LONG_COLUMN_WIDTH - fails_width - 1 -- 2.23.0
On Tue, Nov 03, 2020 at 08:56:51PM +0800, Lu Weitao wrote:
On Tue, Nov 03, 2020 at 03:28:37PM +0800, Zhang Yuhang wrote:
On Tue, Nov 03, 2020 at 02:49:49PM +0800, Lu Weitao wrote:
compare values by each metrics based on groups matrices, and format compare result as echart data_set
background: For support compare with user-defined template feature, the work-flow of user-defined template feature: load_compare_template.yaml --> query_results(ES) ---> auto group jobs_list ---> create groups_matrices ---> compare_values by each metrics ---> format/show results
current patch is the step: compare_values by each metrics ---> format/show results
Signed-off-by: Lu Weitao luweitaobe@163.com
lib/compare_matrixes.rb | 107 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+)
diff --git a/lib/compare_matrixes.rb b/lib/compare_matrixes.rb index 078028a..7e6dfb1 100644 --- a/lib/compare_matrixes.rb +++ b/lib/compare_matrixes.rb @@ -399,8 +399,115 @@ def compare_group_matrices(group_matrices, options) result_str end
+# compare group_matrices with each dimension(matrix) of each group, +# and reorganize the result as group-metric-compare-values +# +# Input: groups_matrices +# { +# group_key_1 => { +# dimension_1 => matrix_1, (openeuler 20.03) +# dimension_2 => matrix_2, (openeuler 20.09) +# dimension_3 => matrix_3, (centos 7.6) +# }, +# group_key_2 => {...} +# } +# +# output: compare_metrics_values +# { +# group_key_1 => { +# metric_1 => { +# 'average' => { +# 'dimension_1' => xxx +# 'dimension_2' => xxx +# 'dimension_3' => xxx +# }, +# 'standard_deviation' => { +# 'dimension_1' => xxx +# 'dimension_2' => xxx +# 'dimension_3' => xxx +# }, +# 'change' => { +# 'dimension_2 vs dimension_1' => xxx +# 'dimension_3 vs dimension_1' => xxx +# 'dimension_3 vs dimension_2' => xxx +# } +# }, +# metric_2 => {...} +# } +# } +def compare_metrics_values(groups_matrices)
- metrics_compare_values = {}
- groups_matrices.each do |group_key, dimensions|
- metrics_compare_values[group_key] = get_metric_values(dimensions)
- end
- metrics_compare_values
+end
+def get_metric_values(dimensions)
- metrics_values = {}
- dimensions.each do |dim, matrix|
- matrix.each do |metric, values|
metrics_values[metric] ||= {}
metrics_values[metric]['average'] ||= {}
metrics_values[metric]['standard_deviation'] ||= {}
metric_value = get_values(values, true)
metrics_values[metric]['average'][dim] = metric_value[:average]
metrics_values[metric]['standard_deviation'][dim] = metric_value[:stddev]
- end
- end
- get_metric_change(metrics_values)
set_metric_change(metrics_values), maybe better. :)
这里会触发rubo warning 还是只能用get了
Thanks, Weitao
Could give the warning info?
Thanks, Zhang Yuhang
+def get_metric_values(dimensions)
- metrics_values = {}
- dimensions.each do |dim, matrix|
- matrix.each do |metric, values|
metrics_values[metric] ||= {}
metrics_values[metric]['average'] ||= {}
metrics_values[metric]['standard_deviation'] ||= {}
metric_value = get_values(values, true)
metrics_values[metric]['average'][dim] = metric_value[:average]
metrics_values[metric]['standard_deviation'][dim] = metric_value[:stddev]
- end
- end
- get_metric_change(metrics_values)
set_metric_change(metrics_values), maybe better. :)
这里会触发rubo warning 还是只能用get了
Thanks, Weitao
Could give the warning info?
yes,
lib/compare_matrixes.rb:459:5: C: Naming/AccessorMethodName: Do not prefix writer method names with set_. def set_metric_change(metrics_values) ^^^^^^^^^^^^^^^^^
Thanks, Weitao
Thanks, Zhang Yuhang
On Wed, Nov 04, 2020 at 09:36:02AM +0800, Lu Weitao wrote:
+def get_metric_values(dimensions)
- metrics_values = {}
- dimensions.each do |dim, matrix|
- matrix.each do |metric, values|
metrics_values[metric] ||= {}
metrics_values[metric]['average'] ||= {}
metrics_values[metric]['standard_deviation'] ||= {}
metric_value = get_values(values, true)
metrics_values[metric]['average'][dim] = metric_value[:average]
metrics_values[metric]['standard_deviation'][dim] = metric_value[:stddev]
- end
- end
- get_metric_change(metrics_values)
set_metric_change(metrics_values), maybe better. :)
这里会触发rubo warning 还是只能用get了
Thanks, Weitao
Could give the warning info?
yes,
lib/compare_matrixes.rb:459:5: C: Naming/AccessorMethodName: Do not prefix writer method names with set_. def set_metric_change(metrics_values) ^^^^^^^^^^^^^^^^^
Thanks, Weitao
OK, Thanks. Try "assign_metric_change" as function name. "get_xxx" mean this function will return "xxx" value.
Thanks, Zhang Yuhang
Thanks, Zhang Yuhang
On Wed, Nov 04, 2020 at 09:49:51AM +0800, Zhang Yuhang wrote:
On Wed, Nov 04, 2020 at 09:36:02AM +0800, Lu Weitao wrote:
+def get_metric_values(dimensions)
- metrics_values = {}
- dimensions.each do |dim, matrix|
- matrix.each do |metric, values|
metrics_values[metric] ||= {}
metrics_values[metric]['average'] ||= {}
metrics_values[metric]['standard_deviation'] ||= {}
metric_value = get_values(values, true)
metrics_values[metric]['average'][dim] = metric_value[:average]
metrics_values[metric]['standard_deviation'][dim] = metric_value[:stddev]
- end
- end
- get_metric_change(metrics_values)
set_metric_change(metrics_values), maybe better. :)
这里会触发rubo warning 还是只能用get了
Thanks, Weitao
Could give the warning info?
yes,
lib/compare_matrixes.rb:459:5: C: Naming/AccessorMethodName: Do not prefix writer method names with set_. def set_metric_change(metrics_values) ^^^^^^^^^^^^^^^^^
Thanks, Weitao
OK, Thanks. Try "assign_metric_change" as function name. "get_xxx" mean this function will return "xxx" value.
yes,
Thanks Weitao
Thanks, Zhang Yuhang
Thanks, Zhang Yuhang