stackprof 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/stackprof.c +1 -1
- data/lib/stackprof/report.rb +5 -5
- data/stackprof.gemspec +1 -1
- 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: 70371feb6d35b951507adaecd3d86f23cca8b7a7
|
4
|
+
data.tar.gz: d61e93ca25ce3378b6a52429bd5f7f3f0173a180
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34c3b3a5814257b73d923dc73a1965aa637436dac1f6a7785e8d17b59ea02e2b83104ec9f0341a11dc96ce03b1bdb87ebb9b0f6d9a4dd9c58fceaebb103084f6
|
7
|
+
data.tar.gz: 016dba5b810895fd1f14aa29eaa294442e05095c4fa1d4bb79d1b5c54edd0936c30140a2e1ed719b02ccde7abc657b464874fa673f67ea48c3188550d466fea8
|
data/ext/stackprof.c
CHANGED
@@ -358,7 +358,7 @@ stackprof_record_sample()
|
|
358
358
|
|
359
359
|
if (_stackprof.raw_samples_capa <= _stackprof.raw_samples_len + num) {
|
360
360
|
_stackprof.raw_samples_capa *= 2;
|
361
|
-
_stackprof.raw_samples = realloc(_stackprof.raw_samples, _stackprof.raw_samples_capa);
|
361
|
+
_stackprof.raw_samples = realloc(_stackprof.raw_samples, sizeof(VALUE) * _stackprof.raw_samples_capa);
|
362
362
|
}
|
363
363
|
|
364
364
|
if (_stackprof.raw_samples_len > 0 && _stackprof.raw_samples[_stackprof.raw_sample_index] == (VALUE)num) {
|
data/lib/stackprof/report.rb
CHANGED
@@ -101,7 +101,7 @@ module StackProf
|
|
101
101
|
|
102
102
|
if cell.nil?
|
103
103
|
if row_prev
|
104
|
-
flamegraph_row(x - row_width, y, row_width, row_prev)
|
104
|
+
flamegraph_row(f, x - row_width, y, row_width, row_prev)
|
105
105
|
end
|
106
106
|
|
107
107
|
row_prev = nil
|
@@ -119,7 +119,7 @@ module StackProf
|
|
119
119
|
x += weight
|
120
120
|
|
121
121
|
else # end current row and start new row
|
122
|
-
flamegraph_row(x - row_width, y, row_width, row_prev)
|
122
|
+
flamegraph_row(f, x - row_width, y, row_width, row_prev)
|
123
123
|
x += weight
|
124
124
|
row_prev = cell
|
125
125
|
row_width = weight
|
@@ -131,15 +131,15 @@ module StackProf
|
|
131
131
|
if row_prev
|
132
132
|
next if skip_common && row_width == max_x
|
133
133
|
|
134
|
-
flamegraph_row(x - row_width, y, row_width, row_prev)
|
134
|
+
flamegraph_row(f, x - row_width, y, row_width, row_prev)
|
135
135
|
end
|
136
136
|
end
|
137
137
|
f.puts '])'
|
138
138
|
end
|
139
139
|
|
140
|
-
def flamegraph_row(x, y, weight, addr)
|
140
|
+
def flamegraph_row(f, x, y, weight, addr)
|
141
141
|
frame = frames[addr]
|
142
|
-
print ',' if @rows_started
|
142
|
+
f.print ',' if @rows_started
|
143
143
|
@rows_started = true
|
144
144
|
f.puts %{{"x":#{x},"y":#{y},"width":#{weight},"frame_id":#{addr},"frame":#{frame[:name].dump},"file":#{frame[:file].dump}}}
|
145
145
|
end
|
data/stackprof.gemspec
CHANGED