rails-profiler 0.44.10 → 0.44.13
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 +24 -0
- data/lib/profiler/profile_diff.rb +20 -8
- 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: 55736f064cdfce5779a5c73aec7a57c01a1605cfb81222319f4f2ce3459c0a5b
|
|
4
|
+
data.tar.gz: 5d741d902befdeba45dec4d76a83e098e10399173e1c66d0d2eedc34d5c0bf29
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7ed2b44a79b103df46544bf7fd2620d19c634f1c37cdac2c3f624e9921f69a080693ead9014f86fd6699f71cbd98a93916c85b31f2b615a648ce1a51ab50e807
|
|
7
|
+
data.tar.gz: 44ffe929e66a17e87354feaa70bf3bbcfddb927a4a8ff1e858b7cef4ab420ac89df3f2aa8baa67632075900ed657b56e9d9bb438a3b5613492f9a0d929b0dc46
|
data/CHANGELOG.md
CHANGED
|
@@ -19,6 +19,30 @@ every commit of every tag interval is accounted for one way or the other.
|
|
|
19
19
|
|
|
20
20
|
## [Unreleased]
|
|
21
21
|
|
|
22
|
+
## [0.44.13] - 2026-10-23
|
|
23
|
+
|
|
24
|
+
<!-- stamped -->
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
|
|
28
|
+
- **Compare:** a collector absent from the second profile being compared is now neutral too, like one absent from the first, instead of being classified as an improvement or a regression.
|
|
29
|
+
|
|
30
|
+
## [0.44.12] - 2026-10-23
|
|
31
|
+
|
|
32
|
+
<!-- stamped -->
|
|
33
|
+
|
|
34
|
+
### Fixed
|
|
35
|
+
|
|
36
|
+
- **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.
|
|
37
|
+
|
|
38
|
+
## [0.44.11] - 2026-10-22
|
|
39
|
+
|
|
40
|
+
<!-- stamped -->
|
|
41
|
+
|
|
42
|
+
### Fixed
|
|
43
|
+
|
|
44
|
+
- **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.
|
|
45
|
+
|
|
22
46
|
## [0.44.10] - 2026-10-22
|
|
23
47
|
|
|
24
48
|
<!-- stamped -->
|
|
@@ -97,22 +97,34 @@ 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, val_b: val_b)
|
|
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)
|
|
106
|
-
change_pct = delta_pct&.abs || 0
|
|
107
|
-
|
|
105
|
+
def compute_status(delta, delta_pct, direction, threshold_pct, val_a: nil, val_b: nil)
|
|
108
106
|
if delta == 0
|
|
109
107
|
:neutral
|
|
110
|
-
elsif
|
|
108
|
+
elsif val_a.nil? || val_b.nil?
|
|
109
|
+
# Collector absent in one of the two profiles: no measurement to compare, stay neutral
|
|
111
110
|
:neutral
|
|
112
|
-
elsif
|
|
113
|
-
:
|
|
111
|
+
elsif delta_pct.nil?
|
|
112
|
+
# Collector present but baseline is zero: apply direction logic directly without threshold
|
|
113
|
+
if (direction == :lower && delta < 0) || (direction == :higher && delta > 0)
|
|
114
|
+
:improved
|
|
115
|
+
else
|
|
116
|
+
:regression
|
|
117
|
+
end
|
|
114
118
|
else
|
|
115
|
-
:
|
|
119
|
+
# Baseline is non-zero: apply threshold
|
|
120
|
+
change_pct = delta_pct.abs
|
|
121
|
+
if change_pct <= threshold_pct
|
|
122
|
+
:neutral
|
|
123
|
+
elsif (direction == :lower && delta < 0) || (direction == :higher && delta > 0)
|
|
124
|
+
:improved
|
|
125
|
+
else
|
|
126
|
+
:regression
|
|
127
|
+
end
|
|
116
128
|
end
|
|
117
129
|
end
|
|
118
130
|
|
data/lib/profiler/version.rb
CHANGED