railwatch 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 +4 -4
- data/CHANGELOG.md +7 -0
- data/app/controllers/railwatch/profiles_controller.rb +10 -8
- data/lib/railwatch/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: d3e41b1890c573cc71fe35d7a9ac134dc3964e4250126bd7c898132800ba47d9
|
|
4
|
+
data.tar.gz: 84f59bb0bc68c014618c564533b0f3a5266062b1fac93a252a5a41c3632f0136
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4472da6ecdbb054cd17cae2a31cf3d1f0a5a6237e4964af2c9da04fa2b754a95a7aa91c268dd43ef9a29791762b82c2edffb446557b0f2b6b5a3a47f6b504a8c
|
|
7
|
+
data.tar.gz: 276639c1d1f4c9632892a419f83443407a41af5e33c062a426e50bf9a3f5fa8daf039b267157c14079e2c826dbd5b025e0a2e955d43450d28b59be31637fb6b4
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,13 @@
|
|
|
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.2 (2026-09-23)
|
|
10
|
+
|
|
11
|
+
- The Profiles page's profiled share counts only the executions inside
|
|
12
|
+
its window. A window starting or ending mid-hour counted the whole of
|
|
13
|
+
its first and last hours, because a rollup holds its whole hour; the
|
|
14
|
+
partial hours are now counted from the rows.
|
|
15
|
+
|
|
9
16
|
## 0.8.1 (2026-09-23)
|
|
10
17
|
|
|
11
18
|
- The Tenants page reads only through the tenant-led indexes. Sparklines
|
|
@@ -30,16 +30,18 @@ module Railwatch
|
|
|
30
30
|
private
|
|
31
31
|
|
|
32
32
|
# How many executions the window holds, as the profiled share's
|
|
33
|
-
# denominator. Every kind is rolled up, so
|
|
34
|
-
#
|
|
35
|
-
#
|
|
36
|
-
#
|
|
33
|
+
# denominator. Every kind is rolled up, so whole hours come from a few
|
|
34
|
+
# hundred rollup rows rather than counting every execution (1.2 s over a
|
|
35
|
+
# week of the platform's own). A rollup holds its whole hour, so the
|
|
36
|
+
# partial hours at either end of the window are counted from the rows.
|
|
37
37
|
def executions_in(from, to)
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
first = from.beginning_of_hour == from ? from : from.beginning_of_hour + 1.hour
|
|
39
|
+
last = to.beginning_of_hour
|
|
40
|
+
return Telemetry::Execution.between(from, to).count if first >= last
|
|
40
41
|
|
|
41
|
-
Telemetry::Execution.where(occurred_at: from...
|
|
42
|
-
Telemetry::Rollup.for_type(Telemetry::Execution::KINDS).
|
|
42
|
+
Telemetry::Execution.where(occurred_at: from...first).count +
|
|
43
|
+
Telemetry::Rollup.for_type(Telemetry::Execution::KINDS).where(bucket: first...last).sum(:count) +
|
|
44
|
+
Telemetry::Execution.where(occurred_at: last..to).count
|
|
43
45
|
end
|
|
44
46
|
|
|
45
47
|
# Rows arrive newest-first, so the head of each group is the profile the
|
data/lib/railwatch/version.rb
CHANGED