1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

update benchmarks to get them running again

This commit is contained in:
geemus 2010-05-23 14:56:34 -07:00
parent ba1b0e41b6
commit 4edf4c8f3c

View file

@ -5,20 +5,20 @@ require 'right_aws'
require File.join(File.dirname(__FILE__), '..', 'lib', 'fog') require File.join(File.dirname(__FILE__), '..', 'lib', 'fog')
data = File.open(File.join(File.dirname(__FILE__), '..', 'spec', 'credentials.yml')).read data = File.open(File.expand_path('~/.fog')).read
config = YAML.load(data) config = YAML.load(data)[:default]
fog = Fog::AWS::S3.new( fog = Fog::AWS::S3.new(
:aws_access_key_id => config['aws_access_key_id'], :aws_access_key_id => config[:aws_access_key_id],
:aws_secret_access_key => config['aws_secret_access_key'] :aws_secret_access_key => config[:aws_secret_access_key]
) )
raws = RightAws::S3Interface.new( raws = RightAws::S3Interface.new(
config['aws_access_key_id'], config[:aws_access_key_id],
config['aws_secret_access_key'] config[:aws_secret_access_key]
) )
raws.logger.level = 3 # ERROR raws.logger.level = 3 # ERROR
awss3 = AWS::S3::Base.establish_connection!( awss3 = AWS::S3::Base.establish_connection!(
:access_key_id => config['aws_access_key_id'], :access_key_id => config[:aws_access_key_id],
:secret_access_key => config['aws_secret_access_key'], :secret_access_key => config[:aws_secret_access_key],
:persistent => true :persistent => true
) )
@ -106,30 +106,30 @@ Benchmark.bmbm(25) do |bench|
end end
# Rehearsal ------------------------------------------------------------ # Rehearsal ------------------------------------------------------------
# fog.put_bucket 0.010000 0.000000 0.010000 ( 4.981517) # fog.put_bucket 0.030000 0.010000 0.040000 ( 4.797287)
# raws.create_bucket 0.030000 0.040000 0.070000 ( 10.035029) # raws.create_bucket 0.040000 0.030000 0.070000 ( 10.037626)
# awss3::Bucket.create 0.020000 0.020000 0.040000 ( 7.402162) # awss3::Bucket.create 0.010000 0.000000 0.010000 ( 1.732033)
# fog.put_object 0.080000 0.080000 0.160000 ( 8.757062) # fog.put_object 0.350000 0.220000 0.570000 ( 27.430128)
# raws.put 0.180000 0.080000 0.260000 ( 12.307371) # raws.put 0.180000 0.050000 0.230000 ( 11.320939)
# awss3::S3Object.create 0.170000 0.070000 0.240000 ( 14.028887) # awss3::S3Object.create 0.170000 0.040000 0.210000 ( 13.903928)
# fog.delete_object 0.080000 0.050000 0.130000 ( 5.481744) # fog.delete_object 0.280000 0.170000 0.450000 ( 21.327174)
# raws.delete 0.140000 0.070000 0.210000 ( 7.709116) # raws.delete 0.130000 0.040000 0.170000 ( 8.872263)
# awss3::S3Object.delete 0.100000 0.040000 0.140000 ( 5.533884) # awss3::S3Object.delete 0.130000 0.020000 0.150000 ( 4.700452)
# fog.delete_bucket 0.010000 0.010000 0.020000 ( 1.861061) # fog.delete_bucket 0.030000 0.020000 0.050000 ( 3.395838)
# raws.delete_bucket 0.030000 0.020000 0.050000 ( 3.146836) # raws.delete_bucket 0.040000 0.020000 0.060000 ( 4.616931)
# awss3::Bucket.delete 0.050000 0.010000 0.060000 ( 1.877064) # awss3::Bucket.delete 0.010000 0.010000 0.020000 ( 2.152023)
# --------------------------------------------------- total: 1.390000sec # --------------------------------------------------- total: 2.030000sec
# #
# user system total real # user system total real
# fog.put_bucket 0.010000 0.020000 0.030000 ( 1.949933) # fog.put_bucket 0.030000 0.030000 0.060000 ( 4.369874)
# raws.create_bucket 0.030000 0.020000 0.050000 ( 4.766058) # raws.create_bucket 0.040000 0.020000 0.060000 ( 5.406727)
# awss3::Bucket.create 0.010000 0.010000 0.020000 ( 2.093764) # awss3::Bucket.create 0.010000 0.000000 0.010000 ( 2.230434)
# fog.put_object 0.090000 0.080000 0.170000 ( 9.352868) # fog.put_object 0.310000 0.200000 0.510000 ( 25.419315)
# raws.put 0.150000 0.080000 0.230000 ( 12.981112) # raws.put 0.170000 0.050000 0.220000 ( 11.554947)
# awss3::S3Object.create 0.130000 0.070000 0.200000 ( 14.442972) # awss3::S3Object.create 0.160000 0.030000 0.190000 ( 12.573148)
# fog.delete_object 0.060000 0.060000 0.120000 ( 5.657752) # fog.delete_object 0.260000 0.160000 0.420000 ( 21.045432)
# raws.delete 0.130000 0.050000 0.180000 ( 6.598221) # raws.delete 0.120000 0.050000 0.170000 ( 16.278677)
# awss3::S3Object.delete 0.110000 0.030000 0.140000 ( 5.709799) # awss3::S3Object.delete 0.090000 0.020000 0.110000 ( 4.521777)
# fog.delete_bucket 0.010000 0.010000 0.020000 ( 1.864573) # fog.delete_bucket 0.030000 0.020000 0.050000 ( 4.028921)
# raws.delete_bucket 0.040000 0.030000 0.070000 ( 4.120572) # raws.delete_bucket 0.030000 0.030000 0.060000 ( 5.447169)
# awss3::Bucket.delete 0.020000 0.000000 0.020000 ( 1.947711) # awss3::Bucket.delete 0.010000 0.000000 0.010000 ( 1.662223)