report

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: Apache-2.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package report prints a metrics.Report as terminal text, Markdown, a one-page HTML file or JSON. Every format is built from the same View, so the numbers cannot drift between them.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTML

func HTML(w io.Writer, r *metrics.Report) error

HTML writes the one-page report.

func JSON

func JSON(w io.Writer, r *metrics.Report) error

JSON writes the report as indented JSON.

func Markdown

func Markdown(w io.Writer, r *metrics.Report) error

Markdown writes the report for a GitHub job summary or an issue.

func Text

func Text(w io.Writer, r *metrics.Report) error

Text writes the terminal report.

func TrendHTML

func TrendHTML(w io.Writer, t *metrics.Trend) error

TrendHTML writes the one-page trend.

func TrendJSON

func TrendJSON(w io.Writer, t *metrics.Trend) error

TrendJSON writes the trend as indented JSON.

func TrendMarkdown

func TrendMarkdown(w io.Writer, t *metrics.Trend) error

TrendMarkdown writes the trend for a GitHub job summary or an issue.

func TrendText

func TrendText(w io.Writer, t *metrics.Trend) error

TrendText writes the terminal trend.

Types

type StageBar

type StageBar struct {
	ID, Name, Station string
	Share             float64
	Constraint        bool
}

StageBar is one stage of the time breakdown.

type Table

type Table struct {
	Title  string
	Header []string
	Rows   [][]string
	Note   string
}

Table is a header row and body rows of already formatted cells.

type TrendGroup

type TrendGroup struct {
	Name string
	// Summary has one row per series: both ends, the change and a sparkline.
	Summary Table
	// Full has one row per series and one column per period.
	Full   Table
	Charts []template.HTML
}

TrendGroup is one group of series, laid out for printing.

type TrendView

type TrendView struct {
	T      *metrics.Trend
	Title  string
	Window string
	Groups []TrendGroup
	// ByPeriod has one row per period.
	ByPeriod Table
}

TrendView is the trend laid out for printing.

func NewTrendView

func NewTrendView(t *metrics.Trend) TrendView

NewTrendView lays a trend out.

type View

type View struct {
	R          *metrics.Report
	Title      string
	Window     string
	Classes    Table
	Stages     Table
	Bars       []StageBar
	Agents     Table
	Repos      Table
	LightsOut  Table
	HasAgents  bool
	HasRepos   bool
	Constraint string
}

View is the report laid out for printing.

func NewView

func NewView(r *metrics.Report) View

NewView lays a report out.

Jump to

Keyboard shortcuts

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