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

Open
opened 2026-03-03 23:03:48 +00:00 by forbes · 0 comments
Owner

Summary

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

Current state (PARTIAL)

load_time_ms is measured per addon and logged to console ("Create: Loaded {addon} InitGui.py ({elapsed:.0f}ms)"). However:

  • Not accessible programmatically — no addon_diagnostics() method
  • No startup summary table (individual log lines are interleaved with other output)
  • No per-phase breakdown accessible (Init.py vs InitGui.py timed separately but not summed)

Proposed API

import kindred_sdk as sdk

sdk.addon_diagnostics()
# -> [{"name": "sdk", "state": "LOADED", "load_time_ms": 12, "error": None}, ...]

Scope

  • Add addon_diagnostics() to kindred_sdk/registry.py — returns list of dicts with name, state, load_time_ms, error
  • Print a formatted summary table to console after all addons load:
    Create: Addon load summary
      sdk       LOADED    12ms
      solver    LOADED    45ms
      gears     LOADED    28ms
      datums    LOADED    15ms
      silo      LOADED   230ms
    
  • Add the summary table to load_addons() in addon_loader.py

Roadmap

v0.2.0 — Addon Loader

## Summary Expose addon load timing and state programmatically and print a startup summary table to the console. ## Current state (PARTIAL) `load_time_ms` is measured per addon and logged to console (`"Create: Loaded {addon} InitGui.py ({elapsed:.0f}ms)"`). However: - Not accessible programmatically — no `addon_diagnostics()` method - No startup summary table (individual log lines are interleaved with other output) - No per-phase breakdown accessible (Init.py vs InitGui.py timed separately but not summed) ## Proposed API ```python import kindred_sdk as sdk sdk.addon_diagnostics() # -> [{"name": "sdk", "state": "LOADED", "load_time_ms": 12, "error": None}, ...] ``` ## Scope - Add `addon_diagnostics()` to `kindred_sdk/registry.py` — returns list of dicts with name, state, load_time_ms, error - Print a formatted summary table to console after all addons load: ``` Create: Addon load summary sdk LOADED 12ms solver LOADED 45ms gears LOADED 28ms datums LOADED 15ms silo LOADED 230ms ``` - Add the summary table to `load_addons()` in `addon_loader.py` ## Roadmap v0.2.0 — Addon Loader
forbes added the enhancement label 2026-03-03 23:03:48 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kindred/create#390