progress

package
v0.0.0-...-413c37a Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 13 Imported by: 1 module, 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.

README

Package cloudeng.io/cmd/idu/cli/progress

CircleCI Go Report Card

import cloudeng.io/cmd/idu/cli/progress

Package progress provides the text based display of the progress of an analysis used by the analyze command, see NewAnalyze, and the memory statistics, see ReadMemory, also displayed by the tui.

Functions

Func NewAnalyze
func NewAnalyze(ctx context.Context, display bool) analyze.Progress

NewAnalyze implements analyze.NewProgress. If display is true the progress is displayed on a single line, rewritten once a second, on an interactive terminal and on a new line every 30 seconds otherwise. A summary is displayed, and logged, by Report.

Types

Type Memory
type Memory struct {
	// HeapBytes is the memory occupied by live, and not yet collected,
	// heap objects.
	HeapBytes uint64
	// TotalBytes is all of the memory mapped by the Go runtime.
	TotalBytes uint64
	// MaxRSSBytes is the peak resident set size of the process, it is
	// negative if unknown, eg. on Windows.
	MaxRSSBytes int64
	Goroutines  uint64
	GCCycles    uint64
}

Memory describes the memory used by the process.

Functions
func ReadMemory() Memory

ReadMemory returns the memory currently used by the process. Unlike runtime.ReadMemStats it does not stop the world and hence may be called frequently.

Documentation

Overview

Package progress provides the text based display of the progress of an analysis used by the analyze command, see NewAnalyze, and the memory statistics, see ReadMemory, also displayed by the tui.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAnalyze

func NewAnalyze(ctx context.Context, display bool) analyze.Progress

NewAnalyze implements analyze.NewProgress. If display is true the progress is displayed on a single line, rewritten once a second, on an interactive terminal and on a new line every 30 seconds otherwise. A summary is displayed, and logged, by Report.

Types

type Memory

type Memory struct {
	// HeapBytes is the memory occupied by live, and not yet collected,
	// heap objects.
	HeapBytes uint64
	// TotalBytes is all of the memory mapped by the Go runtime.
	TotalBytes uint64
	// MaxRSSBytes is the peak resident set size of the process, it is
	// negative if unknown, eg. on Windows.
	MaxRSSBytes int64
	Goroutines  uint64
	GCCycles    uint64
}

Memory describes the memory used by the process.

func ReadMemory

func ReadMemory() Memory

ReadMemory returns the memory currently used by the process. Unlike runtime.ReadMemStats it does not stop the world and hence may be called frequently.

Jump to

Keyboard shortcuts

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