Code Monkey home page Code Monkey logo

pprof-upload's Introduction

pprof-upload

Binary pprof-upload uploads a performance profile in pprof format to Stackdriver Profiler UI for visualization.

Installation

Download and install Go, then run command

go get github.com/aalexand/pprof-upload

Add your $GOPATH/bin to $PATH for convenience.

Usage

You'll need a Google Cloud Platform project to upload and visualize the profiling data. You can use an existing project you have, or create a new one. Note the project ID, you'll need it in the upload command.

Make sure the project has the profiler API enabled.

Once the prerequisites are completed, run command like:

pprof-upload -project_id=your-project-id ~/path/to/profile.pb.gz

The command will upload the profile and print out a URL that can be visited to view the data. You should see something like

Stackdriver Profiler UI

You can pass more than one profile path to the tool:

pprof-upload -project_id=your-project-id ~/path/*.pg.gz

In that case the profiles will be merged before being uploaded. The profiles must be merge-compatible - have the same profile type (e.g. heap vs. cpu) and set of metrics. You can also disable the merge like:

pprof-upload -merge=false -project_id=your-project-id ~/path/*.pg.gz

The profiles must still be merge-compatible but will be uploaded individually such that the merge will only be done at the viewing time. This is rarely needed and the main benefit is the ability to use the weight filter in the profiler UI.

Note that Stackdriver Profiler stores data for 30 days, so the profile will be gone after about a month.

See also Stackdriver Profiler quickstart on how to enable continuous production profiling for a service running on Google Cloud Platform.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.