perfstats

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: BSD-3-Clause Imports: 4 Imported by: 0 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 perfstats reads the engine's log lines that the performance tools measure with: the "first frame presented" line, the per-second "frames" statistics of GLUTTER_FRAME_STATS=1 and the key=value pairs of slog's text format. internal/webtest (the web) and cmd/glutter-android (Android) both use it. It has no dependency on the platform.

Flutter: no counterpart

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsFramesLine

func IsFramesLine(line string) bool

IsFramesLine reports whether a log line looks like a "frames" statistics line: the message "frames" of the default logger ("INFO frames fps=...") or of slog's text handler ("msg=frames"). ParseFramesLine says whether it also has every value.

Flutter: no counterpart

func Median

func Median(d []time.Duration) time.Duration

Median is the middle value of the durations (the upper one for an even count), or zero for none.

Flutter: no counterpart

func ParseLogLine

func ParseLogLine(line string) map[string]string

ParseLogLine splits a log line of the engine (slog's text format, key=value with values in quotes when they hold blanks) into its pairs.

Flutter: no counterpart

Types

type Frames

type Frames struct {
	Renderer string
	// FPS is the number of frames drawn in the second.
	FPS int
	// Build and Raster are the average and the worst time on the UI goroutine of the build
	// (build, layout, paint and the scene) and of the renderer's calls; Over16 is the number of
	// frames whose sum was over a 60th of a second.
	BuildAvg, BuildMax, RasterAvg, RasterMax time.Duration
	Over16                                   int
	// GoHeapMB and GoSysMB are the memory of the Go runtime.
	GoHeapMB, GoSysMB int
}

Frames is one "frames" line of the engine's statistics (GLUTTER_FRAME_STATS=1): the frames of one second.

Flutter: no counterpart

func ParseFramesLine

func ParseFramesLine(line string) (Frames, bool)

ParseFramesLine reads a "frames" line of the engine's statistics; ok is false for a line that is not one or has a value that is not a number or a duration.

Flutter: no counterpart

Jump to

Keyboard shortcuts

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