exutil

package
v1.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 8, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package exutil provides shared helpers for example programs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogBatch

func LogBatch(label string, responses []*protocol.ChatResponse, e2eStart time.Time)

LogBatch logs batch end-to-end time and per-response LLM call latency.

func LogChat

func LogChat(label string, resp *protocol.ChatResponse, e2eStart time.Time)

LogChat logs provider-reported LLM call latency and end-to-end wall time for a sync Chat. e2eStart should be captured immediately before client.Chat (or chain/tool invocation).

func LogE2E

func LogE2E(label string, e2eStart time.Time)

LogE2E logs end-to-end wall time when provider metrics are unavailable (e.g. mock models).

func LogStream

func LogStream(label string, stream protocol.ChatStream, e2eStart time.Time)

LogStream logs provider-reported stream latency, TTFT, and end-to-end wall time. e2eStart should be captured immediately before client.StreamChat.

func LogTurn

func LogTurn(label, callID string, stream protocol.ChatStream, e2eStart time.Time, ttft time.Duration)

LogTurn logs voice/dialog turn latency. ttft is time from turn start to first token; use a negative duration when no token was received.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL