Package org.mockserver.llm.analysis
Class LlmOptimisationCsvRenderer
java.lang.Object
org.mockserver.llm.analysis.LlmOptimisationCsvRenderer
Renders an
LlmOptimisationReport to CSV — a third export format
alongside the JSON bundle and the Markdown brief. The CSV is intended for spreadsheets and data pipelines: it is stable,
deterministic, and properly escaped (a field containing a comma, double-quote,
carriage return, or newline is wrapped in double quotes with embedded quotes
doubled, per RFC 4180).
The output has two sections separated by a blank line:
- Per-call rows — one row per captured call (the headline per-call numbers: provider/model, token breakdown, cost, latency, tool calls, finish reason).
- Totals/summary — a single
section,metric,valuetable carrying the aggregateLlmOptimisationReport.Totalsand the headlineLlmOptimisationReport.Verdictfigures.
Pure — no behaviour, no network, no LLM. The column set is documented in
docs/code/llm-mocking.md; it is additive to (not a substitute for) the
JSON bundle, so it is not a frozen wire contract.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
LlmOptimisationCsvRenderer
public LlmOptimisationCsvRenderer()
-
-
Method Details
-
render
Render the report to CSV. A null report renders an empty header-only CSV (so callers never have to null-check the result).
-