@@ -45,15 +45,15 @@ def ping(opts = {})
4545
4646 warmup_repetitions . times { client . ping }
4747
48- start = Process . clock_gettime ( Process :: CLOCK_MONOTONIC )
48+ start = current_time
4949 results = measured_repetitions . times . collect do
5050 Benchmark . realtime do
5151 action_iterations . times do
5252 client . ping
5353 end
5454 end
5555 end
56- end_time = Process . clock_gettime ( Process :: CLOCK_MONOTONIC )
56+ end_time = current_time
5757
5858 options = { duration : end_time - start ,
5959 operation : __method__ ,
@@ -82,15 +82,15 @@ def create_index(opts = {})
8282 end
8383
8484 with_cleanup do
85- start = Process . clock_gettime ( Process :: CLOCK_MONOTONIC )
85+ start = current_time
8686 results = measured_repetitions . times . collect do
8787 Benchmark . realtime do
8888 action_iterations . times do
8989 client . indices . create ( index : "benchmarking-#{ Time . now . to_f } " )
9090 end
9191 end
9292 end
93- end_time = Process . clock_gettime ( Process :: CLOCK_MONOTONIC )
93+ end_time = current_time
9494 results
9595 end
9696
@@ -122,15 +122,15 @@ def index_document_small(opts={})
122122 end
123123
124124 with_cleanup do
125- start = Process . clock_gettime ( Process :: CLOCK_MONOTONIC )
125+ start = current_time
126126 results = measured_repetitions . times . collect do
127127 Benchmark . realtime do
128128 action_iterations . times do
129129 client . create ( index : INDEX , body : document )
130130 end
131131 end
132132 end
133- end_time = Process . clock_gettime ( Process :: CLOCK_MONOTONIC )
133+ end_time = current_time
134134 results
135135 end
136136
@@ -165,15 +165,15 @@ def index_document_large(opts={})
165165 end
166166
167167 with_cleanup do
168- start = Process . clock_gettime ( Process :: CLOCK_MONOTONIC )
168+ start = current_time
169169 results = measured_repetitions . times . collect do
170170 Benchmark . realtime do
171171 action_iterations . times do
172172 client . create ( index : INDEX , body : document )
173173 end
174174 end
175175 end
176- end_time = Process . clock_gettime ( Process :: CLOCK_MONOTONIC )
176+ end_time = current_time
177177 results
178178 end
179179
@@ -208,15 +208,15 @@ def get_document_small(opts={})
208208 client . get ( index : INDEX , id : id )
209209 end
210210
211- start = Process . clock_gettime ( Process :: CLOCK_MONOTONIC )
211+ start = current_time
212212 results = measured_repetitions . times . collect do
213213 Benchmark . realtime do
214214 action_iterations . times do
215215 client . get ( index : INDEX , id : id )
216216 end
217217 end
218218 end
219- end_time = Process . clock_gettime ( Process :: CLOCK_MONOTONIC )
219+ end_time = current_time
220220 results
221221 end
222222
@@ -251,15 +251,15 @@ def get_document_large(opts={})
251251 client . get ( index : INDEX , id : id )
252252 end
253253
254- start = Process . clock_gettime ( Process :: CLOCK_MONOTONIC )
254+ start = current_time
255255 results = measured_repetitions . times . collect do
256256 Benchmark . realtime do
257257 action_iterations . times do
258258 client . get ( index : INDEX , id : id )
259259 end
260260 end
261261 end
262- end_time = Process . clock_gettime ( Process :: CLOCK_MONOTONIC )
262+ end_time = current_time
263263 end
264264
265265 options = { duration : end_time - start ,
@@ -301,15 +301,15 @@ def search_document_small(opts={})
301301 client . search ( request )
302302 end
303303
304- start = Process . clock_gettime ( Process :: CLOCK_MONOTONIC )
304+ start = current_time
305305 results = measured_repetitions . times . collect do
306306 Benchmark . realtime do
307307 action_iterations . times do
308308 client . search ( request )
309309 end
310310 end
311311 end
312- end_time = Process . clock_gettime ( Process :: CLOCK_MONOTONIC )
312+ end_time = current_time
313313 end
314314
315315 options = { duration : end_time - start ,
@@ -350,15 +350,15 @@ def search_document_large(opts={})
350350 client . search ( request )
351351 end
352352
353- start = Process . clock_gettime ( Process :: CLOCK_MONOTONIC )
353+ start = current_time
354354 results = measured_repetitions . times . collect do
355355 Benchmark . realtime do
356356 action_iterations . times do
357357 client . search ( request )
358358 end
359359 end
360360 end
361- end_time = Process . clock_gettime ( Process :: CLOCK_MONOTONIC )
361+ end_time = current_time
362362 results
363363 end
364364
@@ -398,7 +398,7 @@ def update_document(opts={})
398398 body : { doc : { field : "#{ document [ field ] } -#{ i } " } } )
399399 end
400400
401- start = Process . clock_gettime ( Process :: CLOCK_MONOTONIC )
401+ start = current_time
402402 results = measured_repetitions . times . collect do
403403 Benchmark . realtime do
404404 action_iterations . times do |i |
@@ -408,7 +408,7 @@ def update_document(opts={})
408408 end
409409 end
410410 end
411- end_time = Process . clock_gettime ( Process :: CLOCK_MONOTONIC )
411+ end_time = current_time
412412 results
413413 end
414414
0 commit comments