kantox-chronoscope 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kantox/chronoscope/generic.rb +3 -1
- data/lib/kantox/chronoscope/version.rb +1 -1
- data/lib/kantox/chronoscope.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90a61593f47c00bb6eed136f202b05a98b4b3e6b
|
4
|
+
data.tar.gz: ef8dd7722fb00a6f687dcef0ea3e04609689406a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31bec9c70173b8e4fedd0984944f3aae010d95b469d62642a6f6a7f1c915a86a2c31c9777fbea6916395ffff38bda9f9077d83abff584c2b25e640911010691f
|
7
|
+
data.tar.gz: 965d1650c1bcdfe67f837afe689dec6c228203a47f38fe30ccbc7819875eddbb483cd321c8f5a2475c74d689cd0a01aa37f71f7ca5d521f9ecf41d1598d1ce75
|
@@ -71,7 +71,9 @@ module Kantox
|
|
71
71
|
BM_DELIMITER,
|
72
72
|
"#{COLOR_PALE}#{@@chronoscope_data[arg.to_s][:count]}#{COLOR_NONE}",
|
73
73
|
BM_DELIMITER,
|
74
|
-
"#{COLOR_VIVID}#{@@chronoscope_data[arg.to_s][:total].round(3)}#{COLOR_NONE}",
|
74
|
+
"#{COLOR_VIVID}#{(@@chronoscope_data[arg.to_s][:total] / @@chronoscope_data[arg.to_s][:count]).round(3)}#{COLOR_NONE}",
|
75
|
+
BM_DELIMITER,
|
76
|
+
"#{COLOR_PALE}#{@@chronoscope_data[arg.to_s][:total].round(3)}#{COLOR_NONE}",
|
75
77
|
bm.to_s
|
76
78
|
].join(' ')
|
77
79
|
end
|
data/lib/kantox/chronoscope.rb
CHANGED
@@ -43,8 +43,8 @@ module Kantox
|
|
43
43
|
methods = klazz.instance_methods(false) if methods.empty?
|
44
44
|
|
45
45
|
methods.each do |m|
|
46
|
-
next if m.to_s =~ /\A⚑/ || methods.include?("⚑#{m}".to_sym)
|
47
|
-
next if klazz.instance_method(m).parameters.to_h[:block]
|
46
|
+
next if m.to_s =~ /\A⚑/ || methods.include?("⚑#{m}".to_sym) # skip already wrapped functions
|
47
|
+
next if (klazz.instance_method(m).parameters.to_h[:block] rescue false) # FIXME: report
|
48
48
|
|
49
49
|
klazz.class_eval %Q|
|
50
50
|
alias_method '⚑#{m}', '#{m}'
|