add benchmark scripts to load each provider and service independently

This commit is contained in:
Lance Ivy 2014-02-01 22:12:52 -05:00
parent f9a5b9e942
commit 59292c99ad
2 changed files with 12 additions and 0 deletions

6
benchs/each_provider.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
# for each provider
grep -lr "< Fog::Service$" lib/fog | xargs -L1 dirname | sort | uniq | sed -e 's/lib\///' |
# trigger rubygem cost then benchmark the load time
xargs -I{} ruby -Ilib -rbenchmark -e 'Gem::Specification._all; puts "{}: #{Benchmark.realtime{require "{}" }}"'

6
benchs/each_service.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
# for each service
grep -lr "< Fog::Service$" lib/fog | sed -e 's/lib\///' -e 's/.rb$//' |
# trigger rubygem cost then benchmark the load time
xargs -I{} ruby -Ilib -rbenchmark -e 'Gem::Specification._all; puts "{}: #{Benchmark.realtime{ require "{}" }}"'