serialbench 0.1.2 → 0.2.0
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.
- checksums.yaml +4 -4
- data/.github/workflows/benchmark.yml +294 -229
- data/.github/workflows/rake.yml +11 -0
- data/.github/workflows/windows-debug.yml +171 -0
- data/.gitignore +32 -0
- data/.rubocop.yml +1 -0
- data/.rubocop_todo.yml +274 -0
- data/Gemfile +15 -1
- data/README.adoc +41 -0
- data/data/schemas/result.yml +29 -0
- data/docs/PLATFORM_VALIDATION_FIX.md +79 -0
- data/docs/SYCK_YAML_FIX.md +91 -0
- data/docs/WEBSITE_COMPLETION_PLAN.md +440 -0
- data/docs/WINDOWS_LIBXML_FIX.md +136 -0
- data/docs/WINDOWS_SETUP.md +122 -0
- data/lib/serialbench/benchmark_runner.rb +3 -3
- data/lib/serialbench/cli/benchmark_cli.rb +74 -1
- data/lib/serialbench/cli/environment_cli.rb +3 -3
- data/lib/serialbench/cli/resultset_cli.rb +112 -26
- data/lib/serialbench/cli/ruby_build_cli.rb +75 -88
- data/lib/serialbench/cli/validate_cli.rb +88 -0
- data/lib/serialbench/cli.rb +6 -2
- data/lib/serialbench/config_manager.rb +15 -26
- data/lib/serialbench/models/benchmark_config.rb +12 -0
- data/lib/serialbench/models/benchmark_result.rb +39 -3
- data/lib/serialbench/models/environment_config.rb +3 -2
- data/lib/serialbench/models/platform.rb +61 -6
- data/lib/serialbench/models/result.rb +28 -1
- data/lib/serialbench/models/result_set.rb +8 -0
- data/lib/serialbench/ruby_build_manager.rb +19 -23
- data/lib/serialbench/runners/asdf_runner.rb +1 -1
- data/lib/serialbench/runners/docker_runner.rb +2 -4
- data/lib/serialbench/runners/local_runner.rb +71 -0
- data/lib/serialbench/serializers/base_serializer.rb +1 -1
- data/lib/serialbench/serializers/json/rapidjson_serializer.rb +1 -5
- data/lib/serialbench/serializers/toml/base_toml_serializer.rb +0 -2
- data/lib/serialbench/serializers/toml/toml_rb_serializer.rb +1 -1
- data/lib/serialbench/serializers/toml/tomlib_serializer.rb +1 -1
- data/lib/serialbench/serializers/xml/base_xml_serializer.rb +6 -1
- data/lib/serialbench/serializers/xml/leptris_serializer.rb +167 -0
- data/lib/serialbench/serializers/xml/libxml_serializer.rb +13 -8
- data/lib/serialbench/serializers/xml/nokogiri_serializer.rb +11 -2
- data/lib/serialbench/serializers/xml/oga_serializer.rb +8 -8
- data/lib/serialbench/serializers/xml/ox_serializer.rb +2 -2
- data/lib/serialbench/serializers/xml/rexml_serializer.rb +3 -3
- data/lib/serialbench/serializers/yaml/base_yaml_serializer.rb +1 -3
- data/lib/serialbench/serializers/yaml/psych_serializer.rb +1 -5
- data/lib/serialbench/serializers/yaml/syck_serializer.rb +1 -1
- data/lib/serialbench/serializers.rb +5 -3
- data/lib/serialbench/site_generator.rb +234 -2
- data/lib/serialbench/templates/assets/css/format_based.css +1 -53
- data/lib/serialbench/templates/assets/css/themes.css +5 -4
- data/lib/serialbench/templates/assets/js/chart_helpers.js +44 -14
- data/lib/serialbench/templates/assets/js/dashboard.js +14 -15
- data/lib/serialbench/templates/format_based.liquid +480 -252
- data/lib/serialbench/version.rb +1 -1
- data/lib/serialbench/yaml_validator.rb +36 -0
- data/serialbench.gemspec +11 -2
- data/site/.gitignore +5 -0
- data/site/README.md +32 -0
- data/site/astro.config.mjs +12 -0
- data/site/package-lock.json +6160 -0
- data/site/package.json +22 -0
- data/site/public/favicon.svg +4 -0
- data/site/scripts/gen-sample-data.mjs +154 -0
- data/site/src/components/AvailabilityMatrix.astro +61 -0
- data/site/src/components/CalibratedLeaderboard.vue +134 -0
- data/site/src/components/CitationBox.vue +50 -0
- data/site/src/components/DashboardConsole.vue +193 -0
- data/site/src/components/FeaturesTable.astro +97 -0
- data/site/src/components/MemoryPanel.vue +44 -0
- data/site/src/components/OpsChart.vue +135 -0
- data/site/src/config.ts +18 -0
- data/site/src/layouts/Layout.astro +85 -0
- data/site/src/lib/channels.ts +24 -0
- data/site/src/lib/dashboard.ts +269 -0
- data/site/src/pages/index.astro +44 -0
- data/site/src/pages/library/[slug].astro +128 -0
- data/site/src/pages/methodology.astro +55 -0
- data/site/src/styles/global.css +103 -0
- data/site/tsconfig.json +5 -0
- metadata +58 -23
- data/.github/workflows/ci.yml +0 -74
- data/.github/workflows/docker.yml +0 -272
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ff36b734da92061c2bbf271fd1e94f79f80d844f0b492c7f06a51aca5ed794aa
|
|
4
|
+
data.tar.gz: 28aeb4041d3c1c04cdcfd4b5f5ad21757ed0616277bcf34b2db15c9d56a06b5a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9c497b089e84bc674bd444df875cc161ecf97b0d077d2ba9cb3c26cee91c27d8694cabc149b61f78c4fc0f9890b808a7604e6106e1d91aa04595c40a3cb6fa77
|
|
7
|
+
data.tar.gz: 5a8eebcfe19699b5d9e1aed3caf1c65bec4937fe51199b8da0ef152e6145deab815621c354495279236f9b7c2e0eaa8e1c70eebdc1353ffb8ff6c89c900afeaa
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
name: benchmark
|
|
1
|
+
name: benchmark-weekly
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
5
|
-
branches: [
|
|
5
|
+
branches: [main]
|
|
6
|
+
paths-ignore:
|
|
7
|
+
- '.github/workflows/windows-debug.yml'
|
|
6
8
|
pull_request:
|
|
7
|
-
|
|
9
|
+
paths-ignore:
|
|
10
|
+
- '.github/workflows/windows-debug.yml'
|
|
8
11
|
schedule:
|
|
9
12
|
# Run benchmarks weekly on Sundays at 2 AM UTC
|
|
10
13
|
- cron: '0 2 * * 0'
|
|
@@ -17,7 +20,10 @@ permissions:
|
|
|
17
20
|
id-token: write
|
|
18
21
|
|
|
19
22
|
concurrency:
|
|
20
|
-
|
|
23
|
+
# Renamed off "pages": that group's server-side state is wedged (a queued
|
|
24
|
+
# run there returns 500 on cancel and blocks the single in-progress slot),
|
|
25
|
+
# which starved every benchmark-weekly run after 2026-08-23 10:22Z.
|
|
26
|
+
group: "site-deploy"
|
|
21
27
|
cancel-in-progress: false
|
|
22
28
|
|
|
23
29
|
jobs:
|
|
@@ -27,250 +33,309 @@ jobs:
|
|
|
27
33
|
ruby-versions: ${{ steps.set-matrix.outputs.ruby-versions }}
|
|
28
34
|
platforms: ${{ steps.set-matrix.outputs.platforms }}
|
|
29
35
|
steps:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
36
|
+
- name: Set matrix configurations
|
|
37
|
+
id: set-matrix
|
|
38
|
+
run: |
|
|
39
|
+
echo 'ruby-versions=["3.2", "3.3", "3.4", "4.0"]' >> $GITHUB_OUTPUT
|
|
40
|
+
echo 'platforms=["ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "macos-14", "macos-15", "macos-15-intel", "macos-26", "macos-26-intel", "windows-2022", "windows-2025", "windows-11-arm"]' >> $GITHUB_OUTPUT
|
|
35
41
|
|
|
36
42
|
# Cross-platform native benchmarks
|
|
37
43
|
benchmark:
|
|
38
44
|
runs-on: ${{ matrix.platform }}
|
|
39
45
|
needs: setup
|
|
40
46
|
strategy:
|
|
47
|
+
fail-fast: false
|
|
41
48
|
matrix:
|
|
42
49
|
platform: ${{ fromJson(needs.setup.outputs.platforms) }}
|
|
43
50
|
ruby-version: ${{ fromJson(needs.setup.outputs.ruby-versions) }}
|
|
44
|
-
|
|
51
|
+
exclude:
|
|
52
|
+
# RubyInstaller ships no arm64 builds for Ruby 3.2/3.3;
|
|
53
|
+
# windows-11-arm runs 3.4.x and 4.x only
|
|
54
|
+
- platform: windows-11-arm
|
|
55
|
+
ruby-version: "3.2"
|
|
56
|
+
- platform: windows-11-arm
|
|
57
|
+
ruby-version: "3.3"
|
|
45
58
|
|
|
46
59
|
steps:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
60
|
+
- name: Checkout repository
|
|
61
|
+
uses: actions/checkout@v4
|
|
62
|
+
|
|
63
|
+
- name: Detect Windows architecture
|
|
64
|
+
id: windows-arch
|
|
65
|
+
if: startsWith(matrix.platform, 'windows-')
|
|
66
|
+
run: |
|
|
67
|
+
if [[ "${{ matrix.platform }}" == *"-arm" ]]; then
|
|
68
|
+
echo "arch=arm64-windows" >> $GITHUB_OUTPUT
|
|
69
|
+
else
|
|
70
|
+
echo "arch=x64-windows" >> $GITHUB_OUTPUT
|
|
71
|
+
fi
|
|
72
|
+
shell: bash
|
|
73
|
+
|
|
74
|
+
- name: Install vcpkg dependencies (Windows)
|
|
75
|
+
if: startsWith(matrix.platform, 'windows-')
|
|
76
|
+
run: |
|
|
77
|
+
vcpkg install libxml2:${{ steps.windows-arch.outputs.arch }} libxslt:${{ steps.windows-arch.outputs.arch }} 2>&1 || true
|
|
78
|
+
vcpkg integrate install 2>&1 || true
|
|
79
|
+
# vcpkg dynamic triplets put the DLLs in bin/; nokogiri's compiled
|
|
80
|
+
# extension needs them on PATH at require time.
|
|
81
|
+
echo "C:/vcpkg/installed/${{ steps.windows-arch.outputs.arch }}/bin" >> $GITHUB_PATH
|
|
82
|
+
shell: bash
|
|
83
|
+
|
|
84
|
+
- name: Configure bundler for libxml2 (Windows)
|
|
85
|
+
if: startsWith(matrix.platform, 'windows-')
|
|
86
|
+
run: |
|
|
87
|
+
mkdir -p .bundle 2>&1 || true
|
|
88
|
+
echo "---" > .bundle/config 2>&1 || true
|
|
89
|
+
echo 'BUNDLE_BUILD__LIBXML___RUBY: "--with-xml2-dir=C:/vcpkg/installed/${{ steps.windows-arch.outputs.arch }} --with-xml2-include=C:/vcpkg/installed/${{ steps.windows-arch.outputs.arch }}/include/libxml2 --with-xml2-lib=C:/vcpkg/installed/${{ steps.windows-arch.outputs.arch }}/lib"' >> .bundle/config 2>&1 || true
|
|
90
|
+
# windows-11-arm has no precompiled nokogiri (pulled transitively via
|
|
91
|
+
# moxml); build it against the vcpkg libxml2 instead of the vendored
|
|
92
|
+
# source build that fails on ucrt/ARM64. Harmless on x64 Windows,
|
|
93
|
+
# where the precompiled gem makes this config moot.
|
|
94
|
+
echo 'BUNDLE_BUILD__NOKOGIRI: "--use-system-libraries --with-xml2-include=C:/vcpkg/installed/${{ steps.windows-arch.outputs.arch }}/include/libxml2 --with-xml2-lib=C:/vcpkg/installed/${{ steps.windows-arch.outputs.arch }}/lib --with-xslt-include=C:/vcpkg/installed/${{ steps.windows-arch.outputs.arch }}/include/libxslt --with-xslt-lib=C:/vcpkg/installed/${{ steps.windows-arch.outputs.arch }}/lib --with-zlib-dir=C:/vcpkg/installed/${{ steps.windows-arch.outputs.arch }}"' >> .bundle/config 2>&1 || true
|
|
95
|
+
shell: bash
|
|
96
|
+
|
|
97
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
|
98
|
+
uses: ruby/setup-ruby@v1
|
|
99
|
+
with:
|
|
100
|
+
ruby-version: ${{ matrix.ruby-version }}
|
|
101
|
+
bundler-cache: true
|
|
102
|
+
|
|
103
|
+
# The directory of ruby.exe is always in the DLL search path (unlike
|
|
104
|
+
# PATH manipulation across step boundaries), so stage the vcpkg DLLs
|
|
105
|
+
# there for the system-built nokogiri on Windows ARM.
|
|
106
|
+
- name: Stage vcpkg DLLs beside ruby.exe (Windows)
|
|
107
|
+
if: startsWith(matrix.platform, 'windows-')
|
|
108
|
+
run: |
|
|
109
|
+
RUBY_BIN="$(dirname "$(command -v ruby)")"
|
|
110
|
+
echo "Staging vcpkg DLLs into $RUBY_BIN"
|
|
111
|
+
ls "C:/vcpkg/installed/${{ steps.windows-arch.outputs.arch }}/bin/" || true
|
|
112
|
+
cp -f "C:/vcpkg/installed/${{ steps.windows-arch.outputs.arch }}/bin/"*.dll "$RUBY_BIN/" 2>&1 || true
|
|
113
|
+
shell: bash
|
|
114
|
+
|
|
115
|
+
- name: Install system dependencies (Ubuntu)
|
|
116
|
+
if: startsWith(matrix.platform, 'ubuntu-')
|
|
117
|
+
run: |
|
|
118
|
+
sudo apt-get update
|
|
119
|
+
sudo apt-get install -y libxml2-dev libxslt1-dev build-essential
|
|
120
|
+
|
|
121
|
+
- name: Install system dependencies (macOS)
|
|
122
|
+
if: startsWith(matrix.platform, 'macos-')
|
|
123
|
+
run: |
|
|
124
|
+
brew install libxml2 libxslt
|
|
125
|
+
|
|
126
|
+
- name: Debug Ruby platform (Windows only)
|
|
127
|
+
if: startsWith(matrix.platform, 'windows-')
|
|
128
|
+
shell: ruby {0}
|
|
129
|
+
run: |
|
|
130
|
+
puts "=== Ruby Platform Debug Info ==="
|
|
131
|
+
puts "RUBY_PLATFORM: #{RUBY_PLATFORM}"
|
|
132
|
+
puts "Gem.win_platform?: #{Gem.win_platform?}"
|
|
133
|
+
puts "RbConfig::CONFIG['host_os']: #{RbConfig::CONFIG['host_os']}"
|
|
134
|
+
puts "RbConfig::CONFIG['host_cpu']: #{RbConfig::CONFIG['host_cpu']}"
|
|
135
|
+
puts "RbConfig::CONFIG['arch']: #{RbConfig::CONFIG['arch']}"
|
|
136
|
+
puts "================================"
|
|
137
|
+
|
|
138
|
+
- name: Install gems
|
|
139
|
+
run: bundle install
|
|
140
|
+
|
|
141
|
+
# ubuntu-22.04's glibc (2.35) predates the precompiled leptris gem's
|
|
142
|
+
# build host, so the gem's vendored libleptris.so fails to dlopen there
|
|
143
|
+
# and the adapter reports leptris unavailable (empty availability dots
|
|
144
|
+
# on the site). Leptris is pure C99 — build the lib from the gem's
|
|
145
|
+
# tagged source and point the FFI loader at it; LEPTRIS_LIB_PATH is the
|
|
146
|
+
# first candidate in the gem's ffi_lib list.
|
|
147
|
+
- name: Build libleptris from source (Ubuntu 22.04)
|
|
148
|
+
if: matrix.platform == 'ubuntu-22.04' || matrix.platform == 'ubuntu-22.04-arm'
|
|
149
|
+
run: |
|
|
150
|
+
LEPTRIS_VERSION=$(bundle exec ruby -e "require 'leptris'; print Leptris::VERSION")
|
|
151
|
+
echo "Building libleptris ${LEPTRIS_VERSION}"
|
|
152
|
+
curl -sL "https://github.com/leptris/leptris/archive/refs/tags/v${LEPTRIS_VERSION}.tar.gz" | tar xz
|
|
153
|
+
cmake -S "leptris-${LEPTRIS_VERSION}" -B /tmp/leptris-build \
|
|
154
|
+
-DLEPTRIS_BUILD_SHARED=ON -DLEPTRIS_BUILD_STATIC=OFF -DBUILD_TESTING=OFF \
|
|
155
|
+
-DLEPTRIS_BUILD_CLI=OFF -DLEPTRIS_BUILD_BENCHMARKS=OFF -DLEPTRIS_BUILD_MAN_PAGES=OFF \
|
|
156
|
+
-DLEPTRIS_ENABLE_UTF8PROC=OFF -DLEPTRIS_ENABLE_ICONV=OFF
|
|
157
|
+
cmake --build /tmp/leptris-build -j"$(nproc)"
|
|
158
|
+
LIBLEPTRIS=$(find /tmp/leptris-build -name 'libleptris.so*' -type f | head -1)
|
|
159
|
+
echo "Built ${LIBLEPTRIS}"
|
|
160
|
+
echo "LEPTRIS_LIB_PATH=${LIBLEPTRIS}" >> "$GITHUB_ENV"
|
|
161
|
+
shell: bash
|
|
162
|
+
|
|
163
|
+
- name: Update Ruby-Build cache
|
|
164
|
+
run: bundle exec serialbench ruby-build update
|
|
165
|
+
env:
|
|
166
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
167
|
+
|
|
168
|
+
- name: Create environment config
|
|
169
|
+
run: |
|
|
170
|
+
mkdir -p config/environments
|
|
171
|
+
cat > config/environments/ci-ruby-${{ matrix.ruby-version }}.yml << EOF
|
|
172
|
+
---
|
|
173
|
+
name: ci-ruby-${{ matrix.ruby-version }}-${{ matrix.platform }}
|
|
174
|
+
kind: local
|
|
175
|
+
created_at: '$(date -u +"%Y-%m-%dT%H:%M:%SZ")'
|
|
176
|
+
ruby_build_tag: "${{ matrix.ruby-version }}"
|
|
177
|
+
description: CI environment for Ruby ${{ matrix.ruby-version }} on ${{ matrix.platform }}
|
|
178
|
+
EOF
|
|
179
|
+
shell: bash
|
|
180
|
+
|
|
181
|
+
- name: Run benchmarks
|
|
182
|
+
env:
|
|
183
|
+
GITHUB_RUNNER_PLATFORM: ${{ matrix.platform }}
|
|
184
|
+
run: |
|
|
185
|
+
bundle exec serialbench environment execute config/environments/ci-ruby-${{ matrix.ruby-version }}.yml config/benchmarks/full.yml results/runs/ci-ruby-${{ matrix.ruby-version }}-${{ matrix.platform }}
|
|
186
|
+
|
|
187
|
+
- name: Verify benchmark results before upload
|
|
188
|
+
run: |
|
|
189
|
+
echo "=== Verifying benchmark results ==="
|
|
190
|
+
RESULTS_FILE="results/runs/ci-ruby-${{ matrix.ruby-version }}-${{ matrix.platform }}/results.yaml"
|
|
191
|
+
|
|
192
|
+
echo "📁 Checking file exists..."
|
|
193
|
+
if [ ! -f "$RESULTS_FILE" ]; then
|
|
194
|
+
echo "❌ ERROR: results.yaml not found at $RESULTS_FILE"
|
|
195
|
+
exit 1
|
|
196
|
+
fi
|
|
110
197
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
- name: Install system dependencies
|
|
122
|
-
run: |
|
|
123
|
-
sudo apt-get update
|
|
124
|
-
sudo apt-get install -y libxml2-dev libxslt1-dev build-essential
|
|
125
|
-
|
|
126
|
-
- name: Install gems
|
|
127
|
-
run: bundle install
|
|
128
|
-
|
|
129
|
-
- name: Download all benchmark artifacts
|
|
130
|
-
uses: actions/download-artifact@v4
|
|
131
|
-
with:
|
|
132
|
-
pattern: benchmark-results-*
|
|
133
|
-
path: artifacts/
|
|
134
|
-
|
|
135
|
-
- name: List downloaded artifacts
|
|
136
|
-
run: |
|
|
137
|
-
echo "Downloaded artifacts:"
|
|
138
|
-
find artifacts/ -type f -name "*.json" -o -name "*.html" | head -20
|
|
139
|
-
|
|
140
|
-
- name: Generate comprehensive GitHub Pages
|
|
141
|
-
run: |
|
|
142
|
-
mkdir -p docs
|
|
143
|
-
|
|
144
|
-
# Find all result directories
|
|
145
|
-
RESULT_DIRS=""
|
|
146
|
-
for dir in artifacts/benchmark-results-*/; do
|
|
147
|
-
if [ -d "$dir" ]; then
|
|
148
|
-
RESULT_DIRS="$RESULT_DIRS $dir"
|
|
198
|
+
echo "📊 Checking file size..."
|
|
199
|
+
SIZE=$(wc -c < "$RESULTS_FILE" | tr -d ' ')
|
|
200
|
+
echo " File size: $SIZE bytes"
|
|
201
|
+
|
|
202
|
+
if [ "$SIZE" -lt 1000 ]; then
|
|
203
|
+
echo "❌ ERROR: results.yaml is suspiciously small ($SIZE bytes)"
|
|
204
|
+
echo " Expected at least 1000 bytes for valid benchmark results"
|
|
205
|
+
echo "=== File contents ==="
|
|
206
|
+
cat "$RESULTS_FILE"
|
|
207
|
+
exit 1
|
|
149
208
|
fi
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
bundle exec serialbench
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
This page contains benchmark results from multiple platforms and Ruby versions:
|
|
169
|
-
|
|
170
|
-
## Platforms Tested
|
|
171
|
-
- **Ubuntu Latest**: Linux x86_64 environment
|
|
172
|
-
- **macOS Latest**: Apple Silicon and Intel Mac environment
|
|
173
|
-
- **Windows Latest**: Windows Server environment
|
|
174
|
-
|
|
175
|
-
## Ruby Versions
|
|
176
|
-
- Ruby 3.1, 3.2, 3.3, 3.4
|
|
177
|
-
|
|
178
|
-
## Serialization Libraries
|
|
179
|
-
- **XML**: REXML, Ox, Nokogiri, Oga, LibXML
|
|
180
|
-
- **JSON**: JSON, Oj, RapidJSON, YAJL
|
|
181
|
-
- **YAML**: Psych, Syck
|
|
182
|
-
- **TOML**: TOML-RB, Tomlib
|
|
183
|
-
|
|
184
|
-
Results show performance variations across different operating systems and architectures.
|
|
185
|
-
EOF
|
|
186
|
-
|
|
187
|
-
- name: Setup Pages
|
|
188
|
-
uses: actions/configure-pages@v4
|
|
189
|
-
|
|
190
|
-
- name: Upload to GitHub Pages
|
|
191
|
-
uses: actions/upload-pages-artifact@v3
|
|
192
|
-
with:
|
|
193
|
-
path: docs
|
|
194
|
-
|
|
195
|
-
- name: Deploy to GitHub Pages
|
|
196
|
-
id: deployment
|
|
197
|
-
uses: actions/deploy-pages@v4
|
|
198
|
-
|
|
199
|
-
# Performance comparison analysis
|
|
200
|
-
performance-analysis:
|
|
201
|
-
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
|
|
209
|
+
|
|
210
|
+
echo "✅ File size OK: $SIZE bytes"
|
|
211
|
+
shell: bash
|
|
212
|
+
|
|
213
|
+
- name: Validate YAML schema
|
|
214
|
+
run: |
|
|
215
|
+
bundle exec serialbench validate result results/runs/ci-ruby-${{ matrix.ruby-version }}-${{ matrix.platform }}/results.yaml
|
|
216
|
+
|
|
217
|
+
- name: Upload benchmark results
|
|
218
|
+
uses: actions/upload-artifact@v4
|
|
219
|
+
with:
|
|
220
|
+
name: benchmark-results-${{ matrix.platform }}-ruby-${{ matrix.ruby-version }}
|
|
221
|
+
path: results/runs/ci-ruby-${{ matrix.ruby-version }}-${{ matrix.platform }}
|
|
222
|
+
retention-days: 30
|
|
223
|
+
|
|
224
|
+
# Aggregate results and deploy to GitHub Pages
|
|
225
|
+
deploy-pages:
|
|
226
|
+
if: github.ref == 'refs/heads/main'
|
|
202
227
|
runs-on: ubuntu-latest
|
|
203
|
-
needs: [benchmark]
|
|
228
|
+
needs: [setup, benchmark]
|
|
229
|
+
environment:
|
|
230
|
+
name: github-pages
|
|
231
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
204
232
|
|
|
205
233
|
steps:
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
234
|
+
- name: Checkout repository
|
|
235
|
+
uses: actions/checkout@v4
|
|
236
|
+
|
|
237
|
+
- name: Set up Ruby
|
|
238
|
+
uses: ruby/setup-ruby@v1
|
|
239
|
+
with:
|
|
240
|
+
ruby-version: '3.3'
|
|
241
|
+
bundler-cache: true
|
|
242
|
+
|
|
243
|
+
- name: Install system dependencies
|
|
244
|
+
run: |
|
|
245
|
+
sudo apt-get update
|
|
246
|
+
sudo apt-get install -y libxml2-dev libxslt1-dev build-essential
|
|
247
|
+
|
|
248
|
+
- name: Install gems
|
|
249
|
+
run: bundle install
|
|
250
|
+
|
|
251
|
+
- name: Download all benchmark artifacts
|
|
252
|
+
uses: actions/download-artifact@v4
|
|
253
|
+
with:
|
|
254
|
+
pattern: benchmark-results-*
|
|
255
|
+
path: artifacts/
|
|
256
|
+
|
|
257
|
+
- name: List downloaded artifacts structure
|
|
258
|
+
run: |
|
|
259
|
+
echo "=== Artifacts directory structure ==="
|
|
260
|
+
ls -la artifacts/
|
|
261
|
+
echo ""
|
|
262
|
+
echo "=== Searching for results.yaml files ==="
|
|
263
|
+
find artifacts/ -name "results.yaml" -type f
|
|
264
|
+
echo ""
|
|
265
|
+
echo "=== Directory tree (first 3 levels) ==="
|
|
266
|
+
find artifacts/ -maxdepth 3 -type d | sort
|
|
267
|
+
|
|
268
|
+
- name: Create resultset
|
|
269
|
+
run: |
|
|
270
|
+
mkdir -p results/sets
|
|
271
|
+
bundle exec serialbench resultset create weekly-benchmark results/sets/weekly-benchmark
|
|
272
|
+
|
|
273
|
+
- name: Add all results to resultset
|
|
274
|
+
run: |
|
|
275
|
+
bundle exec serialbench resultset add-result results/sets/weekly-benchmark artifacts/benchmark-results-*/
|
|
276
|
+
|
|
277
|
+
- name: Export dashboard payload and raw data
|
|
278
|
+
run: |
|
|
279
|
+
bundle exec serialbench resultset export-data results/sets/weekly-benchmark site/src/data/sample.json --raw-data-dir site/public/data
|
|
280
|
+
|
|
281
|
+
- name: Set up Node
|
|
282
|
+
uses: actions/setup-node@v4
|
|
283
|
+
with:
|
|
284
|
+
node-version: '24'
|
|
285
|
+
cache: npm
|
|
286
|
+
cache-dependency-path: site/package-lock.json
|
|
287
|
+
|
|
288
|
+
- name: Build site
|
|
289
|
+
run: |
|
|
290
|
+
cd site
|
|
291
|
+
npm ci
|
|
292
|
+
npm run build
|
|
293
|
+
|
|
294
|
+
- name: Setup Pages
|
|
295
|
+
uses: actions/configure-pages@v4
|
|
296
|
+
|
|
297
|
+
- name: Upload to GitHub Pages
|
|
298
|
+
uses: actions/upload-pages-artifact@v3
|
|
299
|
+
with:
|
|
300
|
+
path: site/dist
|
|
301
|
+
|
|
302
|
+
- name: Deploy to GitHub Pages
|
|
303
|
+
id: deployment
|
|
304
|
+
uses: actions/deploy-pages@v4
|
|
243
305
|
|
|
244
306
|
# Summary job
|
|
245
307
|
summary:
|
|
246
308
|
runs-on: ubuntu-latest
|
|
247
|
-
needs: [setup, benchmark,
|
|
309
|
+
needs: [setup, benchmark, deploy-pages]
|
|
248
310
|
if: always()
|
|
249
311
|
steps:
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
echo "
|
|
274
|
-
echo "
|
|
275
|
-
echo "
|
|
276
|
-
|
|
312
|
+
- name: Generate workflow summary
|
|
313
|
+
run: |
|
|
314
|
+
echo "## Weekly Benchmark Summary" >> $GITHUB_STEP_SUMMARY
|
|
315
|
+
echo "" >> $GITHUB_STEP_SUMMARY
|
|
316
|
+
echo "**Benchmark Status**: ${{ needs.benchmark.result }}" >> $GITHUB_STEP_SUMMARY
|
|
317
|
+
echo "**Deploy Status**: ${{ needs.deploy-pages.result }}" >> $GITHUB_STEP_SUMMARY
|
|
318
|
+
echo "" >> $GITHUB_STEP_SUMMARY
|
|
319
|
+
echo "### Platforms Tested" >> $GITHUB_STEP_SUMMARY
|
|
320
|
+
echo "- Ubuntu Latest (Linux x86_64)" >> $GITHUB_STEP_SUMMARY
|
|
321
|
+
echo "- Ubuntu 24.04 (Linux ARM64)" >> $GITHUB_STEP_SUMMARY
|
|
322
|
+
echo "- Ubuntu 22.04 (Linux ARM64)" >> $GITHUB_STEP_SUMMARY
|
|
323
|
+
echo "- macOS 14 (Apple Silicon ARM64)" >> $GITHUB_STEP_SUMMARY
|
|
324
|
+
echo "- macOS 15 (Apple Silicon ARM64)" >> $GITHUB_STEP_SUMMARY
|
|
325
|
+
echo "- macOS 15 Intel (Intel x86_64)" >> $GITHUB_STEP_SUMMARY
|
|
326
|
+
echo "- macOS 26 (Apple Silicon ARM64)" >> $GITHUB_STEP_SUMMARY
|
|
327
|
+
echo "- macOS 26 Intel (Intel x86_64)" >> $GITHUB_STEP_SUMMARY
|
|
328
|
+
echo "" >> $GITHUB_STEP_SUMMARY
|
|
329
|
+
echo "### Ruby Versions" >> $GITHUB_STEP_SUMMARY
|
|
330
|
+
echo "- Ruby 3.2, 3.3, 3.4, 4.0" >> $GITHUB_STEP_SUMMARY
|
|
331
|
+
echo "" >> $GITHUB_STEP_SUMMARY
|
|
332
|
+
echo "### Serialization Libraries" >> $GITHUB_STEP_SUMMARY
|
|
333
|
+
echo "- **XML**: REXML, Ox, Nokogiri, Oga, LibXML, Leptris" >> $GITHUB_STEP_SUMMARY
|
|
334
|
+
echo "- **JSON**: JSON, Oj, RapidJSON, YAJL" >> $GITHUB_STEP_SUMMARY
|
|
335
|
+
echo "- **YAML**: Psych" >> $GITHUB_STEP_SUMMARY
|
|
336
|
+
echo "- **TOML**: TOML-RB, Tomlib, tomlrb" >> $GITHUB_STEP_SUMMARY
|
|
337
|
+
echo "" >> $GITHUB_STEP_SUMMARY
|
|
338
|
+
if [ "${{ github.ref }}" == "refs/heads/main" ]; then
|
|
339
|
+
echo "### Results" >> $GITHUB_STEP_SUMMARY
|
|
340
|
+
echo "📊 [View Interactive Dashboard](https://metanorma.github.io/serialbench/)" >> $GITHUB_STEP_SUMMARY
|
|
341
|
+
fi
|
data/.github/workflows/rake.yml
CHANGED
|
@@ -6,10 +6,21 @@ on:
|
|
|
6
6
|
push:
|
|
7
7
|
branches: [ master, main ]
|
|
8
8
|
tags: [ v* ]
|
|
9
|
+
paths-ignore:
|
|
10
|
+
- '.github/workflows/windows-debug.yml'
|
|
9
11
|
pull_request:
|
|
12
|
+
paths-ignore:
|
|
13
|
+
- '.github/workflows/windows-debug.yml'
|
|
10
14
|
|
|
11
15
|
jobs:
|
|
12
16
|
rake:
|
|
13
17
|
uses: metanorma/ci/.github/workflows/generic-rake.yml@main
|
|
18
|
+
with:
|
|
19
|
+
before-setup-ruby: |
|
|
20
|
+
vcpkg install libxml2:x64-windows 2>&1 || true
|
|
21
|
+
vcpkg integrate install 2>&1 || true
|
|
22
|
+
mkdir -p .bundle 2>&1 || true
|
|
23
|
+
echo "---" > .bundle/config 2>&1 || true
|
|
24
|
+
echo 'BUNDLE_BUILD__LIBXML___RUBY: "--with-xml2-dir=C:/vcpkg/installed/x64-windows --with-xml2-include=C:/vcpkg/installed/x64-windows/include/libxml2 --with-xml2-lib=C:/vcpkg/installed/x64-windows/lib"' >> .bundle/config 2>&1 || true
|
|
14
25
|
secrets:
|
|
15
26
|
pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
|