Skip to content

Instantly share code, notes, and snippets.

@n1zyy
Created February 17, 2012 18:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save n1zyy/1854736 to your computer and use it in GitHub Desktop.
Save n1zyy/1854736 to your computer and use it in GitHub Desktop.
BZ 794759 comparison
#
# Quick test of my patch for https://bugzilla.redhat.com/show_bug.cgi?id=794759
#
# PoolFamily statistics
stime = Time.now.to_f
100.times do
pf = PoolFamily.find_by_name 'default'
pf.statistics
end
etime = Time.now.to_f
puts "*** Completed 100 invocations of pf.statistics in #{etime-stime} seconds"
# Pool statistics
stime = Time.now.to_f
100.times do
p = Pool.find_by_name 'default'
p.statistics
end
etime = Time.now.to_f
puts "*** Completed 100 invocations of p.statistics in #{etime-stime} seconds"
f=<<EOS
Without patch:
mawagner ~/aeolus/conductor/src <0.9-maint> $ rails runner ./quick_test.rb
Using gem require instead of bundler
========= cucumber/test env deps loaded... ==========
*** Completed 100 invocations of pf.statistics in 24.5177829265594 seconds
*** Completed 100 invocations of p.statistics in 1.64854598045349 seconds
With patch:
mawagner ~/aeolus/conductor/src <bz_794759> $ rails runner ./quick_test.rb
Using gem require instead of bundler
========= cucumber/test env deps loaded... ==========
*** Completed 100 invocations of pf.statistics in 4.03684306144714 seconds
*** Completed 100 invocations of p.statistics in 1.43278694152832 seconds
EOS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment