Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
- [Storage](#storage)
- [Tokenizer](#tokenizer)
3. [Full Configuration Examples](#full-configuration-examples)

## Overview

This document provides complete documentation for all configuration options available in the Kubernetes Inference Performance Benchmark tool.
Expand Down
9 changes: 7 additions & 2 deletions inference_perf/analysis/analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ def _extract_throughput_metric(throughput_data: Dict[str, Any], metric_name: str
return None


def _generate_plot(charts_to_generate: List[Dict[str, Any]], suptitle: str, output_path: Path) -> None:
def _generate_plot(
charts_to_generate: List[Dict[str, Any]], suptitle: str, output_path: Path, ylims: List[Tuple[float, float]] = None
) -> None:
"""Generates and saves a plot with multiple subplots."""
import matplotlib.pyplot as plt

Expand All @@ -62,14 +64,16 @@ def _generate_plot(charts_to_generate: List[Dict[str, Any]], suptitle: str, outp
ax.set_xlabel(chart_info.get("xlabel", "QPS (requested rate)"))
ax.set_ylabel(chart_info["ylabel"])
ax.grid(True)
if ylims and i < len(ylims) and ylims[i]:
ax.set_ylim(ylims[i])

fig.tight_layout(rect=(0, 0.03, 1, 0.95))
plt.savefig(output_path)
logger.info(f"Chart saved to {output_path}")
plt.close(fig)


def analyze_reports(report_dir: str) -> None:
def analyze_reports(report_dir: str, ylims: List[Tuple[float, float]] = None) -> None:
"""
Analyzes performance reports to generate charts.

Expand Down Expand Up @@ -237,6 +241,7 @@ def analyze_reports(report_dir: str) -> None:
throughput_charts_to_generate,
"Throughput vs Request Rate",
report_path / "throughput_vs_qps.png",
ylims=ylims,
)

# --- Generate Throughput vs Latency Curve Plot ---
Expand Down