46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
# File 'lib/kmdb/parser.rb', line 46
def run(argv)
inputs = list_files_in(argv)
total_bytes = total_size_of_files(inputs)
log "total bytes : #{total_bytes}"
total_bytes -= inputs.map { |p| Dumpfile.get(p, @resume_job) }.compact.map(&:offset).sum
log "left to process : #{total_bytes}"
@processed_bytes = 0
@progress = ProgressBar.new("-" * 20, total_bytes)
@progress.long_running if @progress.respond_to?(:long_running)
inputs.sort.each do |input|
process_events_in_file(input)
end
@progress.finish
end
|