Use ezprof to profile

This commit is contained in:
2023-03-08 20:24:43 -05:00
parent f3c1c95a57
commit 305acea285
8 changed files with 175 additions and 18 deletions

View File

@@ -3,8 +3,7 @@ package main
import "git.tebibyte.media/sashakoshka/tomo"
import "git.tebibyte.media/sashakoshka/tomo/elements/testing"
import _ "git.tebibyte.media/sashakoshka/tomo/backends/x"
import _ "net/http/pprof"
import "net/http"
import _ "git.tebibyte.media/sashakoshka/ezprof/hook"
func main () {
tomo.Run(run)
@@ -15,8 +14,4 @@ func run () {
window.SetTitle("Draw Test")
window.Adopt(testing.NewArtist())
window.OnClose(tomo.Stop)
window.Show()
go func () {
http.ListenAndServe("localhost:9090", nil)
} ()
}

View File

@@ -3,8 +3,6 @@ package main
import "git.tebibyte.media/sashakoshka/tomo"
import "git.tebibyte.media/sashakoshka/tomo/elements/basic"
import _ "git.tebibyte.media/sashakoshka/tomo/backends/x"
import _ "net/http/pprof"
import "net/http"
func main () {
tomo.Run(run)
@@ -28,9 +26,4 @@ func run () {
window.Adopt(button)
window.OnClose(tomo.Stop)
window.Show()
// just some stuff for profiling, this is not needed for tomo
go func () {
http.ListenAndServe("localhost:9090", nil)
} ()
}

View File

@@ -11,8 +11,6 @@ import "git.tebibyte.media/sashakoshka/tomo/layouts/basic"
import "git.tebibyte.media/sashakoshka/tomo/elements/basic"
import "git.tebibyte.media/sashakoshka/tomo/elements/fun/music"
import _ "git.tebibyte.media/sashakoshka/tomo/backends/x"
import _ "net/http/pprof"
import "net/http"
const sampleRate = 44100
const bufferSize = 256
@@ -149,9 +147,6 @@ func run () {
piano.Focus()
window.OnClose(tomo.Stop)
window.Show()
go func () {
http.ListenAndServe("localhost:9090", nil)
} ()
}
type Patch struct {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB