rails-profiler 0.44.11 → 0.44.12

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: '09e0c24dd672f0b760b41659e2e84dbb2ee21d6f193271fceeebb1c0034d44d8'
4
- data.tar.gz: 577bac65e14c99522006a78f700ac63931c2c6b2f9d4670572274571722b5962
3
+ metadata.gz: 31af1f16fda6ca926b1dd3d4e13992e235b3006b8c81a238ce06d2e003a7793c
4
+ data.tar.gz: 2ac428bf14f9c80cd5bd12729bacb4989ca0d29607bf6a98611877bcfe0924a9
5
5
  SHA512:
6
- metadata.gz: 0576b03a26c219dc6f6c984db4020b20163b0231fa98198577764c0885053df645a21b306a3af5fe2b05d2b029f303ad819ade2b5e496a959d1f01f0623e6a7e
7
- data.tar.gz: e71ce16de91dc638b81760ff41fca3b8d49bc829f0982aa4222446c8a5103557c04b134dbb99d9f75513043ff7e26d1d953a7681de3fc83b0d3a5c3ce7d1b672
6
+ metadata.gz: 80c65e06fb80613fc6f688dff701c16a91ed43428851c9217d6b986e0d0ea0836bd40ec10a0b72efe7086db6778bcbd303789cd4e75d61c83184e3eb2b767dc2
7
+ data.tar.gz: 7ccd51df55f9698ee0264d9fe2dac70be0f365e07d7db37181f3ba545b25ca7c4029fad969b0b43456551b8b4e13e641331fe4a343f186dd768962e0b5253307
data/CHANGELOG.md CHANGED
@@ -19,6 +19,14 @@ every commit of every tag interval is accounted for one way or the other.
19
19
 
20
20
  ## [Unreleased]
21
21
 
22
+ ## [0.44.12] - 2026-10-23
23
+
24
+ <!-- stamped -->
25
+
26
+ ### Fixed
27
+
28
+ - **Compare:** metric diff now correctly distinguishes between absent collectors (no measurement to compare) and zero baselines (measured at zero), ensuring absent collectors remain neutral instead of incorrectly classified as improvements or regressions.
29
+
22
30
  ## [0.44.11] - 2026-10-22
23
31
 
24
32
  <!-- stamped -->
@@ -97,16 +97,19 @@ module Profiler
97
97
  delta = (b || 0) - (a || 0)
98
98
  delta_pct = (a && a != 0) ? (delta / a * 100).round(1) : nil
99
99
 
100
- status = compute_status(delta, delta_pct, direction, threshold_pct)
100
+ status = compute_status(delta, delta_pct, direction, threshold_pct, val_a: val_a)
101
101
 
102
102
  { value_a: val_a, value_b: val_b, delta: delta.round(4), delta_pct: delta_pct, status: status }
103
103
  end
104
104
 
105
- def compute_status(delta, delta_pct, direction, threshold_pct)
105
+ def compute_status(delta, delta_pct, direction, threshold_pct, val_a: nil)
106
106
  if delta == 0
107
107
  :neutral
108
+ elsif val_a.nil?
109
+ # Collector absent in baseline profile: no measurement to compare, stay neutral
110
+ :neutral
108
111
  elsif delta_pct.nil?
109
- # Baseline is zero: apply direction logic directly without threshold
112
+ # Collector present but baseline is zero: apply direction logic directly without threshold
110
113
  if (direction == :lower && delta < 0) || (direction == :higher && delta > 0)
111
114
  :improved
112
115
  else
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Profiler
4
- VERSION = "0.44.11"
4
+ VERSION = "0.44.12"
5
5
 
6
6
  GEM_ROOT = File.expand_path("../..", __dir__)
7
7
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-profiler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.44.11
4
+ version: 0.44.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sébastien Duplessy