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 ¶
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 ¶
Median is the middle value of the durations (the upper one for an even count), or zero for none.
Flutter: no counterpart
func ParseLogLine ¶
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 ¶
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