chrisa-ruby-dtrace 0.2.5 → 0.2.6
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/History.txt +4 -0
- data/ext/dtrace_aggdata.c +2 -2
- data/lib/dtrace/provider.rb +6 -1
- data/lib/dtrace/version.rb +1 -1
- metadata +1 -1
data/History.txt
CHANGED
data/ext/dtrace_aggdata.c
CHANGED
@@ -96,13 +96,13 @@ VALUE dtraceaggdata_value(VALUE self)
|
|
96
96
|
case DTRACEAGG_COUNT:
|
97
97
|
if (value < 0)
|
98
98
|
rb_raise(eDtraceException, "count value is negative");
|
99
|
-
v =
|
99
|
+
v = LL2NUM(value);
|
100
100
|
break;
|
101
101
|
case DTRACEAGG_AVG:
|
102
102
|
case DTRACEAGG_MIN:
|
103
103
|
case DTRACEAGG_MAX:
|
104
104
|
case DTRACEAGG_SUM:
|
105
|
-
v =
|
105
|
+
v = LL2NUM(value);
|
106
106
|
break;
|
107
107
|
default:
|
108
108
|
v = Qnil;
|
data/lib/dtrace/provider.rb
CHANGED
@@ -68,7 +68,12 @@ class Dtrace
|
|
68
68
|
if types[0].respond_to? :keys
|
69
69
|
options = types.shift
|
70
70
|
end
|
71
|
-
|
71
|
+
caller = Kernel.caller[0].match(/`(.*)'/)
|
72
|
+
if caller
|
73
|
+
options[:function] ||= caller[1]
|
74
|
+
else
|
75
|
+
options[:function] ||= name
|
76
|
+
end
|
72
77
|
|
73
78
|
pd = Dtrace::Provider::ProbeDef.new(name, options[:function])
|
74
79
|
types.each do |t|
|
data/lib/dtrace/version.rb
CHANGED