Sha256: 1a42e63c8bc562f2977405481d4d5c621580c29190e7bf87f9ddabeb33487c4c

Contents?: true

Size: 1.15 KB

Versions: 2

Compression:

Stored size: 1.15 KB

Contents

# frozen_string_literal: true

module Dynflow
  module Debug
    module Telemetry
      module Persistence
        methods = [
          :load_action,
          :load_actions,
          :load_action_for_presentation,
          :load_action,
          :load_actions,
          :load_action_for_presentation,
          :load_actions_attributes,
          :save_action,
          :find_execution_plans,
          :find_execution_plan_counts,
          :delete_execution_plans,
          :load_execution_plan,
          :save_execution_plan,
          :find_old_execution_plans,
          :find_past_delayed_plans,
          :delete_delayed_plans,
          :save_delayed_plan,
          :set_delayed_plan_frozen,
          :load_delayed_plan,
          :load_step,
          :load_steps,
          :save_step,
          :push_envelope,
          :pull_envelopes
        ]

        methods.each do |name|
          define_method(name) do |*args|
            Dynflow::Telemetry.measure(:dynflow_persistence, :method => name, :world => @world.id) { super(*args) }
          end
        end
      end
    end
  end
end

::Dynflow::Persistence.prepend ::Dynflow::Debug::Persistence

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dynflow-1.9.0 lib/dynflow/debug/telemetry/persistence.rb
dynflow-1.8.3 lib/dynflow/debug/telemetry/persistence.rb