Sha256: 4ef54301f09e28d8a29267c05ac568af7e993fa61357a822ea8591ee8208b02a

Contents?: true

Size: 763 Bytes

Versions: 19

Compression:

Stored size: 763 Bytes

Contents

module BuilderApm
    class DashboardController < ApplicationController
      def index
        if params[:clear] == 'true'
          keys = redis_client.zrange("builder_apm:timestamps", 0, -1)
  
          keys = keys.map { |key| "builder_apm:Request:#{key}" }
          # Delete base keys
          redis_client.pipelined do |pipeline|
            pipeline.del("builder_apm:timestamps")
            pipeline.del("builder_apm:errors")
            pipeline.del("builder_apm:n_plus_one")
            pipeline.del("builder_apm:slow")
          end
          debugger
          # Delete keys in chunks
          keys.each_slice(1000) do |key_chunk|
            redis_client.del(*key_chunk) unless key_chunk.empty?
          end
        end
      end
    end
  end
  

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
builder_apm-0.5.14 app/controllers/builder_apm/dashboard_controller.rb
builder_apm-0.5.13 app/controllers/builder_apm/dashboard_controller.rb
builder_apm-0.5.12 app/controllers/builder_apm/dashboard_controller.rb
builder_apm-0.5.11 app/controllers/builder_apm/dashboard_controller.rb
builder_apm-0.5.10 app/controllers/builder_apm/dashboard_controller.rb
builder_apm-0.5.9 app/controllers/builder_apm/dashboard_controller.rb
builder_apm-0.5.8 app/controllers/builder_apm/dashboard_controller.rb
builder_apm-0.5.7 app/controllers/builder_apm/dashboard_controller.rb
builder_apm-0.5.6 app/controllers/builder_apm/dashboard_controller.rb
builder_apm-0.5.4 app/controllers/builder_apm/dashboard_controller.rb
builder_apm-0.5.3 app/controllers/builder_apm/dashboard_controller.rb
builder_apm-0.5.2 app/controllers/builder_apm/dashboard_controller.rb
builder_apm-0.5.1 app/controllers/builder_apm/dashboard_controller.rb
builder_apm-0.4.2 app/controllers/builder_apm/dashboard_controller.rb
builder_apm-0.4.1 app/controllers/builder_apm/dashboard_controller.rb
builder_apm-0.4.0 app/controllers/builder_apm/dashboard_controller.rb
builder_apm-0.3.2 app/controllers/builder_apm/dashboard_controller.rb
builder_apm-0.3.1 app/controllers/builder_apm/dashboard_controller.rb
builder_apm-0.3.0 app/controllers/builder_apm/dashboard_controller.rb