Created
December 24, 2011 07:01
-
-
Save shirosaki/1516649 to your computer and use it in GitHub Desktop.
Timing chart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# | |
# https://github.com/mattetti/googlecharts | |
# http://mattetti.github.com/googlecharts/ | |
# | |
# Install: | |
# gem install googlecharts | |
# | |
# GitHub Flavord Markdown: | |
#  | |
# | |
require "gchart" | |
# From TCS Ruby 1.9.3 timing results | |
data = { | |
:Vanilla => 8.283, | |
:Patched => 2.262, | |
} | |
max_y = 10 | |
puts Gchart.bar( | |
:size => '400x240', | |
:title => 'Rails Startup Time [sec]', | |
:title_size => 10, | |
:bar_width_and_spacing => '60,30', | |
:axis_with_labels => ['x', 'y'], | |
:axis_labels => [data.keys.join("|")], | |
:axis_range => [[], [0, max_y]], | |
:max_value => max_y, | |
:data => data.values, | |
# :format => :image_tag, | |
).gsub(/%([\[\]])/, '\1') # remove unwanted '%' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
timer ruby script\rails r "p $LOAD_PATH.size, $LOADED_FEATURES.size"