Permalink
Browse files

Fix specs for millisecond tracers

  • Loading branch information...
1 parent 0360b1c commit bf81f5735b9ac39c646a3aef60142d4f97037ca4 @tmm1 tmm1 committed Jan 30, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 spec/tracing_spec.rb
@@ -38,9 +38,9 @@ def filedata
select(nil, nil, nil, 0.15)
end
- filedata.should =~ /"select":\{"calls":1,"time":0\.1[567]/
+ filedata.should =~ /"select":\{"calls":1,"time":1[567]\d/
time = filedata[/"select":\{"calls":\d+,"time":([\d.]+)/, 1].to_f
- time.should.be.close(0.15, 0.1)
+ time.should.be.close(150, 10)
end
should 'trace objects created for block' do
@@ -79,7 +79,7 @@ def filedata
filedata.should =~ /"mysql":\{"queries":5,"time":([\d.]+)/
time = filedata[/"mysql":\{"queries":5,"time":([\d.]+)/, 1].to_f
- time.should.be.close(0.25, 0.1)
+ time.should.be.close(250, 25)
end
rescue Mysql::Error => e
raise unless e.message =~ /connect/

0 comments on commit bf81f57

Please sign in to comment.