railwatch 0.8.3 → 0.8.4

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: 6426edd02fd2bb306da28aa55723598581751003cce2b10371fdabb5d5a726c7
4
- data.tar.gz: 44f256ceff92b14dd0534e0f260f6d8d8b9fb4294e357091c25ec3e0eb3b3ef3
3
+ metadata.gz: f52b89a567e0ac0a05281db9b77499961ee7abf9cbfbf663070600d8885818a3
4
+ data.tar.gz: 05cdb2e7d19bf73edb2dd80550b1a59bf39c83ad24b951c7f7d43b3ddee9a850
5
5
  SHA512:
6
- metadata.gz: bdb8ba9db502d460a3a653a52238728993807fe5b374823d08f8418b865a1a0d6c0a39f18809a9a00fe95c96952f6a3db4d0337bb3b544e85e63c835830b5e62
7
- data.tar.gz: 0ef6f54e5da09ae2b3fc7048ae8b9b4d50fbda878dbb42220c98236345054db8b6b24134e41c7eedf8d13d13f843f4405b0f037d3dd8e6e6caa3cb5d2a6f6d0e
6
+ metadata.gz: d3d4c4f9698de7d6f522d4c171962e959efccd4435ff07e036505ced415aaa43e4b134df949f18c61952c4b22738d7074f49afcc1209cf1088fe41ea6cae564b
7
+ data.tar.gz: 8f4c96092fc3a62f3538667c4d4f2e40de420e9f2ccacf7305b0b4b4fd99ca9b098cb830cced5b9def8a618d3d1e16e24e478d4461f2599e0047121b79e2df2e
data/CHANGELOG.md CHANGED
@@ -6,6 +6,14 @@
6
6
  filled in by the release commit, which is also the only commit that
7
7
  touches lib/railwatch/version.rb and Gemfile.lock. See CONTRIBUTING.md. -->
8
8
 
9
+ ## 0.8.4 (2026-09-23)
10
+
11
+ - A `class:` filter for a job class with many attempts in the window
12
+ walks the window again, where the newest page comes first. 0.8.3
13
+ gathered and sorted every attempt of the class through its group:
14
+ 10 s for the platform's 93,000 RollupJob attempts over 30 days, 2 ms by
15
+ walking.
16
+
9
17
  ## 0.8.3 (2026-09-23)
10
18
 
11
19
  - Filtering jobs by `class:` seeks the class's group (a job's group is
@@ -132,11 +132,20 @@ module Railwatch
132
132
  # "(pruned)" under the SolidQueue::Pruned group -- so the window's
133
133
  # rollups supply any other group recorded under the name, and the last
134
134
  # FRESH_NAMES, which rollups have not caught up with, match by name.
135
+ #
136
+ # A class with many attempts in the window is the opposite case: the
137
+ # newest page is in the first rows of the walk (2 ms), while the seek
138
+ # gathers and sorts every attempt (10 s for 93,000 RollupJobs over 30
139
+ # days). The rollups say how many there are, so a common class walks.
135
140
  if fields["class"].present?
136
141
  name = fields["class"]
137
- groups = [ Record.group_hash(name) ] |
138
- Telemetry::Rollup.for_type("job_attempt").between(range.begin, range.end).where(name: name).distinct.pluck(:group_hash)
139
- scope = scope.merge(Telemetry::Execution.in_groups_or_fresh("job_attempt", groups, range)).where(name: name)
142
+ rollups = Telemetry::Rollup.for_type("job_attempt").between(range.begin, range.end).where(name: name)
143
+ scope = if rollups.sum(:count) >= Telemetry::Execution::DENSE_MATCHES
144
+ scope.where(name: name)
145
+ else
146
+ groups = [ Record.group_hash(name) ] | rollups.distinct.pluck(:group_hash)
147
+ scope.merge(Telemetry::Execution.in_groups_or_fresh("job_attempt", groups, range)).where(name: name)
148
+ end
140
149
  end
141
150
  scope = scope.where(job_id: fields["job_id"]) if fields["job_id"].present?
142
151
  return scope unless text.present?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Railwatch
4
- VERSION = "0.8.3"
4
+ VERSION = "0.8.4"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: railwatch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.3
4
+ version: 0.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cole Robertson