Quickly Find Rust Program Bottlenecks Online Using a Go Tool

  1. Install a complete perf program to sample stack traces.
  2. Use a set of script tools to process the file obtained by sampling.
  3. Visualize the output of the processing result in the previous step.

Why the protobuf format?

How to use pprof to visualize a Rust program’s profiling data

curl -H "Content-Type: application/protobuf"
http://127.0.0.1:22039/debug/pprof/profile\?seconds=50 > some.pb
go tool pprof -http=:8080 some.pb
Graph of stack traces
Graph of stack traces
Flame graph
Flame graph
go tool pprof -ignore threadpool -http=:8080 some.pb

Conclusion

--

--

--

PingCAP is the team behind TiDB, an open-source MySQL compatible NewSQL database. Official website: https://pingcap.com/ GitHub: https://github.com/pingcap

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Web scraping 101

How to enable search synonyms in AEM with Lucene?

The Doctrine of an Aspiring Software Architect

Terraform AWS: Beginner’s Guide

Intro Product Management | How it’s Done at MongoDB

What is Java Framework Quarkus & How It is Helping Web Application Development?

Building cloud-native “Cassandra database as a service” solution on ROBIN’s Cloud-Native Platform.

Deployment Slots are here for SubQuery Projects

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
PingCAP

PingCAP

PingCAP is the team behind TiDB, an open-source MySQL compatible NewSQL database. Official website: https://pingcap.com/ GitHub: https://github.com/pingcap

More from Medium

Go Entity Framework Ent Announces Preview Support for TiDB

⚙️ Hello Rust on CloudRun

Using OCR technology to support the KYC process with Tesseract & Golang

Implementing distributed rate limit in Go