Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Performance spec typo and output

  • Loading branch information...
commit 4d9bd08e6833a7649ceaeb58752bc26ad527cb45 1 parent e6fe1fb
@bfaloona authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 performance/time_large_file_spec.rb
View
6 performance/time_large_file_spec.rb
@@ -1,15 +1,17 @@
require 'rubygems'
require 'indy'
-describe '5000 entry file' do
- it 'should find 130 entries using within' do
+describe '50000 entry file' do
+ it 'should find 130 entries using #within time scope' do
large_file = File.open("#{File.dirname(__FILE__)}/large.log", 'r')
+ start_time = Time.now
indy = Indy.new(
:source => large_file,
:log_format => [/^\[([^\|]+)\|([^\]]+)\] (.*)$/,:severity, :time, :message])
result = indy.within(:time => ["27-12-2010 10:14:25","29-12-2010 12:10:19"]).for(:all)
+ puts "#{(Time.now - start_time).seconds} \tElapsed seconds to parse 50k line file for all entries in time scope"
result.size.should == 130
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.