Usage
Description
Theprofile command converts Erst execution traces into the pprof profile format, which can be analyzed using Go’s profiling tools. This allows you to:
- Map gas consumption to specific functions
- Identify performance bottlenecks
- Analyze call graphs and hotspots
- Generate flamegraphs with standard tooling
The output is compatible with
go tool pprof and other pprof-compatible analyzers.Examples
Arguments
Path to the trace file to convert (JSON format)Can be provided as positional argument or via
--file flag.Flags
Trace file to load (alternative to positional argument)Alias:
-fOutput pprof file pathAlias:
-oOutput format
The generated profile file is a gzip-compressed protobuf that contains:- Sample data: Gas consumption per function call
- Call stacks: Complete execution paths
- Location info: Function names and contract addresses
- Metadata: Transaction hash, network, and timestamps
Analyzing profiles
Once you’ve generated a profile, use these commands to analyze it:Interactive web UI
- Interactive flamegraph
- Call graph visualization
- Source code view (if debug symbols available)
- Top functions by gas consumption
Command-line analysis
- Top functions
- Call graph
- Flamegraph
- Focus on function