<commit_before>require 'sidekiq'

module Glimpse
  module Views
    class Sidekiq < View
      def processed
        stats.processed
      end

      def failed
        stats.failed
      end

      def enqueued
        stats.enqueued
      end

      private
      def stats
        @stats ||= Sidekiq::Stats.new
        Rails.logger.debug @stats.processed
        @stats
      end

      def setup_subscribers
        before_request do
          stats
        end
      end

    end
  end
end
<commit_msg>Oops. Forgot to actually return the glimpse results. Duh.<commit_after>require 'sidekiq'

module Glimpse
  module Views
    class Sidekiq < View
      def processed
        stats.processed
      end

      def failed
        stats.failed
      end

      def enqueued
        stats.enqueued
      end

      def results
        {
          processed: processed,
          failed: failed,
          enqueued: enqueued
         }
      end

      private
      def stats
        @stats ||= ::Sidekiq::Stats.new
        Rails.logger.debug @stats.processed
        @stats
      end

    end
  end
end

{'fraction_non_alphanumeric': 0.04891304347826087, 'fraction_numerical': 0.0, 'mean_word_length': 1.4501108647450112, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7122117', 'n_tokens_mistral': 328, 'n_tokens_neox': 313, 'n_words': 90}