serialbench 0.8.1 → 0.8.2
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 +7 -1
- data/CONTEXT.md +1 -0
- data/lib/serialbench/benchmark_runner.rb +9 -2
- data/lib/serialbench/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 78e2811627dc70d807d284593fb1a13ca400eba891ef228ec9b092866b78d0bb
|
|
4
|
+
data.tar.gz: 45cd025204212f8c28de83e6135328b89a0ece47481a885220e46794107026a4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5361a5e52df5c0635c565a301f6c547edcf840fbda565517710ede87ea9917c8ee83e211b4274f0e48623a9550c4869397c0aee871d8a7dfe5ccf3d77dbbfc2c
|
|
7
|
+
data.tar.gz: a56f57336d8f4beb1293696f1b86ae9a284f9377da79ba48e216c507cec314f247f7dfa8f5eca2c39048f73c0a9ce5b7d6de4f541ad02c10d938a96ec56ac89d
|
|
@@ -3,7 +3,12 @@ name: benchmark-weekly
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
5
5
|
branches: [main]
|
|
6
|
-
|
|
6
|
+
paths-ignore:
|
|
7
|
+
- 'README.md'
|
|
8
|
+
- 'CONTEXT.md'
|
|
9
|
+
- 'docs/**'
|
|
10
|
+
- 'lib/serialbench/version.rb'
|
|
11
|
+
- '**.md'
|
|
7
12
|
schedule:
|
|
8
13
|
# Run benchmarks weekly on Sundays at 2 AM UTC
|
|
9
14
|
- cron: '0 2 * * 0'
|
|
@@ -34,6 +39,7 @@ jobs:
|
|
|
34
39
|
benchmark:
|
|
35
40
|
runs-on: ${{ matrix.platform }}
|
|
36
41
|
needs: setup
|
|
42
|
+
timeout-minutes: 120
|
|
37
43
|
strategy:
|
|
38
44
|
fail-fast: false
|
|
39
45
|
matrix:
|
data/CONTEXT.md
CHANGED
|
@@ -8,4 +8,5 @@
|
|
|
8
8
|
- **Environment**: where a leg executes — `local`, `docker`, or `asdf` (`kind` in the environment config). Dispatched through `Runners.for`.
|
|
9
9
|
- **Environment key**: `{platform}-ruby-{version}` (e.g. `macos-26-ruby-3.4`) — the site's identity for a platform×ruby pair.
|
|
10
10
|
- **Capability**: a symbol in an adapter's capability set (`:xpath`, `:sax`, `:stax`, `:generate`, `:namespaces`…). Benchmarks filter adapters by capability; the site renders them as the capability strip.
|
|
11
|
+
- **Data push**: one Result Leg's results.yaml written to the data repo via the Contents API (atomic, per-format).
|
|
11
12
|
- **Fixture**: the generated test document for a format × size (`small`/`medium`/`large`), built by `Serialbench::TestData`. `test_data/{size}.{format}` files override the generated one.
|
|
@@ -65,9 +65,12 @@ module Serialbench
|
|
|
65
65
|
return [] unless defined?(::MemoryProfiler)
|
|
66
66
|
|
|
67
67
|
run_benchmark_iteration('memory') do |serializer, format, size, data|
|
|
68
|
-
# Memory profiling for parsing
|
|
68
|
+
# Memory profiling for parsing. MemoryProfiler disables GC while
|
|
69
|
+
# reporting, so every profiled parse accumulates: ten large-document
|
|
70
|
+
# trees exhaust the 16GB windows runners. One parse fully captures
|
|
71
|
+
# a large document's allocation and retention profile.
|
|
69
72
|
report = ::MemoryProfiler.report do
|
|
70
|
-
|
|
73
|
+
profile_iterations(size).times { serializer.parse(data) }
|
|
71
74
|
end
|
|
72
75
|
|
|
73
76
|
result = Models::MemoryPerformance.new(
|
|
@@ -173,6 +176,10 @@ module Serialbench
|
|
|
173
176
|
end
|
|
174
177
|
end
|
|
175
178
|
|
|
179
|
+
def profile_iterations(size)
|
|
180
|
+
size.to_s == 'large' ? 1 : 10
|
|
181
|
+
end
|
|
182
|
+
|
|
176
183
|
def validate_operations!
|
|
177
184
|
unknown = (@benchmark_config.operations || []) - (OPERATIONS.keys + ['memory'])
|
|
178
185
|
return if unknown.empty?
|
data/lib/serialbench/version.rb
CHANGED