Class: Redu::Analyzer
- Inherits:
-
Object
- Object
- Redu::Analyzer
- Defined in:
- lib/redu/analyzer.rb
Instance Method Summary collapse
-
#initialize(options) ⇒ Analyzer
constructor
A new instance of Analyzer.
- #start ⇒ Object
Constructor Details
#initialize(options) ⇒ Analyzer
Returns a new instance of Analyzer.
87 88 89 90 91 92 |
# File 'lib/redu/analyzer.rb', line 87 def initialize() @redis = Redis.new() @delimiter = [:delimiter] @prefixes = {} @worst_offender_set = WorstOffenderSet.new([:worst_offender_count]) end |
Instance Method Details
#start ⇒ Object
94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/redu/analyzer.rb', line 94 def start keys = [] STDERR.puts "Loading Keys for Analysis. This may take a few minutes" keys = @redis.keys pb = ProgressBar.new("Analyzing",keys.size) keys.each do |key| analyze_key(key) pb.inc end pb.finish output_prefix_table output_worst_offenders_table end |