]> git.hungrycats.org Git - bees/commitdiff
config-v2: fold heatmap into log-counters, use 1h, trim report comments
authorZygo Blaxell <bees@furryterror.org>
Fri, 19 Jun 2026 17:27:49 +0000 (13:27 -0400)
committerZygo Blaxell <bees@furryterror.org>
Sat, 5 Sep 2026 04:04:12 +0000 (00:04 -0400)
Drop the separate [report.log-heatmap] stanza and add the heatmap token
to [report.log-counters], so the planner heatmaps ride along with the
periodic counter dump.  Now that the token renders a per-interval delta
rather than self-zeroing on a fixed hourly timer, it no longer needs its
own 30s cadence; the log-counters interval drives it.

Spell one hour as 1h instead of 3600s in the log-counters, log-tasks,
and beesstats intervals.

Trim the [report.*] comments to the rules for this file: a comment sits
directly above its section or key (or --show-config misplaces it) and
states only purpose and allowed values.  Cross-section behaviour
($BEESSTATUS), write mechanics (atomic temp-file rename, fchmod),
filename resolution internals, and legacy rationale move to
docs/config-file.md, which already carries them.

Update the docs built-in-reports table to match: 1h intervals, heatmap
folded into log-counters, log-heatmap row removed.

Assisted-by: Claude-Code:claude-opus-4-8
docs/config-file.md
src/bees-config-v2.cc

index a884d216bfc089478fa01850007f42cb8c49e050..b5d2a6cdd727f2c15746ba9fb4ae709e1b8f1145 100644 (file)
@@ -625,10 +625,9 @@ that bees used to log directly.
 | `[report.activity]` | `${UUID}.activity` | `1s` | `0440` | `threads` |
 | `[report.progress]` | `${UUID}.progress` | `1s` | `0444` | `progress` |
 | `[report.tasks]` | `${UUID}.tasks` | `1s` | `0400` | `workers queue idle tasks` |
-| `[report.beesstats]` | `${HOME}/beesstats.txt` | `3600s` | `0400` | `hashtable totals rates progress` (active) |
-| `[report.log-counters]` | `-` (log, level 6) | `3600s` | — | `totals rates delta-counts delta-rates threads` (active) |
-| `[report.log-tasks]` | `-` (log, level 7) | `3600s` | — | `workers queue idle tasks` (active) |
-| `[report.log-heatmap]` | `-` (log, level 6) | `30s` | — | `heatmap` (active) |
+| `[report.beesstats]` | `${HOME}/beesstats.txt` | `1h` | `0400` | `hashtable totals rates progress` (active) |
+| `[report.log-counters]` | `-` (log, level 6) | `1h` | — | `totals rates delta-counts delta-rates threads heatmap` (active) |
+| `[report.log-tasks]` | `-` (log, level 7) | `1h` | — | `workers queue idle tasks` (active) |
 
 ## [state] section
 
index fabff62cb910c4cf1f740d60a6726e7f83b1a3ae..3b19cd06d9a2ad3f6a818f7cf592cf925824ff02 100644 (file)
@@ -45,7 +45,7 @@ static const char bees_config_v2[] = R"--v2-config--(
 [report.*]
 
         # Content tokens written to the file, in order, space- or comma-separated.
-        # An unrecognised token emits a placeholder line rather than failing silently.
+        # An unrecognised token emits a placeholder line.
         #
         # Implemented tokens:
         #   totals    - cumulative event counters
@@ -59,58 +59,44 @@ static const char bees_config_v2[] = R"--v2-config--(
         #   hashtable   - hash table page-occupancy histogram
         #   delta-counts- event-counter change since this report last rendered
         #   delta-rates - that change divided by the elapsed time
-        #   heatmap     - planner cost heatmaps (zeroed hourly when rendered)
+        #   heatmap     - planner cost heatmaps (change since last render)
         content =
 
-# [reports.beesstats] reproduces the legacy $BEESHOME/beesstats.txt stats file.
-# Unlike the other reports it is active by default, because bees always wrote
-# that file.  ${HOME} targets the open paths.home ($BEESHOME) directory; if
-# paths.home is unavailable the report is disabled.  The interval is long
-# because the file lives on the (slow, deduplicated) target filesystem.
+# [report.legacy]: the $BEESSTATUS-style status file.
+
+[report.legacy]
+
+# [reports.beesstats] writes the beesstats.txt summary under paths.home.
+# Active by default.
 
 [reports.beesstats]
 
         filename = ${HOME}/beesstats.txt
-        interval = 3600s
+        interval = 1h
         content  = hashtable totals rates progress
         mode     = 0400
         active   = yes
 
-# [reports.log-counters] and [reports.log-tasks] reproduce the periodic status
-# that bees used to log directly.  Both emit to the log (filename = -); the
-# counters go at LOG_INFO and the larger task dump at LOG_DEBUG, matching the
-# old behaviour where the task tree was kept at debug priority.  Active by
-# default.
+# [reports.log-counters] and [reports.log-tasks] emit the periodic status to
+# the log (filename = -).  Counters and heatmaps go at LOG_INFO, the larger
+# task dump at LOG_DEBUG.
 
 [reports.log-counters]
 
         filename = -
         level    = 6
-        interval = 3600s
-        content  = totals rates delta-counts delta-rates threads
+        interval = 1h
+        content  = totals rates delta-counts delta-rates threads heatmap
         active   = yes
 
 [reports.log-tasks]
 
         filename = -
         level    = 7
-        interval = 3600s
+        interval = 1h
         content  = workers queue idle tasks
         active   = yes
 
-# [reports.log-heatmap] logs the planner cost heatmaps, which the planner
-# used to log directly from the transid poll loop.  The heatmap token zeroes
-# the heatmaps once an hour so the picture tracks recent activity.  Active by
-# default; emits nothing until the planner has run.
-
-[reports.log-heatmap]
-
-        filename = -
-        level    = 6
-        interval = 30s
-        content  = heatmap
-        active   = yes
-
 # The [rewrite] section contains per-extent planner limits for rewrite and
 # dedupe work.  The legacy and scan_next engines currently enforce dedupe-max,
 # compressed-dedupe-max, copy-max, hole-max, total-max, candidate-max-count,