performance

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2020 License: GPL-3.0, GPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package performance contains helper functions relating to performance. This includes CPU and memory profile generation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalcFPS

func CalcFPS(tv *television.Television, numFrames int, duration float64) (fps float64, accuracy float64)

CalcFPS takes the the number of frames and duration (in seconds) and returns the frames-per-second and the accuracy of that value as a percentage.

func Check

func Check(output io.Writer, profile bool, tv *television.Television, runTime string, cartload cartridgeloader.Loader) error

Check is a very rough and ready calculation of the emulator's performance.

func ProfileCPU

func ProfileCPU(outFile string, run func() error) (rerr error)

ProfileCPU runs supplied function "through" the pprof CPU profiler.

func ProfileMem

func ProfileMem(outFile string) (rerr error)

ProfileMem takes a snapshot of memory and writes to outFile.

Types

This section is empty.

Jump to

Keyboard shortcuts

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