rails-profiler 0.44.10 → 0.44.11
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/CHANGELOG.md +8 -0
- data/lib/profiler/profile_diff.rb +16 -7
- data/lib/profiler/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: '09e0c24dd672f0b760b41659e2e84dbb2ee21d6f193271fceeebb1c0034d44d8'
|
|
4
|
+
data.tar.gz: 577bac65e14c99522006a78f700ac63931c2c6b2f9d4670572274571722b5962
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0576b03a26c219dc6f6c984db4020b20163b0231fa98198577764c0885053df645a21b306a3af5fe2b05d2b029f303ad819ade2b5e496a959d1f01f0623e6a7e
|
|
7
|
+
data.tar.gz: e71ce16de91dc638b81760ff41fca3b8d49bc829f0982aa4222446c8a5103557c04b134dbb99d9f75513043ff7e26d1d953a7681de3fc83b0d3a5c3ce7d1b672
|
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.11] - 2026-10-22
|
|
23
|
+
|
|
24
|
+
<!-- stamped -->
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
|
|
28
|
+
- **Compare:** metric status now correctly identifies improvements and regressions when baseline values are zero, classifying direction-aligned changes as improvements without requiring a percentage threshold.
|
|
29
|
+
|
|
22
30
|
## [0.44.10] - 2026-10-22
|
|
23
31
|
|
|
24
32
|
<!-- stamped -->
|
|
@@ -103,16 +103,25 @@ module Profiler
|
|
|
103
103
|
end
|
|
104
104
|
|
|
105
105
|
def compute_status(delta, delta_pct, direction, threshold_pct)
|
|
106
|
-
change_pct = delta_pct&.abs || 0
|
|
107
|
-
|
|
108
106
|
if delta == 0
|
|
109
107
|
:neutral
|
|
110
|
-
elsif
|
|
111
|
-
:
|
|
112
|
-
|
|
113
|
-
|
|
108
|
+
elsif delta_pct.nil?
|
|
109
|
+
# Baseline is zero: apply direction logic directly without threshold
|
|
110
|
+
if (direction == :lower && delta < 0) || (direction == :higher && delta > 0)
|
|
111
|
+
:improved
|
|
112
|
+
else
|
|
113
|
+
:regression
|
|
114
|
+
end
|
|
114
115
|
else
|
|
115
|
-
:
|
|
116
|
+
# Baseline is non-zero: apply threshold
|
|
117
|
+
change_pct = delta_pct.abs
|
|
118
|
+
if change_pct <= threshold_pct
|
|
119
|
+
:neutral
|
|
120
|
+
elsif (direction == :lower && delta < 0) || (direction == :higher && delta > 0)
|
|
121
|
+
:improved
|
|
122
|
+
else
|
|
123
|
+
:regression
|
|
124
|
+
end
|
|
116
125
|
end
|
|
117
126
|
end
|
|
118
127
|
|
data/lib/profiler/version.rb
CHANGED