hayaoki 0.4.5 → 0.4.6
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 +6 -0
- data/README.md +1 -1
- data/lib/hayaoki/cold_start_report/hints/rules.rb +11 -1
- data/lib/hayaoki/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: 1aee3d70070c14895be33f70f7dfe78a0f0fda57aafa29aacf8f9f9438a1e3b5
|
|
4
|
+
data.tar.gz: 6c6af8185408b29a16b2148dd3b8183df32b814e70ab1f934144627263fcebd4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b7e2b58cc8d4b697c5572197c1800409aed94d4b976747d4677e5fa7e4a1b1d4cf1b1a84022ad6d0758caa5de9273ccc0839385375e0009fb1b6ce1086369700
|
|
7
|
+
data.tar.gz: 5ca1e70e878f2d3576deae0b628c3d8c84c0075ccb49716c8c0eca0c0307f75d8a26f719a9355643b8a288d22a08f52ad23e2a1e9454fff518d5a108bd700dcc
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.4.6] - 2026-11-11
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- `prestarted_process` pointed to the "(from load)" rows also for lines with a rejected start, where those rows print `-`. It now says that the "ready" and "first response" rows are already timed from load for such lines, and points to the "(from load)" rows only for lines with an out-of-range `pre_load`.
|
|
8
|
+
|
|
3
9
|
## [0.4.5] - 2026-11-11
|
|
4
10
|
|
|
5
11
|
### Changed
|
data/README.md
CHANGED
|
@@ -60,7 +60,7 @@ Summarizes the `cold_start` log lines written by the in-situ recorder. It reads
|
|
|
60
60
|
|
|
61
61
|
The output has the line count, p50/p90/p99/max for ready, first response and each phase, the mean `eager_top`, the first-request routes and lazy-loaded feature groups, and the split between user-facing and proactive starts.
|
|
62
62
|
|
|
63
|
-
The "(from load)" rows count time from hayaoki's load instead of process start,
|
|
63
|
+
The "(from load)" rows count time from hayaoki's load instead of process start, for lines that have `pre_load`. When the recorder rejects the process start (`start_rejected` set, `start_source: "load"`), the line has no `pre_load` and its phases are already timed from load: it counts in the plain "ready" and "first response" rows, and not in the "(from load)" rows. Lines with a `pre_load` outside 0..10 min (a bad `/proc` process start, seen in 0.2.0 lines) are left out of the plain rows and counted in the "(from load)" rows. On Cloud Run gen2 the process start is not the cold-start origin: instances appear to be created ahead and frozen until a request, so the recorder rejects the start, and when every line is like that the "(from load)" rows print `-` and the plain rows are the time from load. Use those rows together with Cloud Run's `container/startup_latencies` metric or client-side timing for the full picture.
|
|
64
64
|
|
|
65
65
|
| Option | Description |
|
|
66
66
|
| --- | --- |
|
|
@@ -343,10 +343,20 @@ module Hayaoki
|
|
|
343
343
|
next if n < MIN_N || bad.size * 2 < n
|
|
344
344
|
pre = bad.filter_map { |r| r.dig("start_rejected", "pre_load_ms") || r.dig("phases_ms", "pre_load") }.grep(Numeric).select(&:positive?)
|
|
345
345
|
p50 = median(pre)
|
|
346
|
+
# A rejected start has no pre_load and is timed from load in the plain rows; an out-of-range
|
|
347
|
+
# pre_load is left out of the plain rows and counted in the "(from load)" rows (Stats).
|
|
348
|
+
rejected = bad.count { |r| r["start_rejected"] }
|
|
349
|
+
where = if rejected == bad.size
|
|
350
|
+
"For these lines the \"ready\" and \"first response\" rows are already timed from load"
|
|
351
|
+
elsif rejected.zero?
|
|
352
|
+
"Read the \"(from load)\" rows"
|
|
353
|
+
else
|
|
354
|
+
"Lines with a rejected start are timed from load in the \"ready\" and \"first response\" rows, the others in the \"(from load)\" rows"
|
|
355
|
+
end
|
|
346
356
|
{ level: "note", n: n, evidence: { "rejected" => bad.size, "pre_load_ms_p50" => p50 },
|
|
347
357
|
message: "In #{bad.size} of #{n} lines the process started long before hayaoki loaded#{" (pre_load #{duration(p50)})" if p50}. " \
|
|
348
358
|
"The platform probably started the process ahead of the request and froze or throttled it (Cloud Run gen2 does this). " \
|
|
349
|
-
"
|
|
359
|
+
"#{where}; the time before load is not user-visible boot.",
|
|
350
360
|
cannot_see: %w[cpu_allocation] }
|
|
351
361
|
end
|
|
352
362
|
end
|
data/lib/hayaoki/version.rb
CHANGED