benchmark_harness 0.0.3 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/benchmark_harness.gemspec +2 -2
- data/lib/benchmark_harness.rb +2 -1
- data/lib/benchmark_harness/collection.rb +3 -0
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0
|
1
|
+
0.1.0
|
data/benchmark_harness.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{benchmark_harness}
|
8
|
-
s.version = "0.0
|
8
|
+
s.version = "0.1.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Daniel Higginbotham"]
|
12
|
-
s.date = %q{2011-03-
|
12
|
+
s.date = %q{2011-03-30}
|
13
13
|
s.description = %q{harness for running benchmark multiple times and running stats on the results}
|
14
14
|
s.email = %q{daniel@flyingmachinestudios.com}
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/benchmark_harness.rb
CHANGED
@@ -9,6 +9,7 @@ class BenchmarkHarness
|
|
9
9
|
include Singleton
|
10
10
|
|
11
11
|
class << self
|
12
|
+
# Cheap way to easily treat class like it's an instance, because why not
|
12
13
|
extend Forwardable
|
13
14
|
def_delegators :instance, :collections, :measure, :flush!, :wrap_method
|
14
15
|
end
|
@@ -45,7 +46,7 @@ class BenchmarkHarness
|
|
45
46
|
end
|
46
47
|
|
47
48
|
constant_name, method_name = signature.split(split_on)
|
48
|
-
method_name_safe = method_name.gsub(/[\
|
49
|
+
method_name_safe = method_name.gsub(/[^\w\d]/, '') # strip out ie !
|
49
50
|
constant = get_constant(constant_name)
|
50
51
|
|
51
52
|
method_definition = <<-END
|
@@ -6,6 +6,9 @@ class BenchmarkHarness
|
|
6
6
|
STATS = [:mean, :median, :mode, :range, :standard_deviation, :variance]
|
7
7
|
STATS_HUMAN = STATS.collect{|s| s.to_s.sub(/_/, " ").capitalize}
|
8
8
|
|
9
|
+
# Sorts values into named vectors:
|
10
|
+
#
|
11
|
+
# @example {:user => [1,3,2,3], :system => [0,0,0,1]}
|
9
12
|
def reconciled
|
10
13
|
return @reconciled if @reconciled
|
11
14
|
@reconciled = Hash.new{|h,k| h[k] = []}
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: benchmark_harness
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
+
- 1
|
8
9
|
- 0
|
9
|
-
|
10
|
-
version: 0.0.3
|
10
|
+
version: 0.1.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Daniel Higginbotham
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-03-
|
18
|
+
date: 2011-03-30 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|