Commit d0fb9e9bc33221699133f2cd76adca80b18b3877
Committed by
Paulo Meireles
1 parent
2fc5a82e
Exists in
master
and in
29 other branches
[Mezuro] fixed filtering_metric_history
Showing
1 changed file
with
9 additions
and
4 deletions
Show diff stats
plugins/mezuro/controllers/mezuro_plugin_profile_controller.rb
... | ... | @@ -55,11 +55,16 @@ class MezuroPluginProfileController < ProfileController |
55 | 55 | private |
56 | 56 | |
57 | 57 | def filtering_metric_history(metric_name, module_history) |
58 | - metric_history = module_history.collect do |module_result| | |
59 | - module_result.metric_results.select do |metric_result| | |
58 | + metrics_history = module_history.map do |module_result| | |
59 | + module_result.metric_results | |
60 | + end | |
61 | + metric_history = metrics_history.map do |array_of_metric_result| | |
62 | + (array_of_metric_result.select do |metric_result| | |
60 | 63 | metric_result.metric.name.delete("() ") == metric_name |
61 | - end | |
64 | + end).first | |
65 | + end | |
66 | + metric_history.map do |metric_result| | |
67 | + metric_result.value | |
62 | 68 | end |
63 | - metric_history[0].collect{ |metric_result| metric_result.value } | |
64 | 69 | end |
65 | 70 | end | ... | ... |