Skip to content

[Feature] Introduce tiered profiling levels to reduce swimlane collection overhead and measurement distortion #510

@indigo1973

Description

@indigo1973

Summary

Current swimlane export (perf_swimlane_*.json) relies on extensive timestamping and profiling-related data read/write operations during runtime. These profiling activities introduce non-negligible overhead and can slightly distort the very performance data being measured.

To address this, replace the boolean --enable-profiling / enable_profiling switch with a tiered perf_level model so users can trade off profiling detail versus perturbation:

  • 0: profiling off
  • 1: AICore-only profiling (minimal overhead)
  • 2: task + fanout profiling
  • 3: full profiling with AICPU phase records

This change enables controllable profiling granularity and makes collected performance data more representative for different analysis needs.

Motivation / Use Case

  • Reduce observer effect: full tracing adds runtime overhead; lower tiers reduce instrumentation impact and improve fidelity of measured timings.
  • Support different analysis goals: quick hotspot checks often need only lightweight AICore timing, while deep diagnosis may require full AICPU phase visibility.
  • Improve usability: users can select profiling granularity from CLI (--enable-profiling [LEVEL]) instead of all-or-nothing behavior.
  • Balance cost and detail: choose lower overhead in routine tuning/CI runs, and escalate to full mode only when deeper root-cause analysis is required.

Proposed API / Behavior

No response

Alternatives Considered

No response

Additional Context

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions