Skip to content

Commit

Permalink
profiling
Browse files Browse the repository at this point in the history
  • Loading branch information
bdon committed Jan 6, 2024
1 parent fdab3ef commit 9029317
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pmtiles/makesync.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"log"
"os"
"runtime"
"runtime/pprof"
"strconv"
"strings"
"time"
Expand All @@ -38,6 +39,13 @@ type Syncline struct {
}

func Makesync(logger *log.Logger, cli_version string, file string, block_size_kb int, checksum string) error {
f, err := os.Create("makesync.profile")
if err != nil {
log.Fatal("could not create CPU profile: ", err)
}
defer f.Close()
pprof.StartCPUProfile(f)
defer pprof.StopCPUProfile()
ctx := context.Background()
start := time.Now()

Expand Down

0 comments on commit 9029317

Please sign in to comment.