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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 55b58686ee445c84cbbf69588022d932a56c7014255567c19d3bc44c2ddbad53
4
- data.tar.gz: 0353b87e4e5d5690a706e2ef3b2e3d96f85166092b098893c13b9024b56acf4e
3
+ metadata.gz: 78e2811627dc70d807d284593fb1a13ca400eba891ef228ec9b092866b78d0bb
4
+ data.tar.gz: 45cd025204212f8c28de83e6135328b89a0ece47481a885220e46794107026a4
5
5
  SHA512:
6
- metadata.gz: fdf9e8086fa5e7960151717340df5f131679af2389bf4126801f9a2ab777fed04f3eba511d108e2a4fe2d3f9e47c723970a22911b20880a162d93fdf85f7ace5
7
- data.tar.gz: 665f581b8491ce518a0602f76dfc7227ae51c14f343bbf650c6ee5e4b735b3d64676d4af3fd2b6e10d9eb16209ca9ec412763072183d1101cf6e63c40088a83d
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
- pull_request:
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
- 10.times { serializer.parse(data) }
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?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Serialbench
4
- VERSION = '0.8.1'
4
+ VERSION = '0.8.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: serialbench
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose