MiniProfiler/rack-mini-profiler

View on GitHub
lib/mini_profiler/storage/redis_store.rb

Summary

Maintainability
C
1 day
Test Coverage

Class RedisStore has 26 methods (exceeds 20 allowed). Consider refactoring.
Open

    class RedisStore < AbstractStore

      attr_reader :prefix

      EXPIRES_IN_SECONDS = 60 * 60 * 24
Severity: Minor
Found in lib/mini_profiler/storage/redis_store.rb - About 3 hrs to fix

    File redis_store.rb has 287 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    require 'digest'
    require 'securerandom'
    
    module Rack
      class MiniProfiler
    Severity: Minor
    Found in lib/mini_profiler/storage/redis_store.rb - About 2 hrs to fix

      Method push_snapshot has 60 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

            def push_snapshot(page_struct, group_name, config)
              group_zset_key = group_snapshot_zset_key(group_name)
              group_hash_key = group_snapshot_hash_key(group_name)
              overview_zset_key = snapshot_overview_zset_key
      
      
      Severity: Major
      Found in lib/mini_profiler/storage/redis_store.rb - About 2 hrs to fix

        Method cleanup_corrupt_snapshots has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

              def cleanup_corrupt_snapshots(corrupt_snapshots_ids, group_name)
                group_hash_key = group_snapshot_hash_key(group_name)
                group_zset_key = group_snapshot_zset_key(group_name)
                overview_zset_key = snapshot_overview_zset_key
                lua = <<~LUA
        Severity: Minor
        Found in lib/mini_profiler/storage/redis_store.rb - About 1 hr to fix

          There are no issues that match your filters.

          Category
          Status