Permalink
Browse files

added benchmarks sample to README

  • Loading branch information...
stanislaw committed Jun 25, 2012
1 parent 401d347 commit dfb0032f31293187629eacd6077331fa68d237cb
Showing with 69 additions and 14 deletions.
  1. +1 −1 .gitignore
  2. +42 −4 README.md
  3. BIN images/huge_output.jpg
  4. +0 −2 ruby/rmagick.rb
  5. +0 −2 ruby/ruby-vips.rb
  6. +11 −4 ruby/runner
  7. +8 −0 ruby/versions/rmagick.rb
  8. +6 −0 ruby/versions/ruby-vips.rb
  9. +1 −1 runner
View
@@ -16,7 +16,7 @@ doc
pkg
-output/**/*
+output/
# Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
#
View
@@ -6,7 +6,33 @@ Now the accent on [ruby-vips](https://github.com/jcupitt/ruby-vips), Ruby bindin
## June 26, 2012 - Status
-The repo is a setup phase. Please do not expect all the code working stable and representative.
+The repo is a setup phase. Only two scripts for ruby-vips and rmagick are available in _ruby/_. Please, do not expect all the code working stable and representative.
+
+## Benchmarks for 2012.06.26
+
+```bash
+stanislaw@localhost ~/work/gems/vips-benchmarks $ ./runner images/huge.jpg
+output/huge.jpg
+
+=== Ruby platform ===
+
+Ruby-vips 0.1.1
+
+real 0m1.806s
+user 0m3.284s
+sys 0m0.075s
+
+This is RMagick 2.13.1 ($Date: 2009/12/20 02:33:33 $) Copyright (C) 2009 by
+Timothy P. Hunter
+Built with ImageMagick 6.7.7-5 2012-06-24 Q16 http://www.imagemagick.org
+Built for ruby 1.9.3
+Web page: http://rmagick.rubyforge.org
+Email: rmagick@rubyforge.org
+
+real 0m2.882s
+user 0m3.486s
+sys 0m0.147s
+```
## Performance test design
@@ -27,8 +53,20 @@ scripts available in repo.
Test scenario was taken from [Speed and Memory use](http://www.vips.ecs.soton.ac.uk/index.php?title=Speed_and_Memory_Use) page from libvips [Home page](http://www.vips.ecs.soton.ac.uk/index.php?title=VIPS)
-## Copyright
+## Do it yourself
+
+```bash
+git clone https://github.com/stanislaw/vips-benchmarks
+
+cd vips-benchmarks
-Copyright (c) 2012 stanislaw. See LICENSE.txt for
-further details.
+# for all platforms
+./runner images/huge.jpg output/huge.jpg
+
+# or more specifically for ruby platform:
+ruby/runner images/huge.jpg output/huge.jpg
+```
+
+## Copyright
+Copyright (c) 2012 Stanislaw Pankevich and hopefully John Cupitt.
View
Deleted file not rendered
View
@@ -5,8 +5,6 @@
include Magick
-puts Magick::Long_version
-
im = ImageList.new(ARGV[0])
im = im.shave(100, 100)
View
@@ -3,8 +3,6 @@
require 'rubygems'
require 'vips'
-puts "Ruby-vips #{VIPS::VERSION}"
-
include VIPS
im = Image.new(ARGV[0])
View
@@ -1,10 +1,17 @@
#!/bin/sh
-# echo "Ruby-vips"
+# I extracted versions output to they not affect performance results
-time ruby ruby/ruby-vips.rb images/huge.jpg images/huge_output.jpg
+echo
+
+echo "=== Ruby platform ==="
+
+echo
+
+ruby ruby/versions/ruby-vips.rb
+time ruby ruby/ruby-vips.rb $1 $2
echo
-# echo "RMagick"
-time ruby ruby/rmagick.rb images/huge.jpg images/huge_output.jpg
+ruby ruby/versions/rmagick.rb
+time ruby ruby/rmagick.rb $1 $2
View
@@ -0,0 +1,8 @@
+#!/usr/bin/ruby
+
+require 'rubygems'
+require 'RMagick'
+
+include Magick
+
+puts Magick::Long_version
@@ -0,0 +1,6 @@
+#!/usr/bin/ruby
+
+require 'rubygems'
+require 'vips'
+
+puts "Ruby-vips #{VIPS::VERSION}"
View
2 runner
@@ -1,3 +1,3 @@
#!/bin/bash
-bundle exec ruby/runner images/huge.jpg output/huge.jpg
+ruby/runner $1 $2

0 comments on commit dfb0032

Please sign in to comment.