feat(sdk): addon load timing diagnostics — addon_diagnostics() (#390) #402

Merged
forbes merged 1 commits from feat/sdk-addon-diagnostics into main 2026-03-04 19:51:37 +00:00
Owner

Summary

Expose addon load timing and state programmatically and print a startup summary table to the console.

Changes

  • registry.py — New addon_diagnostics() function returning a list of dicts with name, state, load_time_ms, and error for every discovered addon.
  • addon_loader.py — New _print_load_summary(registry, phase) helper that prints a formatted table to the console. Called after both Init.py and InitGui.py load phases.
  • init.py — Exports addon_diagnostics.

Usage

import kindred_sdk as sdk

for d in sdk.addon_diagnostics():
    print(f"{d['name']:15} {d['state']:10} {d['load_time_ms']:.0f}ms")

Console output on startup:

Create: Addon load summary (Init.py)
  sdk       LOADED         12ms
  solver    LOADED         45ms
  gears     LOADED         28ms
  silo      LOADED        230ms

Closes #390

## Summary Expose addon load timing and state programmatically and print a startup summary table to the console. ## Changes - **registry.py** — New `addon_diagnostics()` function returning a list of dicts with `name`, `state`, `load_time_ms`, and `error` for every discovered addon. - **addon_loader.py** — New `_print_load_summary(registry, phase)` helper that prints a formatted table to the console. Called after both Init.py and InitGui.py load phases. - **__init__.py** — Exports `addon_diagnostics`. ## Usage ```python import kindred_sdk as sdk for d in sdk.addon_diagnostics(): print(f"{d['name']:15} {d['state']:10} {d['load_time_ms']:.0f}ms") ``` Console output on startup: ``` Create: Addon load summary (Init.py) sdk LOADED 12ms solver LOADED 45ms gears LOADED 28ms silo LOADED 230ms ``` Closes #390
forbes added 1 commit 2026-03-04 19:50:53 +00:00
feat(sdk): addon load timing diagnostics — addon_diagnostics() (#390)
Some checks failed
Build and Test / build (pull_request) Has been cancelled
2127d2c904
Add kindred_sdk.addon_diagnostics() returning per-addon load state,
timing, and error info as a list of dicts. Reads name, state,
load_time_ms, and error from AddonManifest via AddonRegistry.

Add _print_load_summary() to addon_loader.py that prints a formatted
summary table to the console after each load phase (Init.py and
InitGui.py), replacing interleaved individual log lines with a
consolidated view.

Closes #390
forbes merged commit 6ac0c4af54 into main 2026-03-04 19:51:37 +00:00
forbes deleted branch feat/sdk-addon-diagnostics 2026-03-04 19:51:37 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kindred/create#402