tunemygc 1.0.53 → 1.0.54

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: 3ec2e6d7d1e34032ddeabbe6f45d94ddcfe886f5
4
- data.tar.gz: 6381311c037b9624e01b0cbc9ccbe14360f25c98
3
+ metadata.gz: bf8ede849b72dcc54f498ac3524a0cc6b9fdd5a9
4
+ data.tar.gz: b04594c51a211451192de075f4da2d0e2e9c4973
5
5
  SHA512:
6
- metadata.gz: 8894b85720d7b80eb4788ec694d87cb3468aab06084955cdc649f807effe78453ed3bc631436e27281d73c892b5dc1c0784559ca607435de3578a9a71cc993ad
7
- data.tar.gz: 01b5b0539ff23f006b336b9c7a3f0d83618460bc2cbb28e368a6257980c764bc96c2c33bdfead582052f2508db5e4ea26140ff30b963b9696f73daad72219fdd
6
+ metadata.gz: 522b8f6c62f5eff66b55e034c3fd8049c1a93c3af0011b7eb220ea7fbc5502a9f47fd365c43cbbbdc0892785d6594ff1eaedaae6b13bff85d9632d38ff757f03
7
+ data.tar.gz: eaf43440862ab8407c71871d5373b9e25ced6024ec575b7ea4f10c6e17eeb751066ba22984756fd34ed2d104767d17e7dae769236c093856c283986874234bb4
data/README.md CHANGED
@@ -202,7 +202,7 @@ We don't track any data specific to your application other than a simple environ
202
202
  * Compile time GC options eg. "["USE_RGENGC", "RGENGC_ESTIMATE_OLDMALLOC", "GC_ENABLE_LAZY_SWEEP"]"
203
203
  * Compile time GC constants eg. "{"RVALUE_SIZE"=>40, "HEAP_OBJ_LIMIT"=>408, "HEAP_BITMAP_SIZE"=>56, "HEAP_BITMAP_PLANES"=>3}"
204
204
 
205
- Samples hitting our tuner endpoint doesn't include any proprietary details from your application either - just data points about GC activity.
205
+ Samples hitting our tuner endpoint doesn't include any proprietary details from your application either - just data points about GC activity, memory usage, current thread etc.
206
206
 
207
207
  We do however ask for a valid email address as a canonical reference for tuner tokens for your applications.
208
208
 
data/doc/protocol.md CHANGED
@@ -77,7 +77,7 @@ Samples are simple tuple structures with 11 elements.
77
77
  Example:
78
78
 
79
79
  ```json
80
- [1422023921.481364,132255744,132255744,"BOOTED",[45,1354,1368,0,551887,319759,232128,0,319748,232138,1354,0,1354,0,3191859,2872100,1280,22439940,36,9,10683,21366,291638,583276,1664,23221058],{"major_by":"force","gc_by":"method","have_finalizer":false,"immediate_sweep":true,"state":"none"},null]
80
+ [1422023921.481364,132255744,132255744,"BOOTED",[45,1354,1368,0,551887,319759,232128,0,319748,232138,1354,0,1354,0,3191859,2872100,1280,22439940,36,9,10683,21366,291638,583276,1664,23221058],{"major_by":"force","gc_by":"method","have_finalizer":false,"immediate_sweep":true,"state":"none"},null,70201748333020]
81
81
  ```
82
82
 
83
83
  * Timestamp. Position 0, a Float value such as <code>1422023921.481364</code>
@@ -87,15 +87,16 @@ Example:
87
87
  * Garbage Collection metrics - values of <code>GC.stat</code> output. Position 4, an Array value such as <code>[45,1354,1368,0,551887,319759,232128,0,319748,232138,1354,0,1354,0,3191859,2872100,1280,22439940,36,9,10683,21366,291638,583276,1664,23221058]</code>
88
88
  * Information from the latest GC cycle - output of <code>GC.latest_gc_info</code> Position 5, a Hash value such as <code>{"major_by"=>"force", "gc_by"=>"method", "have_finalizer"=>false, "immediate_sweep"=>true, "state"=>"none"}</code>
89
89
  * Reserved for future use - metadata. <code>GC.latest_gc_info</code> Position 6, a Hash or nil value such as <code>{"path"=>"stats"}</code>
90
+ * Current thread identifier. Position 7, a Numeric value such as <code>70201748333020</code> or <code>null</code> if on main thread
90
91
 
91
92
  #### BOOTED
92
93
 
93
- Triggered when the application is ready to start doing work.
94
+ Triggered when the application is ready to start doing work. Also includes additional metadata about object type distribution in the Ruby heap.
94
95
 
95
96
  Example:
96
97
 
97
98
  ```json
98
- [1422023921.481364,132255744,132255744,"BOOTED",[45,1354,1368,0,551887,319759,232128,0,319748,232138,1354,0,1354,0,3191859,2872100,1280,22439940,36,9,10683,21366,291638,583276,1664,23221058],{"major_by":"force","gc_by":"method","have_finalizer":false,"immediate_sweep":true,"state":"none"},null]
99
+ [1422023921.481364,132255744,132255744,"BOOTED",[45,1354,1368,0,551887,319759,232128,0,319748,232138,1354,0,1354,0,3191859,2872100,1280,22439940,36,9,10683,21366,291638,583276,1664,23221058],{"major_by":"force","gc_by":"method","have_finalizer":false,"immediate_sweep":true,"state":"none"},{"TOTAL":33016,"FREE":260,"T_OBJECT":963,"T_CLASS":911,"T_MODULE":45,"T_FLOAT":7,"T_STRING":18985,"T_REGEXP":387,"T_ARRAY":2803,"T_HASH":191,"T_STRUCT":222,"T_BIGNUM":2,"T_FILE":233,"T_DATA":1391,"T_MATCH":519,"T_COMPLEX":1,"T_NODE":6045,"T_ICLASS":48,"T_ZOMBIE":3},70201748333020]
99
100
  ```
100
101
 
101
102
  #### GC_CYCLE_STARTED
@@ -105,7 +106,7 @@ Emitted when a Garbage Collection cycle starts.
105
106
  Example:
106
107
 
107
108
  ```json
108
- [1422023921.776498,133820416,133820416,"GC_CYCLE_STARTED",[46,1354,1368,0,551887,550614,1273,0,319748,232138,1354,0,1354,0,3423988,2873374,0,21991141,36,9,10683,21366,291637,583276,0,22765743],{"major_by":null,"gc_by":"newobj","have_finalizer":false,"immediate_sweep":false,"state":"none"},null]
109
+ [1422023921.776498,133820416,133820416,"GC_CYCLE_STARTED",[46,1354,1368,0,551887,550614,1273,0,319748,232138,1354,0,1354,0,3423988,2873374,0,21991141,36,9,10683,21366,291637,583276,0,22765743],{"major_by":null,"gc_by":"newobj","have_finalizer":false,"immediate_sweep":false,"state":"none"},null,70201748333020]
109
110
  ```
110
111
 
111
112
  #### GC_CYCLE_ENDED
@@ -115,7 +116,7 @@ Emitted when a Garbage Collection cycle ends.
115
116
  Example:
116
117
 
117
118
  ```json
118
- [1422023923.144252,138760192,138760192,"GC_CYCLE_ENDED",[46,1354,1368,0,551887,551576,311,0,353935,197952,1354,0,1354,0,3621836,3070260,2910064,21991141,37,9,10983,21366,318878,583276,2910064,22765743],{"major_by":null,"gc_by":"newobj","have_finalizer":false,"immediate_sweep":false,"state":"sweeping"},null]
119
+ [1422023923.144252,138760192,138760192,"GC_CYCLE_ENDED",[46,1354,1368,0,551887,551576,311,0,353935,197952,1354,0,1354,0,3621836,3070260,2910064,21991141,37,9,10983,21366,318878,583276,2910064,22765743],{"major_by":null,"gc_by":"newobj","have_finalizer":false,"immediate_sweep":false,"state":"sweeping"},null,70201748333020]
119
120
  ```
120
121
 
121
122
  #### PROCESSING_STARTED
@@ -125,7 +126,7 @@ Emitted at the start of a unit of work.
125
126
  Example:
126
127
 
127
128
  ```json
128
- [1422023922.952984,135487488,135487488,"PROCESSING_STARTED",[46,1354,1368,0,551887,550292,1595,0,353935,82038,1354,0,1354,0,3505836,2955544,885712,21991141,37,9,10983,21366,318878,583276,886096,22765743],{"major_by":null,"gc_by":"newobj","have_finalizer":false,"immediate_sweep":false,"state":"sweeping"},null]
129
+ [1422023922.952984,135487488,135487488,"PROCESSING_STARTED",[46,1354,1368,0,551887,550292,1595,0,353935,82038,1354,0,1354,0,3505836,2955544,885712,21991141,37,9,10983,21366,318878,583276,886096,22765743],{"major_by":null,"gc_by":"newobj","have_finalizer":false,"immediate_sweep":false,"state":"sweeping"},null,70201748333020]
129
130
  ```
130
131
 
131
132
  #### PROCESSING_ENDED:
@@ -135,17 +136,17 @@ Emitted at the end of a unit of work.
135
136
  Example:
136
137
 
137
138
  ```json
138
- [1422023924.8609,191332352,191332352,"PROCESSING_ENDED",[49,2357,2437,79,960702,802035,158667,0,441562,278483,2195,162,2357,0,4447499,3645464,156448,29568470,40,9,11445,21366,416188,583276,19693888,27318891],{"major_by":null,"gc_by":"malloc","have_finalizer":false,"immediate_sweep":false,"state":"sweeping"},null]
139
+ [1422023924.8609,191332352,191332352,"PROCESSING_ENDED",[49,2357,2437,79,960702,802035,158667,0,441562,278483,2195,162,2357,0,4447499,3645464,156448,29568470,40,9,11445,21366,416188,583276,19693888,27318891],{"major_by":null,"gc_by":"malloc","have_finalizer":false,"immediate_sweep":false,"state":"sweeping"},null,70201748333020]
139
140
  ```
140
141
 
141
142
  #### TERMINATED
142
143
 
143
- Triggered when the application terminates.
144
+ Triggered when the application terminates. Also includes additional metadata about object type distribution in the Ruby heap.
144
145
 
145
146
  Example:
146
147
 
147
148
  ```json
148
- [1422023962.011763,204525568,195096576,"TERMINATED",[76,2357,2437,174,960702,466696,494006,0,465869,494832,2183,174,2357,0,14999220,14532524,37216,17136915,64,12,11707,23412,434060,868122,37600,26258064],{"major_by":"force","gc_by":"method","have_finalizer":false,"immediate_sweep":true,"state":"none"},null]
149
+ [1422023962.011763,204525568,195096576,"TERMINATED",[76,2357,2437,174,960702,466696,494006,0,465869,494832,2183,174,2357,0,14999220,14532524,37216,17136915,64,12,11707,23412,434060,868122,37600,26258064],{"major_by":"force","gc_by":"method","have_finalizer":false,"immediate_sweep":true,"state":"none"},{"TOTAL":33016,"FREE":260,"T_OBJECT":963,"T_CLASS":911,"T_MODULE":45,"T_FLOAT":7,"T_STRING":18985,"T_REGEXP":387,"T_ARRAY":2803,"T_HASH":191,"T_STRUCT":222,"T_BIGNUM":2,"T_FILE":233,"T_DATA":1391,"T_MATCH":519,"T_COMPLEX":1,"T_NODE":6045,"T_ICLASS":48,"T_ZOMBIE":3},70201748333020]
149
150
  ```
150
151
 
151
152
  ## HTTP Response codes
@@ -20,6 +20,7 @@ if gc_events
20
20
  f.puts "static VALUE sym_latest_gc_info[#{gc_latest_info.keys.size}];"
21
21
 
22
22
  f.puts 'typedef struct {'
23
+ f.puts ' VALUE thread_id;'
23
24
  f.puts ' double ts;'
24
25
  f.puts ' size_t peak_rss;'
25
26
  f.puts ' size_t current_rss;'
@@ -51,7 +52,7 @@ if gc_events
51
52
  #
52
53
  f.puts " VALUE stat = rb_ary_new2(#{gc_stat.keys.size});"
53
54
  f.puts " VALUE latest_info = rb_hash_new();"
54
- f.puts " VALUE snapshot = rb_ary_new2(7);"
55
+ f.puts " VALUE snapshot = rb_ary_new2(8);"
55
56
  gc_stat.keys.each.with_index{|k, i|
56
57
  f.puts " rb_ary_store(stat, #{i}, SIZET2NUM(record->#{k}));"
57
58
  }
@@ -65,6 +66,7 @@ if gc_events
65
66
  f.puts " rb_ary_store(snapshot, 4, stat);"
66
67
  f.puts " rb_ary_store(snapshot, 5, latest_info);"
67
68
  f.puts " rb_ary_store(snapshot, 6, Qnil);"
69
+ f.puts " rb_ary_store(snapshot, 7, record->thread_id);"
68
70
  f.puts " return snapshot;"
69
71
  #
70
72
  f.puts "}"
@@ -59,6 +59,11 @@ static void tunemygc_gc_hook_i(VALUE tpval, void *data)
59
59
  rb_event_flag_t flag = rb_tracearg_event_flag(tparg);
60
60
 
61
61
  tunemygc_stat_record *stat = ((tunemygc_stat_record*)malloc(sizeof(tunemygc_stat_record)));
62
+ if (rb_thread_current() == rb_thread_main()) {
63
+ stat->thread_id = Qnil;
64
+ } else {
65
+ stat->thread_id = rb_obj_id(rb_thread_current());
66
+ }
62
67
  stat->ts = _tunemygc_walltime();
63
68
  stat->peak_rss = getPeakRSS();
64
69
  stat->current_rss = getCurrentRSS();
@@ -19,7 +19,7 @@ module TuneMyGc
19
19
  end
20
20
 
21
21
  def take(stage, meta = nil)
22
- _buffer([TuneMyGc.walltime, TuneMyGc.peak_rss, TuneMyGc.current_rss, stage, GC.stat.values_at(*stat_keys), GC.latest_gc_info, meta])
22
+ _buffer([TuneMyGc.walltime, TuneMyGc.peak_rss, TuneMyGc.current_rss, stage, GC.stat.values_at(*stat_keys), GC.latest_gc_info, meta, thread_id])
23
23
  end
24
24
 
25
25
  # low level interface, for tests and GC callback
@@ -44,6 +44,12 @@ module TuneMyGc
44
44
  end
45
45
 
46
46
  private
47
+ def thread_id
48
+ if Thread.current == Thread.main
49
+ Thread.current.object_id
50
+ end
51
+ end
52
+
47
53
  def _buffer(snapshot)
48
54
  if snapshot[3] =~ TERMINATED || size < MAX_SAMPLES
49
55
  self.unit_of_work = true if snapshot[3] =~ UNITS_OF_WORK
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module TuneMyGc
4
- VERSION = "1.0.53"
4
+ VERSION = "1.0.54"
5
5
  end
data/test/fixtures.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  require 'time'
4
4
 
5
5
  module Fixtures
6
- STAGE_BOOTED = [1420152606.1162581, "BOOTED", [32,950,1519,569,385225,2014,0,101119,950,0,2184137,1798912,9665288,16777216,26,6,5145,6032,230164,301030,11715304,24159190], {"major_by"=>nil, "gc_by"=>"newobj", "have_finalizer"=>false, "immediate_sweep"=>false}, nil]
6
+ STAGE_BOOTED = [1420152606.1162581, "BOOTED", [32,950,1519,569,385225,2014,0,101119,950,0,2184137,1798912,9665288,16777216,26,6,5145,6032,230164,301030,11715304,24159190], {"major_by"=>nil, "gc_by"=>"newobj", "have_finalizer"=>false, "immediate_sweep"=>false}, nil,70201748333020]
7
7
 
8
8
  CONFIG = {"Memory"=>{"RUBY_GC_HEAP_INIT_SLOTS"=>307562,"RUBY_GC_HEAP_FREE_SLOTS"=>6151,"RUBY_GC_HEAP_GROWTH_FACTOR"=>0.07,"RUBY_GC_HEAP_GROWTH_MAX_SLOTS"=>6151,"RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR"=>0.11,"RUBY_GC_MALLOC_LIMIT"=>2000000,"RUBY_GC_MALLOC_LIMIT_MAX"=>4000000,"RUBY_GC_MALLOC_LIMIT_GROWTH_FACTOR"=>0.11,"RUBY_GC_OLDMALLOC_LIMIT"=>2000000,"RUBY_GC_OLDMALLOC_LIMIT_MAX"=>4000000,"RUBY_GC_OLDMALLOC_LIMIT_GROWTH_FACTOR"=>0.11},"Speed"=>{"RUBY_GC_HEAP_INIT_SLOTS"=>369074,"RUBY_GC_HEAP_FREE_SLOTS"=>184537,"RUBY_GC_HEAP_GROWTH_FACTOR"=>1.2,"RUBY_GC_HEAP_GROWTH_MAX_SLOTS"=>123024,"RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR"=>2.0,"RUBY_GC_MALLOC_LIMIT"=>64000000,"RUBY_GC_MALLOC_LIMIT_MAX"=>128000000,"RUBY_GC_MALLOC_LIMIT_GROWTH_FACTOR"=>1.2,"RUBY_GC_OLDMALLOC_LIMIT"=>64000000,"RUBY_GC_OLDMALLOC_LIMIT_MAX"=>128000000,"RUBY_GC_OLDMALLOC_LIMIT_GROWTH_FACTOR"=>1.2}, "callback"=>"https://tunemygc.com/configs/8d07e13cc5a7bba2da3510b9ca5e75f4.json"}
9
9
  end
data/test/test_syncer.rb CHANGED
@@ -22,7 +22,7 @@ class TestSyncer < TuneMyGcTestCase
22
22
  to_return(:status => 200, :body => ActiveSupport::JSON.encode({:Memory=>{:RUBY_GC_HEAP_INIT_SLOTS=>477268, :RUBY_GC_HEAP_FREE_SLOTS=>106607, :RUBY_GC_HEAP_GROWTH_FACTOR=>1.05, :RUBY_GC_HEAP_GROWTH_MAX_SLOTS=>10661, :RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=>1.05, :RUBY_GC_MALLOC_LIMIT=>2000000, :RUBY_GC_MALLOC_LIMIT_MAX=>4000000, :RUBY_GC_MALLOC_LIMIT_GROWTH_FACTOR=>1.1, :RUBY_GC_OLDMALLOC_LIMIT=>2000000, :RUBY_GC_OLDMALLOC_LIMIT_MAX=>4000000, :RUBY_GC_OLDMALLOC_LIMIT_GROWTH_FACTOR=>1.05}, :Speed=>{:RUBY_GC_HEAP_INIT_SLOTS=>572722, :RUBY_GC_HEAP_FREE_SLOTS=>553800, :RUBY_GC_HEAP_GROWTH_FACTOR=>1.2, :RUBY_GC_HEAP_GROWTH_MAX_SLOTS=>83070, :RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=>2.0, :RUBY_GC_MALLOC_LIMIT=>64000000, :RUBY_GC_MALLOC_LIMIT_MAX=>128000000, :RUBY_GC_MALLOC_LIMIT_GROWTH_FACTOR=>1.56, :RUBY_GC_OLDMALLOC_LIMIT=>64000000, :RUBY_GC_OLDMALLOC_LIMIT_MAX=>33554432, :RUBY_GC_OLDMALLOC_LIMIT_GROWTH_FACTOR=>1.32}}), :headers => {})
23
23
 
24
24
  stub_request(:post, "https://tunemygc.com/ruby").
25
- with(:body => "[#{ActiveSupport::JSON.encode(syncer.environment(snapshots))},[1420152606.1162581,\"BOOTED\",[32,950,1519,569,385225,2014,0,101119,950,0,2184137,1798912,9665288,16777216,26,6,5145,6032,230164,301030,11715304,24159190],{\"major_by\":null,\"gc_by\":\"newobj\",\"have_finalizer\":false,\"immediate_sweep\":false},null]]",
25
+ with(:body => "[#{ActiveSupport::JSON.encode(syncer.environment(snapshots))},[1420152606.1162581,\"BOOTED\",[32,950,1519,569,385225,2014,0,101119,950,0,2184137,1798912,9665288,16777216,26,6,5145,6032,230164,301030,11715304,24159190],{\"major_by\":null,\"gc_by\":\"newobj\",\"have_finalizer\":false,\"immediate_sweep\":false},null,70201748333020]]",
26
26
  :headers => {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/json', 'User-Agent'=>"TuneMyGC #{TuneMyGc::VERSION}"}).
27
27
  to_return(:status => 200, :body => "https://www.tunemygc.com/configs/xxxxxxx", :headers => {})
28
28
 
@@ -40,7 +40,7 @@ class TestSyncer < TuneMyGcTestCase
40
40
  snapshots = TuneMyGc::Snapshotter.new
41
41
  snapshots.take_raw(Fixtures::STAGE_BOOTED)
42
42
  stub_request(:post, "https://tunemygc.com/ruby").
43
- with(:body => "[#{ActiveSupport::JSON.encode(syncer.environment(snapshots))},[1420152606.1162581,\"BOOTED\",[32,950,1519,569,385225,2014,0,101119,950,0,2184137,1798912,9665288,16777216,26,6,5145,6032,230164,301030,11715304,24159190],{\"major_by\":null,\"gc_by\":\"newobj\",\"have_finalizer\":false,\"immediate_sweep\":false},null]]",
43
+ with(:body => "[#{ActiveSupport::JSON.encode(syncer.environment(snapshots))},[1420152606.1162581,\"BOOTED\",[32,950,1519,569,385225,2014,0,101119,950,0,2184137,1798912,9665288,16777216,26,6,5145,6032,230164,301030,11715304,24159190],{\"major_by\":null,\"gc_by\":\"newobj\",\"have_finalizer\":false,\"immediate_sweep\":false},null,70201748333020]]",
44
44
  :headers => {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/json', 'User-Agent'=>"TuneMyGC #{TuneMyGc::VERSION}"}).
45
45
  to_return(:status => 501, :body => "", :headers => {})
46
46
 
@@ -59,7 +59,7 @@ class TestSyncer < TuneMyGcTestCase
59
59
  snapshots = TuneMyGc::Snapshotter.new
60
60
  snapshots.take_raw(Fixtures::STAGE_BOOTED)
61
61
  stub_request(:post, "https://tunemygc.com/ruby").
62
- with(:body => "[#{ActiveSupport::JSON.encode(syncer.environment(snapshots))},[1420152606.1162581,\"BOOTED\",[32,950,1519,569,385225,2014,0,101119,950,0,2184137,1798912,9665288,16777216,26,6,5145,6032,230164,301030,11715304,24159190],{\"major_by\":null,\"gc_by\":\"newobj\",\"have_finalizer\":false,\"immediate_sweep\":false},null]]",
62
+ with(:body => "[#{ActiveSupport::JSON.encode(syncer.environment(snapshots))},[1420152606.1162581,\"BOOTED\",[32,950,1519,569,385225,2014,0,101119,950,0,2184137,1798912,9665288,16777216,26,6,5145,6032,230164,301030,11715304,24159190],{\"major_by\":null,\"gc_by\":\"newobj\",\"have_finalizer\":false,\"immediate_sweep\":false},null,70201748333020]]",
63
63
  :headers => {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/json', 'User-Agent'=>"TuneMyGC #{TuneMyGc::VERSION}"}).
64
64
  to_return(:status => 412, :body => "", :headers => {})
65
65
 
@@ -76,7 +76,7 @@ class TestSyncer < TuneMyGcTestCase
76
76
  snapshots = TuneMyGc::Snapshotter.new
77
77
  snapshots.take_raw(Fixtures::STAGE_BOOTED)
78
78
  stub_request(:post, "https://tunemygc.com/ruby").
79
- with(:body => "[#{ActiveSupport::JSON.encode(syncer.environment(snapshots))},[1420152606.1162581,\"BOOTED\",[32,950,1519,569,385225,2014,0,101119,950,0,2184137,1798912,9665288,16777216,26,6,5145,6032,230164,301030,11715304,24159190],{\"major_by\":null,\"gc_by\":\"newobj\",\"have_finalizer\":false,\"immediate_sweep\":false},null]]",
79
+ with(:body => "[#{ActiveSupport::JSON.encode(syncer.environment(snapshots))},[1420152606.1162581,\"BOOTED\",[32,950,1519,569,385225,2014,0,101119,950,0,2184137,1798912,9665288,16777216,26,6,5145,6032,230164,301030,11715304,24159190],{\"major_by\":null,\"gc_by\":\"newobj\",\"have_finalizer\":false,\"immediate_sweep\":false},null,70201748333020]]",
80
80
  :headers => {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/json', 'User-Agent'=>"TuneMyGC #{TuneMyGc::VERSION}"}).
81
81
  to_return(:status => 400, :body => "snapshot timestamp", :headers => {})
82
82
 
@@ -94,7 +94,7 @@ class TestSyncer < TuneMyGcTestCase
94
94
  snapshots = TuneMyGc::Snapshotter.new
95
95
  snapshots.take_raw(Fixtures::STAGE_BOOTED)
96
96
  stub_request(:post, "https://tunemygc.com/ruby").
97
- with(:body => "[#{ActiveSupport::JSON.encode(syncer.environment(snapshots))},[1420152606.1162581,\"BOOTED\",[32,950,1519,569,385225,2014,0,101119,950,0,2184137,1798912,9665288,16777216,26,6,5145,6032,230164,301030,11715304,24159190],{\"major_by\":null,\"gc_by\":\"newobj\",\"have_finalizer\":false,\"immediate_sweep\":false},null]]",
97
+ with(:body => "[#{ActiveSupport::JSON.encode(syncer.environment(snapshots))},[1420152606.1162581,\"BOOTED\",[32,950,1519,569,385225,2014,0,101119,950,0,2184137,1798912,9665288,16777216,26,6,5145,6032,230164,301030,11715304,24159190],{\"major_by\":null,\"gc_by\":\"newobj\",\"have_finalizer\":false,\"immediate_sweep\":false},null,70201748333020]]",
98
98
  :headers => {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/json', 'User-Agent'=>"TuneMyGC #{TuneMyGc::VERSION}"}).
99
99
  to_return(:status => 404, :body => "", :headers => {})
100
100
 
@@ -110,7 +110,7 @@ class TestSyncer < TuneMyGcTestCase
110
110
  snapshots = TuneMyGc::Snapshotter.new
111
111
  snapshots.take_raw(Fixtures::STAGE_BOOTED)
112
112
  stub_request(:post, "https://tunemygc.com/ruby").
113
- with(:body => "[#{ActiveSupport::JSON.encode(syncer.environment(snapshots))},[1420152606.1162581,\"BOOTED\",[32,950,1519,569,385225,2014,0,101119,950,0,2184137,1798912,9665288,16777216,26,6,5145,6032,230164,301030,11715304,24159190],{\"major_by\":null,\"gc_by\":\"newobj\",\"have_finalizer\":false,\"immediate_sweep\":false},null]]",
113
+ with(:body => "[#{ActiveSupport::JSON.encode(syncer.environment(snapshots))},[1420152606.1162581,\"BOOTED\",[32,950,1519,569,385225,2014,0,101119,950,0,2184137,1798912,9665288,16777216,26,6,5145,6032,230164,301030,11715304,24159190],{\"major_by\":null,\"gc_by\":\"newobj\",\"have_finalizer\":false,\"immediate_sweep\":false},null,70201748333020]]",
114
114
  :headers => {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/json', 'User-Agent'=>"TuneMyGC #{TuneMyGc::VERSION}"}).
115
115
  to_return(:status => 426, :body => "2", :headers => {})
116
116
 
@@ -127,7 +127,7 @@ class TestSyncer < TuneMyGcTestCase
127
127
  snapshots = TuneMyGc::Snapshotter.new
128
128
  snapshots.take_raw(Fixtures::STAGE_BOOTED)
129
129
  stub_request(:post, "https://tunemygc.com/ruby").
130
- with(:body => "[#{ActiveSupport::JSON.encode(syncer.environment(snapshots))},[1420152606.1162581,\"BOOTED\",[32,950,1519,569,385225,2014,0,101119,950,0,2184137,1798912,9665288,16777216,26,6,5145,6032,230164,301030,11715304,24159190],{\"major_by\":null,\"gc_by\":\"newobj\",\"have_finalizer\":false,\"immediate_sweep\":false},null]]",
130
+ with(:body => "[#{ActiveSupport::JSON.encode(syncer.environment(snapshots))},[1420152606.1162581,\"BOOTED\",[32,950,1519,569,385225,2014,0,101119,950,0,2184137,1798912,9665288,16777216,26,6,5145,6032,230164,301030,11715304,24159190],{\"major_by\":null,\"gc_by\":\"newobj\",\"have_finalizer\":false,\"immediate_sweep\":false},null,70201748333020]]",
131
131
  :headers => {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/json', 'User-Agent'=>"TuneMyGC #{TuneMyGc::VERSION}"}).to_raise(IOError.new("dang"))
132
132
 
133
133
  out, err = capture_io do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tunemygc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.53
4
+ version: 1.0.54
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bear Metal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-02 00:00:00.000000000 Z
11
+ date: 2015-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport