serialbench 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/benchmark.yml +273 -220
  3. data/.github/workflows/rake.yml +26 -0
  4. data/.github/workflows/windows-debug.yml +171 -0
  5. data/.gitignore +32 -0
  6. data/.rubocop.yml +1 -0
  7. data/.rubocop_todo.yml +274 -0
  8. data/Gemfile +14 -1
  9. data/README.adoc +292 -1118
  10. data/Rakefile +0 -55
  11. data/config/benchmarks/full.yml +29 -0
  12. data/config/benchmarks/short.yml +26 -0
  13. data/config/environments/asdf-ruby-3.2.yml +8 -0
  14. data/config/environments/asdf-ruby-3.3.yml +8 -0
  15. data/config/environments/docker-ruby-3.0.yml +9 -0
  16. data/config/environments/docker-ruby-3.1.yml +9 -0
  17. data/config/environments/docker-ruby-3.2.yml +9 -0
  18. data/config/environments/docker-ruby-3.3.yml +9 -0
  19. data/config/environments/docker-ruby-3.4.yml +9 -0
  20. data/data/schemas/result.yml +29 -0
  21. data/docker/Dockerfile.alpine +33 -0
  22. data/docker/{Dockerfile.benchmark → Dockerfile.ubuntu} +4 -3
  23. data/docker/README.md +2 -2
  24. data/docs/PLATFORM_VALIDATION_FIX.md +79 -0
  25. data/docs/SYCK_YAML_FIX.md +91 -0
  26. data/docs/WEBSITE_COMPLETION_PLAN.md +440 -0
  27. data/docs/WINDOWS_LIBXML_FIX.md +136 -0
  28. data/docs/WINDOWS_SETUP.md +122 -0
  29. data/exe/serialbench +1 -1
  30. data/lib/serialbench/benchmark_runner.rb +261 -423
  31. data/lib/serialbench/cli/base_cli.rb +51 -0
  32. data/lib/serialbench/cli/benchmark_cli.rb +453 -0
  33. data/lib/serialbench/cli/environment_cli.rb +181 -0
  34. data/lib/serialbench/cli/resultset_cli.rb +261 -0
  35. data/lib/serialbench/cli/ruby_build_cli.rb +225 -0
  36. data/lib/serialbench/cli/validate_cli.rb +88 -0
  37. data/lib/serialbench/cli.rb +61 -600
  38. data/lib/serialbench/config_manager.rb +129 -0
  39. data/lib/serialbench/models/benchmark_config.rb +75 -0
  40. data/lib/serialbench/models/benchmark_result.rb +81 -0
  41. data/lib/serialbench/models/environment_config.rb +72 -0
  42. data/lib/serialbench/models/platform.rb +111 -0
  43. data/lib/serialbench/models/result.rb +80 -0
  44. data/lib/serialbench/models/result_set.rb +79 -0
  45. data/lib/serialbench/models/result_store.rb +108 -0
  46. data/lib/serialbench/models.rb +54 -0
  47. data/lib/serialbench/ruby_build_manager.rb +149 -0
  48. data/lib/serialbench/runners/asdf_runner.rb +296 -0
  49. data/lib/serialbench/runners/base.rb +32 -0
  50. data/lib/serialbench/runners/docker_runner.rb +140 -0
  51. data/lib/serialbench/runners/local_runner.rb +71 -0
  52. data/lib/serialbench/serializers/base_serializer.rb +9 -17
  53. data/lib/serialbench/serializers/json/base_json_serializer.rb +4 -4
  54. data/lib/serialbench/serializers/json/json_serializer.rb +0 -2
  55. data/lib/serialbench/serializers/json/oj_serializer.rb +0 -2
  56. data/lib/serialbench/serializers/json/rapidjson_serializer.rb +1 -1
  57. data/lib/serialbench/serializers/json/yajl_serializer.rb +0 -2
  58. data/lib/serialbench/serializers/toml/base_toml_serializer.rb +5 -5
  59. data/lib/serialbench/serializers/toml/toml_rb_serializer.rb +1 -3
  60. data/lib/serialbench/serializers/toml/tomlib_serializer.rb +1 -3
  61. data/lib/serialbench/serializers/toml/tomlrb_serializer.rb +56 -0
  62. data/lib/serialbench/serializers/xml/base_xml_serializer.rb +4 -9
  63. data/lib/serialbench/serializers/xml/libxml_serializer.rb +4 -10
  64. data/lib/serialbench/serializers/xml/nokogiri_serializer.rb +2 -4
  65. data/lib/serialbench/serializers/xml/oga_serializer.rb +4 -10
  66. data/lib/serialbench/serializers/xml/ox_serializer.rb +2 -4
  67. data/lib/serialbench/serializers/xml/rexml_serializer.rb +3 -5
  68. data/lib/serialbench/serializers/yaml/base_yaml_serializer.rb +5 -1
  69. data/lib/serialbench/serializers/yaml/psych_serializer.rb +1 -1
  70. data/lib/serialbench/serializers/yaml/syck_serializer.rb +60 -23
  71. data/lib/serialbench/serializers.rb +23 -6
  72. data/lib/serialbench/site_generator.rb +283 -0
  73. data/lib/serialbench/templates/assets/css/benchmark_report.css +535 -0
  74. data/lib/serialbench/templates/assets/css/format_based.css +474 -0
  75. data/lib/serialbench/templates/assets/css/themes.css +589 -0
  76. data/lib/serialbench/templates/assets/js/chart_helpers.js +411 -0
  77. data/lib/serialbench/templates/assets/js/dashboard.js +795 -0
  78. data/lib/serialbench/templates/assets/js/navigation.js +142 -0
  79. data/lib/serialbench/templates/base.liquid +49 -0
  80. data/lib/serialbench/templates/format_based.liquid +507 -0
  81. data/lib/serialbench/templates/partials/chart_section.liquid +4 -0
  82. data/lib/serialbench/version.rb +1 -1
  83. data/lib/serialbench/yaml_validator.rb +36 -0
  84. data/lib/serialbench.rb +2 -31
  85. data/serialbench.gemspec +15 -3
  86. metadata +106 -25
  87. data/.github/workflows/ci.yml +0 -74
  88. data/.github/workflows/docker.yml +0 -246
  89. data/config/ci.yml +0 -22
  90. data/config/full.yml +0 -30
  91. data/docker/run-benchmarks.sh +0 -356
  92. data/lib/serialbench/chart_generator.rb +0 -821
  93. data/lib/serialbench/result_formatter.rb +0 -182
  94. data/lib/serialbench/result_merger.rb +0 -1201
  95. data/lib/serialbench/serializers/xml/base_parser.rb +0 -69
  96. data/lib/serialbench/serializers/xml/libxml_parser.rb +0 -98
  97. data/lib/serialbench/serializers/xml/nokogiri_parser.rb +0 -111
  98. data/lib/serialbench/serializers/xml/oga_parser.rb +0 -85
  99. data/lib/serialbench/serializers/xml/ox_parser.rb +0 -64
  100. data/lib/serialbench/serializers/xml/rexml_parser.rb +0 -129
@@ -0,0 +1,474 @@
1
+ /* Format-Based Template Specific Styles */
2
+
3
+ /* Format Tabs */
4
+ .format-tabs {
5
+ margin-bottom: 30px;
6
+ }
7
+
8
+ .format-nav {
9
+ display: flex;
10
+ justify-content: center;
11
+ gap: 10px;
12
+ margin-bottom: 30px;
13
+ flex-wrap: wrap;
14
+ }
15
+
16
+ /* Format tab styles are defined in themes.css */
17
+
18
+ /* Format Content */
19
+ .format-content {
20
+ background: var(--card-bg);
21
+ border-radius: var(--border-radius);
22
+ padding: 40px;
23
+ box-shadow: var(--shadow-soft);
24
+ border: 1px solid var(--border-color);
25
+ backdrop-filter: blur(10px);
26
+ }
27
+
28
+ .format-content.hidden {
29
+ display: none;
30
+ }
31
+
32
+ /* Operation Tabs */
33
+ .operation-tabs {
34
+ display: flex;
35
+ justify-content: center;
36
+ gap: 8px;
37
+ margin-bottom: 30px;
38
+ flex-wrap: wrap;
39
+ }
40
+
41
+ .operation-tab {
42
+ padding: 10px 20px;
43
+ border: none;
44
+ background: var(--light-bg);
45
+ color: var(--text-color);
46
+ border-radius: 20px;
47
+ cursor: pointer;
48
+ transition: all 0.3s ease;
49
+ font-weight: 500;
50
+ font-size: 0.9em;
51
+ border: 2px solid transparent;
52
+ }
53
+
54
+ .operation-tab:hover {
55
+ background: var(--border-color);
56
+ transform: translateY(-1px);
57
+ }
58
+
59
+ .operation-tab.active {
60
+ background: var(--secondary-color);
61
+ color: white;
62
+ border-color: var(--secondary-color);
63
+ }
64
+
65
+ /* Operation Content */
66
+ .operation-content {
67
+ margin-bottom: 40px;
68
+ }
69
+
70
+ .operation-content.hidden {
71
+ display: none;
72
+ }
73
+
74
+ /* Format Sections */
75
+ .format-section {
76
+ margin-bottom: 40px;
77
+ }
78
+
79
+ .format-section h2 {
80
+ color: var(--primary-color);
81
+ margin-bottom: 20px;
82
+ font-size: 2em;
83
+ font-weight: 700;
84
+ position: relative;
85
+ padding-bottom: 10px;
86
+ }
87
+
88
+ .format-section h2::after {
89
+ content: '';
90
+ position: absolute;
91
+ bottom: 0;
92
+ left: 0;
93
+ width: 60px;
94
+ height: 3px;
95
+ background: var(--gradient-primary);
96
+ border-radius: 2px;
97
+ }
98
+
99
+ .section-description {
100
+ color: #6c757d;
101
+ margin-bottom: 25px;
102
+ font-size: 1.1em;
103
+ line-height: 1.6;
104
+ }
105
+
106
+ /* Size Tabs */
107
+ .size-tabs {
108
+ display: flex;
109
+ justify-content: center;
110
+ gap: 6px;
111
+ margin-bottom: 25px;
112
+ flex-wrap: wrap;
113
+ }
114
+
115
+ .size-tab {
116
+ padding: 8px 16px;
117
+ border: none;
118
+ background: var(--light-bg);
119
+ color: var(--text-color);
120
+ border-radius: 15px;
121
+ cursor: pointer;
122
+ transition: all 0.3s ease;
123
+ font-weight: 500;
124
+ font-size: 0.85em;
125
+ border: 1px solid var(--border-color);
126
+ }
127
+
128
+ .size-tab:hover {
129
+ background: var(--border-color);
130
+ transform: translateY(-1px);
131
+ }
132
+
133
+ .size-tab.active {
134
+ background: var(--accent-color);
135
+ color: white;
136
+ border-color: var(--accent-color);
137
+ }
138
+
139
+ /* Size Content */
140
+ .size-content {
141
+ margin-bottom: 30px;
142
+ }
143
+
144
+ .size-content.hidden {
145
+ display: none;
146
+ }
147
+
148
+ /* Chart Containers */
149
+ .chart-container {
150
+ background: var(--card-bg);
151
+ padding: 25px;
152
+ border-radius: var(--border-radius-small);
153
+ border: 1px solid var(--border-color);
154
+ box-shadow: var(--shadow-soft);
155
+ transition: all 0.3s ease;
156
+ position: relative;
157
+ overflow: hidden;
158
+ margin-bottom: 20px;
159
+ }
160
+
161
+ .chart-container::before {
162
+ content: '';
163
+ position: absolute;
164
+ top: 0;
165
+ left: 0;
166
+ right: 0;
167
+ height: 3px;
168
+ background: var(--gradient-accent);
169
+ }
170
+
171
+ .chart-container:hover {
172
+ transform: translateY(-2px);
173
+ box-shadow: var(--shadow-medium);
174
+ }
175
+
176
+ .chart-container canvas {
177
+ max-width: 100%;
178
+ height: auto;
179
+ }
180
+
181
+ /* Summary Grid */
182
+ .summary-grid {
183
+ display: grid;
184
+ grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
185
+ gap: 25px;
186
+ margin-bottom: 30px;
187
+ }
188
+
189
+ .summary-card {
190
+ background: var(--light-bg);
191
+ padding: 25px;
192
+ border-radius: var(--border-radius-small);
193
+ border: 1px solid var(--border-color);
194
+ box-shadow: var(--shadow-soft);
195
+ transition: all 0.3s ease;
196
+ position: relative;
197
+ overflow: hidden;
198
+ }
199
+
200
+ .summary-card::before {
201
+ content: '';
202
+ position: absolute;
203
+ top: 0;
204
+ left: 0;
205
+ right: 0;
206
+ height: 3px;
207
+ background: var(--gradient-primary);
208
+ }
209
+
210
+ .summary-card:hover {
211
+ transform: translateY(-2px);
212
+ box-shadow: var(--shadow-medium);
213
+ }
214
+
215
+ .summary-card h3 {
216
+ color: var(--primary-color);
217
+ margin-bottom: 15px;
218
+ font-size: 1.3em;
219
+ font-weight: 600;
220
+ }
221
+
222
+ .summary-list {
223
+ list-style: none;
224
+ padding-left: 0;
225
+ }
226
+
227
+ .summary-list li {
228
+ padding: 8px 0;
229
+ border-bottom: 1px solid var(--border-color);
230
+ transition: all 0.2s ease;
231
+ position: relative;
232
+ padding-left: 20px;
233
+ }
234
+
235
+ .summary-list li::before {
236
+ content: '▸';
237
+ position: absolute;
238
+ left: 0;
239
+ color: var(--secondary-color);
240
+ font-weight: bold;
241
+ }
242
+
243
+ .summary-list li:hover {
244
+ padding-left: 25px;
245
+ color: var(--primary-color);
246
+ }
247
+
248
+ .summary-list li:last-child {
249
+ border-bottom: none;
250
+ }
251
+
252
+ .summary-card p {
253
+ color: #6c757d;
254
+ line-height: 1.6;
255
+ margin-top: 15px;
256
+ }
257
+
258
+ /* Environments Grid */
259
+ .environments-grid {
260
+ display: grid;
261
+ grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
262
+ gap: 20px;
263
+ }
264
+
265
+ .environment-card {
266
+ background: var(--light-bg);
267
+ padding: 20px;
268
+ border-radius: var(--border-radius-small);
269
+ border: 1px solid var(--border-color);
270
+ box-shadow: var(--shadow-soft);
271
+ transition: all 0.3s ease;
272
+ position: relative;
273
+ overflow: hidden;
274
+ }
275
+
276
+ .environment-card::before {
277
+ content: '';
278
+ position: absolute;
279
+ top: 0;
280
+ left: 0;
281
+ right: 0;
282
+ height: 3px;
283
+ background: var(--gradient-secondary);
284
+ }
285
+
286
+ .environment-card:hover {
287
+ transform: translateY(-2px);
288
+ box-shadow: var(--shadow-medium);
289
+ }
290
+
291
+ .environment-card h3 {
292
+ color: var(--primary-color);
293
+ margin-bottom: 15px;
294
+ font-size: 1.2em;
295
+ font-weight: 600;
296
+ }
297
+
298
+ .environment-card p {
299
+ margin-bottom: 8px;
300
+ color: #6c757d;
301
+ font-size: 0.95em;
302
+ }
303
+
304
+ .environment-card strong {
305
+ color: var(--text-color);
306
+ }
307
+
308
+ /* Responsive Design */
309
+ @media (max-width: 768px) {
310
+ .format-nav {
311
+ gap: 6px;
312
+ }
313
+
314
+ .format-tab {
315
+ padding: 10px 18px;
316
+ font-size: 0.9em;
317
+ }
318
+
319
+ .format-content {
320
+ padding: 25px;
321
+ }
322
+
323
+ .operation-tabs {
324
+ gap: 6px;
325
+ }
326
+
327
+ .operation-tab {
328
+ padding: 8px 16px;
329
+ font-size: 0.85em;
330
+ }
331
+
332
+ .size-tabs {
333
+ gap: 4px;
334
+ }
335
+
336
+ .size-tab {
337
+ padding: 6px 12px;
338
+ font-size: 0.8em;
339
+ }
340
+
341
+ .format-section h2 {
342
+ font-size: 1.6em;
343
+ }
344
+
345
+ .section-description {
346
+ font-size: 1em;
347
+ }
348
+
349
+ .summary-grid {
350
+ grid-template-columns: 1fr;
351
+ gap: 20px;
352
+ }
353
+
354
+ .environments-grid {
355
+ grid-template-columns: 1fr;
356
+ }
357
+
358
+ .chart-container {
359
+ padding: 20px;
360
+ }
361
+ }
362
+
363
+ @media (max-width: 480px) {
364
+ .format-nav {
365
+ flex-direction: column;
366
+ align-items: center;
367
+ }
368
+
369
+ .format-tab {
370
+ width: 100%;
371
+ max-width: 200px;
372
+ }
373
+
374
+ .operation-tabs {
375
+ flex-direction: column;
376
+ align-items: center;
377
+ gap: 8px;
378
+ }
379
+
380
+ .operation-tab {
381
+ width: 100%;
382
+ max-width: 150px;
383
+ }
384
+
385
+ .size-tabs {
386
+ flex-direction: column;
387
+ align-items: center;
388
+ gap: 6px;
389
+ }
390
+
391
+ .size-tab {
392
+ width: 100%;
393
+ max-width: 120px;
394
+ }
395
+ }
396
+
397
+ /* Loading States */
398
+ .chart-container.loading {
399
+ position: relative;
400
+ }
401
+
402
+ .chart-container.loading::after {
403
+ content: 'Loading chart...';
404
+ position: absolute;
405
+ top: 50%;
406
+ left: 50%;
407
+ transform: translate(-50%, -50%);
408
+ color: #6c757d;
409
+ font-style: italic;
410
+ }
411
+
412
+ /* Error States */
413
+ .chart-container.error {
414
+ background: #fff5f5;
415
+ border-color: #fed7d7;
416
+ }
417
+
418
+ .chart-container.error::after {
419
+ content: 'Chart data unavailable';
420
+ position: absolute;
421
+ top: 50%;
422
+ left: 50%;
423
+ transform: translate(-50%, -50%);
424
+ color: #e53e3e;
425
+ font-style: italic;
426
+ }
427
+
428
+ /* Animation Enhancements */
429
+ .format-content {
430
+ animation: fadeInUp 0.6s ease-out;
431
+ }
432
+
433
+ .operation-content {
434
+ animation: fadeInUp 0.4s ease-out;
435
+ }
436
+
437
+ .size-content {
438
+ animation: fadeInUp 0.3s ease-out;
439
+ }
440
+
441
+ @keyframes fadeInUp {
442
+ from {
443
+ opacity: 0;
444
+ transform: translateY(20px);
445
+ }
446
+ to {
447
+ opacity: 1;
448
+ transform: translateY(0);
449
+ }
450
+ }
451
+
452
+ /* Focus Styles for Accessibility */
453
+ .format-tab:focus,
454
+ .operation-tab:focus,
455
+ .size-tab:focus {
456
+ outline: 2px solid var(--primary-color);
457
+ outline-offset: 2px;
458
+ }
459
+
460
+ /* High Contrast Mode Support */
461
+ @media (prefers-contrast: high) {
462
+ .format-tab,
463
+ .operation-tab,
464
+ .size-tab {
465
+ border: 2px solid var(--text-color);
466
+ }
467
+
468
+ .format-tab.active,
469
+ .operation-tab.active,
470
+ .size-tab.active {
471
+ background: var(--text-color);
472
+ color: var(--background-color);
473
+ }
474
+ }