package
0.1.21
Repository: https://github.com/jamespfennell/gtfs.git
Documentation: pkg.go.dev

# README

Performance

Profiler

This directory contains a performance profiler for the package, in profiler.go. It currently only works with GTFS static files.

The following is reasonable chain of commands to create a profile and then view the results in the browser. Run it from the repo root. It assumes that the pprof CLI tool is installed (go install github.com/google/pprof@latest).

go test ./... && \
   go build performance/profiler.go && \
   ./profiler tmp/*.zip && \
   pprof --http=0.0.0.0:1234 ./pprof ./gtfs_package_profile.pb.gz

Explanation:

  1. Makes sure the tests are passing (no point in profiling otherwise!).

  2. Builds the tool.

  3. Runs the tool over all zip files in the ./tmp directory.

  4. Launches a web viewer for the results.