coverage

package
v0.15.2 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 10 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 coverage serves the coverage data of a plugin built with coverage instrumentation, using make COVER=1, over the instrumentation HTTP server. It lets tests which run a plugin as a whole, in a cluster, collect coverage data from it the way go test -cover does for unit tests. Our e2e tests use this to take a snapshot of the counters per test case.

Save the served data to files named covmeta.<id> and covcounters.<id>.N.M, with <id> from the ID endpoint, and go tool covdata can digest the result. A plugin built without instrumentation serves an error for all endpoints.

Index

Constants

View Source
const (
	// IDPath serves the ID of the instrumented binary.
	IDPath = "/coverage/id"
	// MetaPath serves the coverage meta-data of the binary.
	MetaPath = "/coverage/meta"
	// CountersPath serves a snapshot of the coverage counters.
	CountersPath = "/coverage/counters"
	// ClearPath resets the coverage counters.
	ClearPath = "/coverage/clear"
)

Variables

This section is empty.

Functions

func Setup

func Setup(mux *xhttp.ServeMux)

Setup prepares the given HTTP request multiplexer for serving coverage data.

Types

This section is empty.

Directories

Path Synopsis
internal
coverage-server command
This is a helper for the tests of the coverage package, and handy for poking at the endpoints by hand.
This is a helper for the tests of the coverage package, and handy for poking at the endpoints by hand.

Jump to

Keyboard shortcuts

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