traceview 3.0.2 → 3.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +39 -14
  3. data/Gemfile +4 -62
  4. data/Rakefile +23 -8
  5. data/gemfiles/frameworks.gemfile +40 -0
  6. data/gemfiles/libraries.gemfile +78 -0
  7. data/gemfiles/rails23.gemfile +47 -0
  8. data/gemfiles/rails30.gemfile +47 -0
  9. data/gemfiles/rails31.gemfile +47 -0
  10. data/gemfiles/rails32.gemfile +47 -0
  11. data/gemfiles/rails40.gemfile +35 -0
  12. data/gemfiles/rails41.gemfile +35 -0
  13. data/gemfiles/rails42.gemfile +35 -0
  14. data/lib/traceview/api/logging.rb +84 -38
  15. data/lib/traceview/frameworks/rails/inst/action_controller.rb +1 -1
  16. data/lib/traceview/inst/moped.rb +2 -2
  17. data/lib/traceview/util.rb +30 -34
  18. data/lib/traceview/version.rb +1 -1
  19. data/test/frameworks/apps/grape_nested.rb +3 -0
  20. data/test/frameworks/apps/grape_simple.rb +3 -0
  21. data/test/frameworks/apps/sinatra_simple.rb +3 -0
  22. data/test/frameworks/grape_test.rb +8 -4
  23. data/test/frameworks/padrino_test.rb +6 -2
  24. data/test/frameworks/rails2x_test.rb +3 -0
  25. data/test/frameworks/rails3x_test.rb +91 -0
  26. data/test/frameworks/rails4x_test.rb +89 -0
  27. data/test/frameworks/sinatra_test.rb +3 -0
  28. data/test/instrumentation/cassandra_test.rb +11 -4
  29. data/test/instrumentation/dalli_test.rb +3 -0
  30. data/test/instrumentation/em_http_request_test.rb +3 -0
  31. data/test/instrumentation/excon_test.rb +3 -0
  32. data/test/instrumentation/faraday_test.rb +3 -0
  33. data/test/instrumentation/http_test.rb +3 -0
  34. data/test/instrumentation/httpclient_test.rb +3 -0
  35. data/test/instrumentation/memcache_test.rb +9 -0
  36. data/test/instrumentation/memcached_test.rb +3 -0
  37. data/test/instrumentation/mongo_test.rb +14 -3
  38. data/test/instrumentation/moped_test.rb +29 -6
  39. data/test/instrumentation/rack_test.rb +3 -0
  40. data/test/instrumentation/redis_hashes_test.rb +187 -184
  41. data/test/instrumentation/redis_keys_test.rb +223 -220
  42. data/test/instrumentation/redis_lists_test.rb +225 -225
  43. data/test/instrumentation/redis_misc_test.rb +123 -120
  44. data/test/instrumentation/redis_sets_test.rb +216 -213
  45. data/test/instrumentation/redis_sortedsets_test.rb +245 -242
  46. data/test/instrumentation/redis_strings_test.rb +242 -238
  47. data/test/instrumentation/resque_test.rb +3 -0
  48. data/test/instrumentation/rest-client_test.rb +3 -0
  49. data/test/instrumentation/sequel_mysql2_test.rb +4 -1
  50. data/test/instrumentation/sequel_mysql_test.rb +4 -1
  51. data/test/instrumentation/sequel_pg_test.rb +4 -1
  52. data/test/minitest_helper.rb +25 -8
  53. data/test/profiling/method_test.rb +3 -0
  54. data/test/servers/rackapp_8101.rb +1 -1
  55. data/test/servers/rails2x_8140.rb +2 -2
  56. data/test/servers/rails3x_8140.rb +78 -0
  57. data/test/servers/rails4x_8140.rb +78 -0
  58. data/test/support/backcompat_test.rb +3 -0
  59. data/test/support/config_test.rb +3 -0
  60. data/test/support/dnt_test.rb +3 -0
  61. data/test/support/liboboe_settings_test.rb +3 -0
  62. data/test/support/tvalias_test.rb +3 -0
  63. data/test/support/xtrace_test.rb +3 -0
  64. metadata +19 -5
  65. data/Appraisals +0 -10
  66. data/gemfiles/mongo.gemfile +0 -33
  67. data/gemfiles/moped.gemfile +0 -33
@@ -1,318 +1,321 @@
1
+ # Copyright (c) 2015 AppNeta, Inc.
2
+ # All rights reserved.
3
+
1
4
  require 'minitest_helper'
2
- require "redis"
3
5
 
4
- describe "Redis Keys" do
5
- attr_reader :entry_kvs, :exit_kvs, :redis, :redis_version
6
+ if defined?(::Redis)
7
+ describe "Redis Keys" do
8
+ attr_reader :entry_kvs, :exit_kvs, :redis, :redis_version
6
9
 
7
- def min_server_version(version)
8
- unless Gem::Version.new(@redis_version) >= Gem::Version.new(version.to_s)
9
- skip "supported only on redis-server #{version} or greater"
10
+ def min_server_version(version)
11
+ unless Gem::Version.new(@redis_version) >= Gem::Version.new(version.to_s)
12
+ skip "supported only on redis-server #{version} or greater"
13
+ end
10
14
  end
11
- end
12
15
 
13
- before do
14
- clear_all_traces
16
+ before do
17
+ clear_all_traces
15
18
 
16
- @redis ||= Redis.new
19
+ @redis ||= Redis.new
17
20
 
18
- @redis_version ||= @redis.info["redis_version"]
21
+ @redis_version ||= @redis.info["redis_version"]
19
22
 
20
- # These are standard entry/exit KVs that are passed up with all moped operations
21
- @entry_kvs ||= { 'Layer' => 'redis_test', 'Label' => 'entry' }
22
- @exit_kvs ||= { 'Layer' => 'redis_test', 'Label' => 'exit' }
23
- end
23
+ # These are standard entry/exit KVs that are passed up with all moped operations
24
+ @entry_kvs ||= { 'Layer' => 'redis_test', 'Label' => 'entry' }
25
+ @exit_kvs ||= { 'Layer' => 'redis_test', 'Label' => 'exit' }
26
+ end
24
27
 
25
- it 'Stock Redis should be loaded, defined and ready' do
26
- defined?(::Redis).wont_match nil
27
- end
28
+ it 'Stock Redis should be loaded, defined and ready' do
29
+ defined?(::Redis).wont_match nil
30
+ end
28
31
 
29
- it "should trace del" do
30
- @redis.setex("del_test", 60, "blah")
32
+ it "should trace del" do
33
+ @redis.setex("del_test", 60, "blah")
31
34
 
32
- TraceView::API.start_trace('redis_test', '', {}) do
33
- @redis.del("del_test")
35
+ TraceView::API.start_trace('redis_test', '', {}) do
36
+ @redis.del("del_test")
37
+ end
38
+
39
+ traces = get_all_traces
40
+ traces.count.must_equal 4
41
+ traces[2]['KVOp'].must_equal "del"
42
+ traces[2]['KVKey'].must_equal "del_test"
34
43
  end
35
44
 
36
- traces = get_all_traces
37
- traces.count.must_equal 4
38
- traces[2]['KVOp'].must_equal "del"
39
- traces[2]['KVKey'].must_equal "del_test"
40
- end
45
+ it "should trace del of multiple keys" do
46
+ @redis.setex("del_test", 60, "blah")
41
47
 
42
- it "should trace del of multiple keys" do
43
- @redis.setex("del_test", 60, "blah")
48
+ TraceView::API.start_trace('redis_test', '', {}) do
49
+ @redis.del(["del_test", "noexist", "maybe"])
50
+ end
44
51
 
45
- TraceView::API.start_trace('redis_test', '', {}) do
46
- @redis.del(["del_test", "noexist", "maybe"])
52
+ traces = get_all_traces
53
+ traces.count.must_equal 4
54
+ traces[2]['KVOp'].must_equal "del"
55
+ traces[2].has_key?('KVKey').must_equal false
47
56
  end
48
57
 
49
- traces = get_all_traces
50
- traces.count.must_equal 4
51
- traces[2]['KVOp'].must_equal "del"
52
- traces[2].has_key?('KVKey').must_equal false
53
- end
58
+ it "should trace dump" do
59
+ min_server_version(2.6)
54
60
 
55
- it "should trace dump" do
56
- min_server_version(2.6)
61
+ @redis.setex("dump_test", 60, "blah")
57
62
 
58
- @redis.setex("dump_test", 60, "blah")
63
+ TraceView::API.start_trace('redis_test', '', {}) do
64
+ @redis.dump("del_test")
65
+ end
59
66
 
60
- TraceView::API.start_trace('redis_test', '', {}) do
61
- @redis.dump("del_test")
67
+ traces = get_all_traces
68
+ traces.count.must_equal 4
69
+ traces[2]['KVOp'].must_equal "dump"
70
+ traces[2]['KVKey'].must_equal "del_test"
62
71
  end
63
72
 
64
- traces = get_all_traces
65
- traces.count.must_equal 4
66
- traces[2]['KVOp'].must_equal "dump"
67
- traces[2]['KVKey'].must_equal "del_test"
68
- end
73
+ it "should trace exists" do
74
+ @redis.setex("talking_heads", 60, "burning down the house")
69
75
 
70
- it "should trace exists" do
71
- @redis.setex("talking_heads", 60, "burning down the house")
76
+ TraceView::API.start_trace('redis_test', '', {}) do
77
+ @it_exists = @redis.exists("talking_heads")
78
+ end
72
79
 
73
- TraceView::API.start_trace('redis_test', '', {}) do
74
- @it_exists = @redis.exists("talking_heads")
75
- end
80
+ @it_exists.must_equal true
76
81
 
77
- @it_exists.must_equal true
82
+ traces = get_all_traces
83
+ traces.count.must_equal 4
84
+ traces[2]['KVOp'].must_equal "exists"
85
+ traces[2]['KVKey'].must_equal "talking_heads"
86
+ end
78
87
 
79
- traces = get_all_traces
80
- traces.count.must_equal 4
81
- traces[2]['KVOp'].must_equal "exists"
82
- traces[2]['KVKey'].must_equal "talking_heads"
83
- end
88
+ it "should trace expire" do
89
+ @redis.set("expire_please", "burning down the house")
84
90
 
85
- it "should trace expire" do
86
- @redis.set("expire_please", "burning down the house")
91
+ TraceView::API.start_trace('redis_test', '', {}) do
92
+ @redis.expire("expire_please", 120)
93
+ end
87
94
 
88
- TraceView::API.start_trace('redis_test', '', {}) do
89
- @redis.expire("expire_please", 120)
95
+ traces = get_all_traces
96
+ traces.count.must_equal 4
97
+ traces[2]['KVOp'].must_equal "expire"
98
+ traces[2]['KVKey'].must_equal "expire_please"
90
99
  end
91
100
 
92
- traces = get_all_traces
93
- traces.count.must_equal 4
94
- traces[2]['KVOp'].must_equal "expire"
95
- traces[2]['KVKey'].must_equal "expire_please"
96
- end
101
+ it "should trace expireat" do
102
+ @redis.set("expireat_please", "burning down the house")
97
103
 
98
- it "should trace expireat" do
99
- @redis.set("expireat_please", "burning down the house")
104
+ TraceView::API.start_trace('redis_test', '', {}) do
105
+ @redis.expireat("expireat_please", Time.now.to_i)
106
+ end
100
107
 
101
- TraceView::API.start_trace('redis_test', '', {}) do
102
- @redis.expireat("expireat_please", Time.now.to_i)
108
+ traces = get_all_traces
109
+ traces.count.must_equal 4
110
+ traces[2]['KVOp'].must_equal "expireat"
111
+ traces[2]['KVKey'].must_equal "expireat_please"
103
112
  end
104
113
 
105
- traces = get_all_traces
106
- traces.count.must_equal 4
107
- traces[2]['KVOp'].must_equal "expireat"
108
- traces[2]['KVKey'].must_equal "expireat_please"
109
- end
114
+ it "should trace keys" do
115
+ TraceView::API.start_trace('redis_test', '', {}) do
116
+ @redis.keys("del*")
117
+ end
110
118
 
111
- it "should trace keys" do
112
- TraceView::API.start_trace('redis_test', '', {}) do
113
- @redis.keys("del*")
119
+ traces = get_all_traces
120
+ traces.count.must_equal 4
121
+ traces[2]['KVOp'].must_equal "keys"
122
+ traces[2]['pattern'].must_equal "del*"
114
123
  end
115
124
 
116
- traces = get_all_traces
117
- traces.count.must_equal 4
118
- traces[2]['KVOp'].must_equal "keys"
119
- traces[2]['pattern'].must_equal "del*"
120
- end
125
+ it "should trace basic move" do
126
+ @redis.set("piano", Time.now)
121
127
 
122
- it "should trace basic move" do
123
- @redis.set("piano", Time.now)
128
+ TraceView::API.start_trace('redis_test', '', {}) do
129
+ @redis.move("piano", 1)
130
+ end
124
131
 
125
- TraceView::API.start_trace('redis_test', '', {}) do
126
- @redis.move("piano", 1)
132
+ traces = get_all_traces
133
+ traces.count.must_equal 4
134
+ traces[2]['KVOp'].must_equal "move"
135
+ traces[2]['KVKey'].must_equal "piano"
136
+ traces[2]['db'].must_equal 1
127
137
  end
128
138
 
129
- traces = get_all_traces
130
- traces.count.must_equal 4
131
- traces[2]['KVOp'].must_equal "move"
132
- traces[2]['KVKey'].must_equal "piano"
133
- traces[2]['db'].must_equal 1
134
- end
139
+ it "should trace persist" do
140
+ min_server_version(2.2)
135
141
 
136
- it "should trace persist" do
137
- min_server_version(2.2)
142
+ @redis.setex("mine", 60, "blah")
138
143
 
139
- @redis.setex("mine", 60, "blah")
144
+ TraceView::API.start_trace('redis_test', '', {}) do
145
+ @redis.persist("mine")
146
+ end
140
147
 
141
- TraceView::API.start_trace('redis_test', '', {}) do
142
- @redis.persist("mine")
148
+ traces = get_all_traces
149
+ traces.count.must_equal 4
150
+ traces[2]['KVOp'].must_equal "persist"
151
+ traces[2]['KVKey'].must_equal "mine"
143
152
  end
144
153
 
145
- traces = get_all_traces
146
- traces.count.must_equal 4
147
- traces[2]['KVOp'].must_equal "persist"
148
- traces[2]['KVKey'].must_equal "mine"
149
- end
154
+ it "should trace pexpire" do
155
+ min_server_version(2.6)
150
156
 
151
- it "should trace pexpire" do
152
- min_server_version(2.6)
157
+ @redis.set("sand", "blah")
153
158
 
154
- @redis.set("sand", "blah")
159
+ TraceView::API.start_trace('redis_test', '', {}) do
160
+ @rv = @redis.pexpire("sand", 8000)
161
+ end
155
162
 
156
- TraceView::API.start_trace('redis_test', '', {}) do
157
- @rv = @redis.pexpire("sand", 8000)
163
+ @rv.must_equal true
164
+
165
+ traces = get_all_traces
166
+ traces.count.must_equal 4
167
+ traces[2]['KVOp'].must_equal "pexpire"
168
+ traces[2]['KVKey'].must_equal "sand"
169
+ traces[2]['milliseconds'].must_equal 8000
158
170
  end
159
171
 
160
- @rv.must_equal true
172
+ it "should trace pexpireat" do
173
+ min_server_version(2.6)
161
174
 
162
- traces = get_all_traces
163
- traces.count.must_equal 4
164
- traces[2]['KVOp'].must_equal "pexpire"
165
- traces[2]['KVKey'].must_equal "sand"
166
- traces[2]['milliseconds'].must_equal 8000
167
- end
175
+ @redis.set("sand", "blah")
168
176
 
169
- it "should trace pexpireat" do
170
- min_server_version(2.6)
177
+ TraceView::API.start_trace('redis_test', '', {}) do
178
+ @rv = @redis.pexpireat("sand", 8000)
179
+ end
171
180
 
172
- @redis.set("sand", "blah")
181
+ @rv.must_equal true
173
182
 
174
- TraceView::API.start_trace('redis_test', '', {}) do
175
- @rv = @redis.pexpireat("sand", 8000)
183
+ traces = get_all_traces
184
+ traces.count.must_equal 4
185
+ traces[2]['KVOp'].must_equal "pexpireat"
186
+ traces[2]['KVKey'].must_equal "sand"
187
+ traces[2]['milliseconds'].must_equal 8000
176
188
  end
177
189
 
178
- @rv.must_equal true
190
+ it "should trace pttl" do
191
+ min_server_version(2.6)
179
192
 
180
- traces = get_all_traces
181
- traces.count.must_equal 4
182
- traces[2]['KVOp'].must_equal "pexpireat"
183
- traces[2]['KVKey'].must_equal "sand"
184
- traces[2]['milliseconds'].must_equal 8000
185
- end
186
-
187
- it "should trace pttl" do
188
- min_server_version(2.6)
193
+ @redis.setex("sand", 120, "blah")
189
194
 
190
- @redis.setex("sand", 120, "blah")
195
+ TraceView::API.start_trace('redis_test', '', {}) do
196
+ @redis.pttl("sand")
197
+ end
191
198
 
192
- TraceView::API.start_trace('redis_test', '', {}) do
193
- @redis.pttl("sand")
199
+ traces = get_all_traces
200
+ traces.count.must_equal 4
201
+ traces[2]['KVOp'].must_equal "pttl"
202
+ traces[2]['KVKey'].must_equal "sand"
194
203
  end
195
204
 
196
- traces = get_all_traces
197
- traces.count.must_equal 4
198
- traces[2]['KVOp'].must_equal "pttl"
199
- traces[2]['KVKey'].must_equal "sand"
200
- end
205
+ it "should trace randomkey" do
206
+ TraceView::API.start_trace('redis_test', '', {}) do
207
+ @redis.randomkey()
208
+ end
201
209
 
202
- it "should trace randomkey" do
203
- TraceView::API.start_trace('redis_test', '', {}) do
204
- @redis.randomkey()
210
+ traces = get_all_traces
211
+ traces.count.must_equal 4
212
+ traces[2]['KVOp'].must_equal "randomkey"
205
213
  end
206
214
 
207
- traces = get_all_traces
208
- traces.count.must_equal 4
209
- traces[2]['KVOp'].must_equal "randomkey"
210
- end
215
+ it "should trace rename" do
216
+ @redis.setex("sand", 120, "blah")
211
217
 
212
- it "should trace rename" do
213
- @redis.setex("sand", 120, "blah")
218
+ TraceView::API.start_trace('redis_test', '', {}) do
219
+ @redis.rename("sand", "sandy")
220
+ end
214
221
 
215
- TraceView::API.start_trace('redis_test', '', {}) do
216
- @redis.rename("sand", "sandy")
222
+ traces = get_all_traces
223
+ traces.count.must_equal 4
224
+ traces[2]['KVOp'].must_equal "rename"
225
+ traces[2]['KVKey'].must_equal "sand"
226
+ traces[2]['newkey'].must_equal "sandy"
217
227
  end
218
228
 
219
- traces = get_all_traces
220
- traces.count.must_equal 4
221
- traces[2]['KVOp'].must_equal "rename"
222
- traces[2]['KVKey'].must_equal "sand"
223
- traces[2]['newkey'].must_equal "sandy"
224
- end
229
+ it "should trace renamenx" do
230
+ @redis.setex("sand", 120, "blah")
225
231
 
226
- it "should trace renamenx" do
227
- @redis.setex("sand", 120, "blah")
232
+ TraceView::API.start_trace('redis_test', '', {}) do
233
+ @redis.renamenx("sand", "sandy")
234
+ end
228
235
 
229
- TraceView::API.start_trace('redis_test', '', {}) do
230
- @redis.renamenx("sand", "sandy")
236
+ traces = get_all_traces
237
+ traces.count.must_equal 4
238
+ traces[2]['KVOp'].must_equal "renamenx"
239
+ traces[2]['KVKey'].must_equal "sand"
240
+ traces[2]['newkey'].must_equal "sandy"
231
241
  end
232
242
 
233
- traces = get_all_traces
234
- traces.count.must_equal 4
235
- traces[2]['KVOp'].must_equal "renamenx"
236
- traces[2]['KVKey'].must_equal "sand"
237
- traces[2]['newkey'].must_equal "sandy"
238
- end
243
+ it "should trace restore" do
244
+ min_server_version(2.6)
239
245
 
240
- it "should trace restore" do
241
- min_server_version(2.6)
246
+ @redis.setex("qubit", 60, "zero")
247
+ x = @redis.dump("qubit")
248
+ @redis.del "blue"
242
249
 
243
- @redis.setex("qubit", 60, "zero")
244
- x = @redis.dump("qubit")
245
- @redis.del "blue"
250
+ TraceView::API.start_trace('redis_test', '', {}) do
251
+ @redis.restore("blue", 0, x)
252
+ end
246
253
 
247
- TraceView::API.start_trace('redis_test', '', {}) do
248
- @redis.restore("blue", 0, x)
254
+ traces = get_all_traces
255
+ traces.count.must_equal 4
256
+ traces[2]['KVOp'].must_equal "restore"
257
+ traces[2]['KVKey'].must_equal "blue"
258
+ traces[2]['ttl'].must_equal 0
249
259
  end
250
260
 
251
- traces = get_all_traces
252
- traces.count.must_equal 4
253
- traces[2]['KVOp'].must_equal "restore"
254
- traces[2]['KVKey'].must_equal "blue"
255
- traces[2]['ttl'].must_equal 0
256
- end
261
+ it "should trace sort" do
262
+ min_server_version(2.2)
257
263
 
258
- it "should trace sort" do
259
- min_server_version(2.2)
264
+ @redis.rpush("penguin", "one")
265
+ @redis.rpush("penguin", "two")
266
+ @redis.rpush("penguin", "three")
267
+ @redis.rpush("penguin", "four")
260
268
 
261
- @redis.rpush("penguin", "one")
262
- @redis.rpush("penguin", "two")
263
- @redis.rpush("penguin", "three")
264
- @redis.rpush("penguin", "four")
269
+ TraceView::API.start_trace('redis_test', '', {}) do
270
+ @redis.sort("penguin", :order => "desc alpha", :store => "target")
271
+ end
265
272
 
266
- TraceView::API.start_trace('redis_test', '', {}) do
267
- @redis.sort("penguin", :order => "desc alpha", :store => "target")
273
+ traces = get_all_traces
274
+ traces.count.must_equal 4
275
+ traces[2]['KVOp'].must_equal "sort"
276
+ traces[2]['KVKey'].must_equal "penguin"
268
277
  end
269
278
 
270
- traces = get_all_traces
271
- traces.count.must_equal 4
272
- traces[2]['KVOp'].must_equal "sort"
273
- traces[2]['KVKey'].must_equal "penguin"
274
- end
279
+ it "should trace ttl" do
280
+ min_server_version(2.6)
275
281
 
276
- it "should trace ttl" do
277
- min_server_version(2.6)
282
+ @redis.setex("sand", 120, "blah")
278
283
 
279
- @redis.setex("sand", 120, "blah")
284
+ TraceView::API.start_trace('redis_test', '', {}) do
285
+ @redis.ttl("sand")
286
+ end
280
287
 
281
- TraceView::API.start_trace('redis_test', '', {}) do
282
- @redis.ttl("sand")
288
+ traces = get_all_traces
289
+ traces.count.must_equal 4
290
+ traces[2]['KVOp'].must_equal "ttl"
291
+ traces[2]['KVKey'].must_equal "sand"
283
292
  end
284
293
 
285
- traces = get_all_traces
286
- traces.count.must_equal 4
287
- traces[2]['KVOp'].must_equal "ttl"
288
- traces[2]['KVKey'].must_equal "sand"
289
- end
294
+ it "should trace type" do
295
+ min_server_version(2.6)
290
296
 
291
- it "should trace type" do
292
- min_server_version(2.6)
297
+ @redis.setex("sand", 120, "blah")
293
298
 
294
- @redis.setex("sand", 120, "blah")
299
+ TraceView::API.start_trace('redis_test', '', {}) do
300
+ @redis.type("sand")
301
+ end
295
302
 
296
- TraceView::API.start_trace('redis_test', '', {}) do
297
- @redis.type("sand")
303
+ traces = get_all_traces
304
+ traces.count.must_equal 4
305
+ traces[2]['KVOp'].must_equal "type"
306
+ traces[2]['KVKey'].must_equal "sand"
298
307
  end
299
308
 
300
- traces = get_all_traces
301
- traces.count.must_equal 4
302
- traces[2]['KVOp'].must_equal "type"
303
- traces[2]['KVKey'].must_equal "sand"
304
- end
309
+ it "should trace scan" do
310
+ min_server_version(2.8)
305
311
 
306
- it "should trace scan" do
307
- min_server_version(2.8)
312
+ TraceView::API.start_trace('redis_test', '', {}) do
313
+ @redis.scan(0)
314
+ end
308
315
 
309
- TraceView::API.start_trace('redis_test', '', {}) do
310
- @redis.scan(0)
316
+ traces = get_all_traces
317
+ traces.count.must_equal 4
318
+ traces[2]['KVOp'].must_equal "scan"
311
319
  end
312
-
313
- traces = get_all_traces
314
- traces.count.must_equal 4
315
- traces[2]['KVOp'].must_equal "scan"
316
320
  end
317
321
  end
318
-