performance

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2020 License: GPL-3.0, GPL-3.0 Imports: 11 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) error

ProfileCPU runs supplied function "through" the pprof CPU profiler

func ProfileMem

func ProfileMem(outFile string) 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