Files
shane d873402ac5 raea goal is the loop, raea make the asset tools (#269)
One loop, raea goal: every rule in TypeScript, held at edit, render, publish and done (goal check, tasks, judge, seen, gates, next); the brief's contract is goal: (one goal or a list, a workflow inline), and its plan is plan:. raea make is making a finished asset: character, clothes, motion, solid, wear, splat, physics, bake, sounds, component, the kit pipeline and shots. Instruments (check, judge, ask, world, scene faults, light check) stay top-level. With it: the montage pack (MK48-MK51), JavaScriptCore fixes raea goal needs (CommonJS named exports, reserved words too, dynamic import of file URLs, process.exit from a promise, stdin for -), raea-cli-goal and raea-cli-refused split out of raea-cli, and skills at raea-skills 105aede.
2026-11-29 18:43:09 -08:00

2.6 KiB

title, summary, order, sources
title summary order sources
raea traces List the sessions raea apps left, newest first, with how each ended and its glitches, or tell one in full. 53
engine/cli/src/cli.rs
io/trace/src

Every raea app records its session: how it ended, its glitches and errors, its slowest frames and its memory. raea traces lists the last 40, newest first. raea traces show tells one in full, such as why it crashed. Attach it to a bug report.

raea traces
raea traces show            # the newest
raea traces show 3          # the fourth in the list

What a run measures

A run can also time each of Bevy's render passes, count what the engine does, and turn on raea's own traces. Each of these is a stat channel, and you choose channels from your composition, so you don't need a rebuild or a variable. Choose them at the file's top level, so they're on before the engine opens:

import { native } from "@raea/app/native";

native("stats.on", { channels: ["bevy_passes", "trace"] });   // or ["all"]

bevy_passes times every render pass Bevy runs. Every other channel is one of raea's RAEA_*_TRACE or *_STATS switches, named without RAEA_ and in lower case: bake_trace, seedling_trace, media_stats. Setting the variable itself still works and overrides the composition, and RAEA_STATS=bevy_passes,trace chooses channels for a run without touching the file.

Debug views are channels too, and a view that takes a value takes it after =:

native("stats.on", { channels: ["pass=depth"] });        // the depth pass instead of the picture (or normal, albedo, sun, sky)
native("stats.on", { channels: ["lod_debug", "fog_debug", "volume_debug"] });

While the run goes, native("stats.read", {}) gives what it has measured so far: each timed pass's runs and its mean and worst milliseconds, and the counters (engine/draws, engine/updates; two updates a draw means each frame was drawn twice). A render works out its frames ahead of the engine, so a frame's code can read the totals from before that frame was drawn. When a run that chose any channel ends, it prints the table and keeps it as stats.json in its session folder, which is the folder raea traces show reads.

Usage

raea traces [show [N|last|DIR]]   (the sessions raea left, newest first: how each ended, its glitches; show tells one in full)

Headless: it needs nothing running and opens no window. Takes up to 2 arguments besides its flags.