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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f9391ce548ee344fce9ee6e1f2ff86a59f7e6837
4
- data.tar.gz: 961fb781cadaa07df721ed11d60df39d10bd0680
3
+ metadata.gz: 70371feb6d35b951507adaecd3d86f23cca8b7a7
4
+ data.tar.gz: d61e93ca25ce3378b6a52429bd5f7f3f0173a180
5
5
  SHA512:
6
- metadata.gz: fcefc33f597c6ee462651a4242b0251e7a7b8595e5869df0110f59ab9f9174ad86ac3243378f971c1ed0fe96700e36b382ecc325d65a0304ba542e5344c462d2
7
- data.tar.gz: d5af5d2e2da5082c32b14b2b255e9d70d10d9958d86605b14ac53b2b91239d617e8f7d29006d06f8513e6facb7cd3904589321908e9d0c6e65cb7e42bcc31966
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) {
@@ -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
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'stackprof'
3
- s.version = '0.2.4'
3
+ s.version = '0.2.5'
4
4
  s.homepage = 'http://github.com/tmm1/stackprof'
5
5
 
6
6
  s.authors = 'Aman Gupta'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stackprof
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aman Gupta