Paxeer-X-Network / benchmark
AGENTS.md575 starsChanged 3 months agoApache-2.0View on GitHub
TPS is logged every 5s as tps=<value> (with ANSI color codes). To capture output and extract TPS: Available scenarios in benchmark/scenarios/: evm.json (default), erc20.json, mixed.json, default.json. Inherits all benchmark.sh vars via delegation. Additionally: Note: GIGA_EXECUTOR and GIGA_OCC default to true in the compare script but false in benchmark.sh. The compare script is designed for performance comparison where Giga Executor is typically enabled. Use benchmark/benchmark-compare.sh to run multiple git commits side-by-side (minimum 2 scenarios required): Each scenario gets its own binary,…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- consensus/AGENTS.mdAGENTS.md
- rpc/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/spec-workflow.mdcCursor rule
- codify-workflowSkill
The file
We split this AGENTS.md into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 60
Use benchmark/benchmark-compare.sh to run multiple git commits side-by-side (minimum 2 scenarios required):
- Very specific: line 79
Always use pprof -diff_base to compare profiles between benchmark runs.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Benchmark
Single scenario
GIGA_EXECUTOR=true GIGA_OCC=true DEBUG=true benchmark/benchmark.shTPS is logged every 5s as tps=<value> (with ANSI color codes). To capture output and extract TPS:
LOG_FILE=/tmp/bench.log DEBUG=true benchmark/benchmark.sh
# Extract TPS values
sed 's/\x1b\[[0-9;]*m//g' /tmp/bench.log | sed -n 's/.*tps=\([0-9.]*\).*/\1/p'Available scenarios in benchmark/scenarios/: evm.json (default), erc20.json, mixed.json, default.json.
# Use a different scenario
BENCHMARK_CONFIG=benchmark/scenarios/erc20.json benchmark/benchmark.shEnvironment variables
benchmark.sh
| Var | Default | Purpose |
BENCHMARK_PHASE | all | init (build+init+configure), start (run node), all (both) |
PAX_HOME | $HOME/.pax | Final chain data dir. If != ~/.pax, init in ~/.pax then mv |
PORT_OFFSET | 0 | Added to all ports (RPC, P2P, pprof, gRPC, etc.) |
PAXD_BIN | "" | Pre-built binary path. If set, skip build + copy to ~/go/bin/paxd |
LOG_FILE | "" | Redirect paxd output to file |
BENCHMARK_CONFIG | $SCRIPT_DIR/scenarios/evm.json | Scenario config file (absolute path resolved from script location) |
BENCHMARK_TXS_PER_BATCH | 1000 | Transactions per batch |
GIGA_EXECUTOR | false | Enable Giga EVM-optimized executor |
GIGA_OCC | false | Enable OCC for Giga Executor |
DB_BACKEND | goleveldb | Database backend (goleveldb, memdb, cleveldb, rocksdb) |
MOCK_BALANCES | true | Use mock balances during benchmark |
DISABLE_INDEXER | true | Disable indexer for benchmark (reduces I/O overhead) |
DEBUG | false | Print all log output without filtering |
benchmark-compare.sh
Inherits all benchmark.sh vars via delegation. Additionally:
| Var | Default | Purpose |
DURATION | 600 | How long (seconds) to run each node before stopping |
GIGA_EXECUTOR | true | Overrides benchmark.sh default (false) |
GIGA_OCC | true | Overrides benchmark.sh default (false) |
DB_BACKEND | goleveldb | Forwarded to build and init phases |
Note: GIGA_EXECUTOR and GIGA_OCC default to true in the compare script but false in benchmark.sh. The compare script is designed for performance comparison where Giga Executor is typically enabled.
Parallel multi-scenario comparison
Use benchmark/benchmark-compare.sh to run multiple git commits side-by-side (minimum 2 scenarios required):
benchmark/benchmark-compare.sh \
pre-opt=fd2e28d74 \
lazy-cms=82acf458d \
lazy-cms-fix=37a17fd02Each scenario gets its own binary, home dir, and port set (offset by 100). Results are printed at the end with median/avg/min/max TPS. Raw data in /tmp/pax-bench/<label>/tps.txt.
Comparing results across sessions
Important: Cross-session benchmark numbers (TPS, total allocs) are not directly comparable. Only comparisons within the same benchmark-compare.sh run are valid, since all scenarios share identical conditions.
Comparing pprof profiles
benchmark-compare.sh automatically captures pprof profiles (CPU and heap) midway through the run. Single-scenario runs only enable the pprof HTTP endpoint — capture profiles manually with curl or go tool pprof.
Always use pprof -diff_base to compare profiles between benchmark runs. Never compare profiles side-by-side manually.
# CPU diff (positive = regression, negative = improvement)
go tool pprof -top -diff_base /tmp/pax-bench/<baseline>/pprof/cpu.pb.gz /tmp/pax-bench/<candidate>/pprof/cpu.pb.gz
# Allocation diff
go tool pprof -alloc_space -top -diff_base /tmp/pax-bench/<baseline>/pprof/heap.pb.gz /tmp/pax-bench/<candidate>/pprof/heap.pb.gzDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

