Documentation
¶
Overview ¶
Package workstats counts the work this process does, such as transcripts decoded, git processes run and refresh passes, so a profile of the daemon can say what its CPU time went to and how often each kind of work ran. Counters only ever grow; a reader takes two snapshots and compares them. Counting costs one atomic add, so it is always on.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Gauge ¶
Gauge registers a value read when a snapshot is taken, such as a cache's size. A later registration under the same name replaces it.
Types ¶
type Process ¶
type Process struct {
// UserSeconds and SystemSeconds are CPU time; both are zero where the
// platform does not report them.
UserSeconds float64 `json:"cpu_user_seconds"`
SystemSeconds float64 `json:"cpu_system_seconds"`
Goroutines int `json:"goroutines"`
HeapBytes uint64 `json:"heap_bytes"`
GCCycles uint32 `json:"gc_cycles"`
}
Process is the process's resource use since it started.
func (Process) CPUSeconds ¶
CPUSeconds is the process's user and system CPU time together.
Click to show internal directories.
Click to hide internal directories.