aiq.profiler.inference_optimization.bottleneck_analysis.simple_stack_analysis#
Advanced bottleneck analysis for a dataframe that contains: - event_type in {LLM_START, LLM_END, TOOL_START, TOOL_END, …} - llm_name - tool_name - UUID - event_timestamp (float or datetime) - other metadata…
We pair start/end events by UUID, compute operation durations, then analyze concurrency and produce a summary report.
Functions#
Perform advanced bottleneck profiling on a workflow dataframe. |
Module Contents#
- profile_workflow_bottlenecks(
- all_steps: list[list[aiq.data_models.intermediate_step.IntermediateStep]],
Perform advanced bottleneck profiling on a workflow dataframe.
Pair LLM_START/LLM_END and TOOL_START/TOOL_END by UUID.
Compute operation durations.
Analyze concurrency (max concurrent usage).
Summarize as SimpleOperationStats and produce a final SimpleBottleneckReport.
Parameters#
all_steps : Intermediate Steps
Returns#
- SimpleBottleneckReport
Contains detailed stats per operation and a textual summary of top bottlenecks.