metrics

package
v1.63.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Go Multi-Agent - Metrics Display

  • ChatCLI - CLI metrics

  • Copyright (c) 2024 Edilson Freitas

  • License: MIT

  • ChatCLI - CLI metrics

  • Copyright (c) 2024 Edilson Freitas

  • License: MIT

  • ChatCLI - Metrics Timer

  • Copyright (c) 2024 Edilson Freitas

  • License: MIT

Index

Constants

View Source
const (
	ColorReset  = "\033[0m"
	ColorGreen  = "\033[32m"
	ColorYellow = "\033[33m"
	ColorRed    = "\033[31m"
	ColorCyan   = "\033[36m"
	ColorGray   = "\033[90m"
	ColorBold   = "\033[1m"
)

Variables

This section is empty.

Functions

func ClearLine

func ClearLine() string

func FormatDuration

func FormatDuration(d time.Duration) string

func FormatDurationShort

func FormatDurationShort(d time.Duration) string

func FormatTimerComplete

func FormatTimerComplete(d time.Duration) string

func FormatTimerStatus

func FormatTimerStatus(d time.Duration, model, msg string) string

func FormatTurnInfo

func FormatTurnInfo(t, m int, d time.Duration, stats *TurnStats) string

func GetDotsAnimation added in v1.49.0

func GetDotsAnimation() string

func GetSpinnerFrame added in v1.49.0

func GetSpinnerFrame() string

Types

type Spinner added in v1.49.0

type Spinner struct {
	// contains filtered or unexported fields
}

func NewSpinner added in v1.49.0

func NewSpinner() *Spinner

func (*Spinner) Next added in v1.49.0

func (s *Spinner) Next() string

type Timer

type Timer struct {
	// contains filtered or unexported fields
}

Timer representa um cronometro de execução com display em tempo real

func NewTimer

func NewTimer() *Timer

NewTimer cria um novo timer

func (*Timer) Elapsed

func (t *Timer) Elapsed() time.Duration

Elapsed retorna o tempo decorrido (funciona mesmo com timer rúdando)

func (*Timer) IsRunning

func (t *Timer) IsRunning() bool

IsRunning retorna se o timer está em execução

func (*Timer) Start

func (t *Timer) Start(ctx context.Context, displayFunc func(duration time.Duration))

Start inicia o timer e opcionalmente atualiza o display em tempo real

func (*Timer) Stop

func (t *Timer) Stop() time.Duration

Stop para o timer e retorna a duração total

type TurnStats added in v1.62.0

type TurnStats struct {
	AgentsLaunched int
	ToolCallsExecd int
}

TurnStats holds accumulated session counters displayed alongside turn info.

Jump to

Keyboard shortcuts

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