timings

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package timings is the startup timing instrumentation Pi enables with PI_TIMING=1.

Ports packages/coding-agent/src/core/timings.ts

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintTimings

func PrintTimings()

PrintTimings writes every namespace's report to stderr, in the order the namespaces were first used.

func ResetTimings

func ResetTimings(label ...Label)

ResetTimings starts the namespace's timeline at the current time, discarding what it recorded (default namespace "main").

func Time

func Time(name string, label ...Label)

Time records the milliseconds since the previous mark in the namespace (default "main") under name.

Types

type Label

type Label string

Label names a timing namespace (timings.ts TimingLabel).

const (
	Main       Label = "main"
	Extensions Label = "extensions"
)

The namespaces Pi records.

Jump to

Keyboard shortcuts

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