Skip to main content

Module profile

Module profile 

Source
Expand description

--profile chrome|stderr|tracy profiler install (feature-gated). Opt-in profiler installation invoked from lumenc run --profile <kind>.

Compiled in only when lumenc is built with the profiling cargo feature (which also enables bevy_ecs/trace so per-system spans exist at all); --profile tracy additionally needs profiling-tracy. On a default build every mode errors at startup with a rebuild hint - the default binary carries neither span instrumentation nor a subscriber stack.

Installs a tracing subscriber that captures bevy_ecs/trace spans and exports them in one of three formats.

  • chrome: writes lumen-trace.json in the cwd in Chrome trace format; open in chrome://tracing or Perfetto.
  • tracy: connects to a running tracy-profiler GUI over TCP.
  • stderr: line-per-span formatter writing to stderr.

Structs§

ProfileGuard
Stub guard for builds without the profiling feature - install always errors before one is constructed, but the type must exist for the CLI’s Option<ProfileGuard> binding to compile.

Enums§

ProfileMode
Profiler output mode chosen via --profile <kind> on the CLI.

Functions§

install
Installs a global tracing subscriber wired to mode and returns a ProfileGuard that flushes on drop.