stormlog.analyzer

Advanced analysis tools for memory profiling data.

Classes

MemoryAnalyzer([profiler, ...])

Advanced analyzer for memory profiling data.

MemoryPattern(pattern_type, description, ...)

Represents a detected memory usage pattern.

PerformanceInsight(category, title, ...)

Performance insight derived from profiling data.

class stormlog.analyzer.MemoryPattern(pattern_type, description, severity, affected_functions, metrics, suggestions)[source]

Bases: object

Represents a detected memory usage pattern.

Parameters:
  • pattern_type (str)

  • description (str)

  • severity (str)

  • affected_functions (List[str])

  • metrics (Dict[str, Any])

  • suggestions (List[str])

pattern_type: str
description: str
severity: str
affected_functions: List[str]
metrics: Dict[str, Any]
suggestions: List[str]
class stormlog.analyzer.PerformanceInsight(category, title, description, impact, confidence, data, recommendations)[source]

Bases: object

Performance insight derived from profiling data.

Parameters:
  • category (str)

  • title (str)

  • description (str)

  • impact (str)

  • confidence (float)

  • data (Dict[str, Any])

  • recommendations (List[str])

category: str
title: str
description: str
impact: str
confidence: float
data: Dict[str, Any]
recommendations: List[str]
class stormlog.analyzer.MemoryAnalyzer(profiler=None, collective_sensitivity='medium', collective_threshold_overrides=None)[source]

Bases: object

Advanced analyzer for memory profiling data.

Parameters:
  • profiler (GPUMemoryProfiler | None)

  • collective_sensitivity (str)

  • collective_threshold_overrides (Mapping[str, Any] | None)

analyze_memory_patterns(results=None)[source]

Detect memory usage patterns in profiling data.

Parameters:

results (List[ProfileResult] | None) – List of ProfileResults to analyze

Returns:

List of detected patterns

Return type:

List[MemoryPattern]

generate_performance_insights(results=None)[source]

Generate performance insights from profiling data.

Parameters:

results (List[ProfileResult] | None) – List of ProfileResults to analyze

Returns:

List of performance insights

Return type:

List[PerformanceInsight]

analyze_memory_gaps(events, *, phase_resolver=None)[source]

Classify allocator-vs-device hidden memory gaps over time.

Parameters:
Returns:

Prioritized list of gap findings (severity desc, confidence desc).

Return type:

List[GapFinding]

analyze_cross_rank_timeline(events, *, phase_resolver=None)[source]

Merge rank timelines and detect the earliest cluster-wide spike cause.

Parameters:
Return type:

Dict[str, Any]

analyze_collective_attribution(events, *, phase_resolver=None)[source]

Attribute hidden-memory spikes to collective communication phases.

Parameters:
Return type:

List[CollectiveAttributionResult]

generate_optimization_report(results=None, events=None)[source]

Generate a comprehensive optimization report.

Parameters:
  • results (List[ProfileResult] | None) – List of ProfileResults to analyze

  • events (List[TelemetryEventV2] | None) – Optional telemetry event series for gap analysis. When provided, the report includes a gap_analysis section.

Returns:

Comprehensive optimization report

Return type:

Dict[str, Any]