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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b4d809bbb556e7a64fa4595e6e9ab0a08ee260f98fe58a7c957e45d0d7504a68
4
- data.tar.gz: e1922c1b0a7cf2f09b4386c2c4744e318d6f62b1d9c30c1aa544889d4aa8b270
3
+ metadata.gz: 1aee3d70070c14895be33f70f7dfe78a0f0fda57aafa29aacf8f9f9438a1e3b5
4
+ data.tar.gz: 6c6af8185408b29a16b2148dd3b8183df32b814e70ab1f934144627263fcebd4
5
5
  SHA512:
6
- metadata.gz: 066c81f3a6af4b441bc982c69f5753d1c2bd6a3d1c063f72536011dacc656b6e66ca9d26d1ee94eb99d836dec41def998b9b28aa308f4b3de33fdaac66a8175b
7
- data.tar.gz: 569139f3b38e102dc8409b73e64a32265df0de40c098ccd7b22bb07992e2f492e51bbb002fb5e516243beee3d7f46ea324b4120b0bfbc9950f6b0031a1ad6444
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, so they still have numbers when the process start is rejected. 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 `pre_load` and the ready times come out as tens of minutes and are dropped. Use the "(from load)" rows together with Cloud Run's `container/startup_latencies` metric or client-side timing for the full picture.
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
- "Read the \"(from load)\" rows; the time before load is not user-visible boot.",
359
+ "#{where}; the time before load is not user-visible boot.",
350
360
  cannot_see: %w[cpu_allocation] }
351
361
  end
352
362
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Hayaoki
4
- VERSION = "0.4.5"
4
+ VERSION = "0.4.6"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hayaoki
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.5
4
+ version: 0.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takato Hano