phaseprobe

package
v0.0.0-...-b4425be Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package phaseprobe provides opt-in process-timeline instrumentation for GPU route diagnostics. It is inert unless the caller explicitly enables it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Count

func Count(label string, bytes int)

Count records one labelled transfer of size bytes. It is a no-op unless collection is enabled, so an ordinary decode pays one atomic load per crossing and never takes the lock.

func Disable

func Disable()

Disable stops collection and releases the current census.

func Dump

func Dump(w io.Writer)

Dump writes a stable timestamp-ordered snapshot. Event publication is lock-free so concurrent route completion cannot perturb the timed stages.

func Enable

func Enable()

Enable starts a new timing collection for this process.

func Enabled

func Enabled() bool

Enabled reports whether coarse phase timing was requested.

func Mark

func Mark(label string)

Mark writes one absolute and process-relative timestamp. Detail must remain tab-free so analyzers can parse the stream without escaping.

func Markf

func Markf(label, format string, args ...any)

Markf formats event detail only while collection is enabled.

func SnapshotCounts

func SnapshotCounts() map[string]Counter

SnapshotCounts copies the current transfer census. Callers can inspect the result without holding the probe lock while device work continues.

Types

type Counter

type Counter struct {
	Ops   int64
	Bytes int64
}

Counter is one stable transfer-census row.

Jump to

Keyboard shortcuts

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