File tree Expand file tree Collapse file tree 1 file changed +60
-0
lines changed
Expand file tree Collapse file tree 1 file changed +60
-0
lines changed Original file line number Diff line number Diff line change 1+ # ` polycli fold-trace `
2+
3+ > Auto-generated documentation.
4+
5+ ## Table of Contents
6+
7+ - [ Description] ( #description )
8+ - [ Usage] ( #usage )
9+ - [ Flags] ( #flags )
10+ - [ See Also] ( #see-also )
11+
12+ ## Description
13+
14+ Trace an execution trace and fold it for visualization
15+
16+ ``` bash
17+ polycli fold-trace [flags]
18+ ```
19+
20+ ## Usage
21+
22+ This command is meant to take a transaction op code trace and convert it into a folded output that can be easily visualized with Flamegraph tools.
23+
24+ ``` bash
25+ # First grab a trace from an RPC that supports the debug namespace
26+ cast rpc --rpc-url http://127.0.0.1:18545 debug_traceTransaction 0x12f63f489213f5bd5b88fbfb12960b8248f61e2062a369ba41d8a3c96bb74d57 > trace.json
27+
28+ # Read the trace and use the `fold-trace` command and write the output
29+ polycli fold-trace --metric actualgas < trace.json > folded-trace.out
30+
31+ # Covert the folded trace into a flame graph
32+ flamegraph.pl --title " Gas Profile for 0x7405fc5e254352350bebcadc1392bd06f158aa88e9fb01733389621a29db5f08" --width 1920 --countname folded-trace.out > flame.svg
33+ ```
34+ ## Flags
35+
36+ ``` bash
37+ --file string Provide a filename to read and hash
38+ -h, --help help for fold-trace
39+ --metric string Provide a metric name for analysis: gas, count, actualgas (default " gas" )
40+ --root-context string The name for the top most initial context (default " root context" )
41+ ```
42+
43+ The command also inherits flags from parent commands.
44+
45+ ``` bash
46+ --config string config file (default is $HOME /.polygon-cli.yaml)
47+ --pretty-logs Should logs be in pretty format or JSON (default true)
48+ -v, --verbosity int 0 - Silent
49+ 100 Panic
50+ 200 Fatal
51+ 300 Error
52+ 400 Warning
53+ 500 Info
54+ 600 Debug
55+ 700 Trace (default 500)
56+ ```
57+
58+ ## See also
59+
60+ - [ polycli] ( polycli.md ) - A Swiss Army knife of blockchain tools.
You can’t perform that action at this time.
0 commit comments