[DRE-commits] [SCM] debian packaging for ruby-benchmark-ips. branch, master, updated. upstream/1.2.0+git.20130122.fcff7f-8-ge0aed62

Per Andersson avtobiff at gmail.com
Sun Jun 9 14:48:56 UTC 2013


The following commit has been merged in the master branch:
commit d0eb61c3272facac76e9bc6e6255e54218a386dd
Author: Per Andersson <avtobiff at gmail.com>
Date:   Sun Jun 9 16:28:49 2013 +0200

    Imported Upstream version 1.2.0+git.20130609.e47e416

diff --git a/.autotest b/.autotest
new file mode 100644
index 0000000..ef753ad
--- /dev/null
+++ b/.autotest
@@ -0,0 +1,23 @@
+# -*- ruby -*-
+
+require 'autotest/restart'
+
+# Autotest.add_hook :initialize do |at|
+#   at.extra_files << "../some/external/dependency.rb"
+#
+#   at.libs << ":../some/external"
+#
+#   at.add_exception 'vendor'
+#
+#   at.add_mapping(/dependency.rb/) do |f, _|
+#     at.files_matching(/test_.*rb$/)
+#   end
+#
+#   %w(TestA TestB).each do |klass|
+#     at.extra_class_map[klass] = "test/test_misc.rb"
+#   end
+# end
+
+# Autotest.add_hook :run_command do |at|
+#   system "rake build"
+# end
diff --git a/lib/benchmark/ips.rb b/lib/benchmark/ips.rb
index a08ad98..ddf928e 100644
--- a/lib/benchmark/ips.rb
+++ b/lib/benchmark/ips.rb
@@ -121,11 +121,11 @@ module Benchmark
     #
     def item(label="", str=nil, &blk) # :yield:
       if blk and str
-        raise ArgmentError, "specify a block and a str, but not both"
+        raise ArgumentError, "specify a block and a str, but not both"
       end
 
       action = str || blk
-      raise ArgmentError, "no block or string" unless action
+      raise ArgumentError, "no block or string" unless action
 
       @list.push Entry.new(label, action)
       self
@@ -237,8 +237,6 @@ module Benchmark
 
       measured_us = measurements.inject(0) { |a,i| a + i }
 
-      seconds = measured_us.to_f / 1_000_000.0
-
       all_ips = measurements.map { |i| cycles_per_100ms.to_f / (i.to_f / 1_000_000) }
 
       avg_ips = Timing.mean(all_ips)

-- 
debian packaging for ruby-benchmark-ips.



More information about the Pkg-ruby-extras-commits mailing list