performance measurements

Each table row shows performance measurements for this Ruby JRuby program with a particular command-line input value N.

 N  CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
500,000Failed  228   

Read the ↓ make, command line, and program output logs to see how this program was run.

Read thread-ring benchmark to see what this program should do.

 notes

jruby 1.7.16.1 (1.9.3p392) 2014-10-28 4e93f31 on Java HotSpot(TM) 64-Bit Server VM 1.8.0_25-b17 +jit [linux-amd64]

 thread-ring Ruby JRuby #2 program source code

# The Computer Language Benchmarks Game
# http://benchmarksgame.alioth.debian.org/
#
# contributed by Serhiy Boiko


require 'thread'
THREAD_NUM = 503
number = ARGV.first.to_i

threads = []
for i in 1..THREAD_NUM
   threads << Thread.new(i) do |thr_num|
      while true
         Thread.stop
         if number > 0
            number -= 1
         else
            puts thr_num
            exit 0
         end
      end
   end
end

prev_thread = threads.last
while true
   for thread in threads
      Thread.pass until prev_thread.stop?
      thread.run
      prev_thread = thread
   end
end

 make, command-line, and program output logs

Fri, 21 Nov 2014 02:04:01 GMT

MAKE:
mv threadring.jruby-2.jruby threadring.rb
0.02s to complete and log all make actions

COMMAND LINE:
/usr/local/src/jruby-1.7.16.1/bin/jruby -Xcompile.invokedynamic=true -J-server -J-Xmn512m -J-Xms2048m -J-Xmx2048m threadring.rb 500000

PROGRAM FAILED 


PROGRAM OUTPUT:
19
20
21
22
23
24
25
26
27
28
30
29
33
34
32
31
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
6869
67
70
71

72
73
74
75
76
77
78
79
80
81
82
83
84
86
87
85
88
90
91
93
94
89
96
97
95
92
98
99
100
101
102
103
104
105
107
108
106
109
110
111
112
113
114
115
116117

118
120119121


122
123
124
125126

127
128
129
130131
132
133

134
135
136
137
138
140
139
141
142
143
144
145
146
147
148
149
150
152
153
151
154
155
156157

158
159
160
161
162
163
164
165
166
167
168
169
170
171
172173

174
175
176
177
178
179
180
181
182
183
184
185
186
187
188189
190

191
197
192
198199
196
195
194
193
200

201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224225

226
227
228
229
230
231
232
233234

235
236
237
238
239
240
241
243
245
242
244
247
249
250
252
246251
248

253
254
255
256
257
258
259
260261

262
263
264
265
266
267
268
269
270271

272
273
274275276
277

278279


280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296297

298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316317

318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339340

341
342
343
344
345
346
347
348
349350

351
352
353
354
355
356
357
358
359360

361
362
363
364
365
366
367
368369

370
371
372373

374
375
376
377
378
379
380
381
382383

384
385386

387
388
389
390
391
392
393
394
395396
397

398
399
400
401
402
403404

405406

407
408
409
410
411
412
413
414415

416
417
418
419
420421

422423

424
425
426
427
428429

430
431
432
433
434
435
436437

438
439
440
441
442
443
444
445
446
447
448
449
450451
452

453
454455

456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494495

496
497
498
499
500501
502
503

1
2
3
4
5
6
78

9
10
11
1213

14
15
16
17
18

ThreadError: killed thread
   wakeup at org/jruby/RubyThread.java:835
      run at org/jruby/RubyThread.java:982
  __for__ at threadring.rb:30
     each at org/jruby/RubyArray.java:1613
   (root) at threadring.rb:28

Revised BSD license

  Home   Conclusions   License   Play