MCPcopy Create free account
hub / github.com/Emmimal/control-layer / generate_all_charts

Function generate_all_charts

demo.py:574–594  ·  view source on GitHub ↗
(benchmark_results, cl_packets, config)

Source from the content-addressed store, hash-verified

572
573
574def generate_all_charts(benchmark_results, cl_packets, config):
575 fig = plt.figure(figsize=(18, 12), facecolor="white")
576 fig.suptitle("Control Layer — Production Benchmark Results",
577 fontsize=15, fontweight="bold", color=CHART_COLOR_DARK, y=0.98)
578 gs = gridspec.GridSpec(2, 3, figure=fig, hspace=0.42, wspace=0.38,
579 left=0.06, right=0.97, top=0.92, bottom=0.08)
580 axes = [fig.add_subplot(gs[r, c]) for r in range(2) for c in range(3)]
581
582 chart_1_pass_rate(benchmark_results["naive_pass_rate"],
583 benchmark_results["cl_pass_rate"], axes[0])
584 chart_2_failure_dist(benchmark_results["cl_audit"], axes[1])
585 chart_3_retry_dist(benchmark_results["cl_attempts_dist"], axes[2])
586 chart_4_latency(benchmark_results["naive_latencies"],
587 benchmark_results["cl_latencies"], axes[3])
588 chart_5_token_budget(config, axes[4])
589 chart_6_quality_scores(cl_packets, axes[5])
590
591 plt.savefig("control_layer_benchmark.png", dpi=150,
592 bbox_inches="tight", facecolor="white")
593 print("\n Benchmark chart saved: control_layer_benchmark.png")
594 plt.show()
595
596
597# =============================================================================

Callers 1

demo.pyFile · 0.85

Calls 6

chart_1_pass_rateFunction · 0.85
chart_2_failure_distFunction · 0.85
chart_3_retry_distFunction · 0.85
chart_4_latencyFunction · 0.85
chart_5_token_budgetFunction · 0.85
chart_6_quality_scoresFunction · 0.85

Tested by

no test coverage detected