From 266003decf5b907d2edc191573657332027c2fca Mon Sep 17 00:00:00 2001 From: Gregg Tanzillo Date: Tue, 19 Dec 2017 15:36:36 -0500 Subject: [PATCH] Stop generating `vim_performance_tage_values` rows Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1510484 Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1514505 --- app/models/metric/ci_mixin/rollup.rb | 1 - app/models/storage.rb | 2 -- .../connection_adapters/miq_postgres_adapter.rb | 4 ---- .../connection_adapters/miq_postgres_legacy_adapter.rb | 4 ---- 4 files changed, 11 deletions(-) diff --git a/app/models/metric/ci_mixin/rollup.rb b/app/models/metric/ci_mixin/rollup.rb index 0c837432c2c9..723b73b17fdc 100644 --- a/app/models/metric/ci_mixin/rollup.rb +++ b/app/models/metric/ci_mixin/rollup.rb @@ -97,7 +97,6 @@ def perf_rollup(time, interval_name, time_profile = nil) end Benchmark.realtime_block(:db_update_perf) { perf.update_attributes(new_perf) } - Benchmark.realtime_block(:process_perfs_tag) { VimPerformanceTagValue.build_from_performance_record(perf) } case interval_name when "hourly" diff --git a/app/models/storage.rb b/app/models/storage.rb index 1441608bc786..e07a1aa4f5f4 100644 --- a/app/models/storage.rb +++ b/app/models/storage.rb @@ -812,8 +812,6 @@ def perf_capture(interval_name, *_args) perf.update_attributes(attrs) end - Benchmark.realtime_block(:process_perfs_tag) { VimPerformanceTagValue.build_from_performance_record(perf) } - update_attribute(:last_perf_capture_on, hour) # We don't rollup realtime to Storage, so we need to manually create bottlenecks diff --git a/lib/active_metrics/connection_adapters/miq_postgres_adapter.rb b/lib/active_metrics/connection_adapters/miq_postgres_adapter.rb index badefb7df4e0..655a78c3fc17 100644 --- a/lib/active_metrics/connection_adapters/miq_postgres_adapter.rb +++ b/lib/active_metrics/connection_adapters/miq_postgres_adapter.rb @@ -53,10 +53,6 @@ def write_rows(resources, interval_name, start_time, end_time, data) if interval_name == 'hourly' # TODO(lsmola) pff, it needs AR objects, quite ineffective to batch here - samples_arel.find_each do |perf| - Benchmark.realtime_block(:process_perfs_tag) { VimPerformanceTagValue.build_from_performance_record(perf) } - end - _log.info("#{log_header} Adding missing timestamp intervals...") resources.each do |resource| Benchmark.realtime_block(:add_missing_intervals) { Metric::Processing.add_missing_intervals(resource, "hourly", start_time, end_time) } diff --git a/lib/active_metrics/connection_adapters/miq_postgres_legacy_adapter.rb b/lib/active_metrics/connection_adapters/miq_postgres_legacy_adapter.rb index b2d7f269761e..d532b139618b 100644 --- a/lib/active_metrics/connection_adapters/miq_postgres_legacy_adapter.rb +++ b/lib/active_metrics/connection_adapters/miq_postgres_legacy_adapter.rb @@ -68,10 +68,6 @@ def write_rows(interval_name, resource, start_time, end_time, data) # TODO: Should we change this into a single metrics.push like we do in ems_refresh? Benchmark.realtime_block(:process_perfs_db) { perf.update_attributes(v) } - - if interval_name == 'hourly' - Benchmark.realtime_block(:process_perfs_tag) { VimPerformanceTagValue.build_from_performance_record(perf) } - end end if interval_name == 'hourly'