Gas Cost Regression Tracker Across Commits
Free to download on every platform. Comes pre-installed on BotFone, BotPad and BotFlip — with extra free apps included.
About this app
WHAT IT DOES
Gas Cost Regression Tracker Across Commits is a developer-focused tool that tracks gas cost changes across commits and detects regressions or improvements in smart contract gas usage. It takes gas snapshots from the user as a JSON array with commit hashes, function names, and gas costs, then analyzes the data to identify trends. The tool groups snapshots by function, sorts them by commit order, and calculates the change between the first and last snapshot for each function. It identifies gas regressions (increases), improvements (decreases), and stable functions. Results are displayed with a summary showing the number of functions with regressions, improvements, and stable gas costs. Each function report includes the gas change, percentage change, the first and last gas values, and a recommendation for action. This enables developers to monitor gas performance across their development cycle and catch regressions early.
HOW TO USE
Enter gas snapshots as a JSON array with each entry containing commit, function, and gas fields. For example: [{"commit": "abc123", "function": "transfer", "gas": 50000}, {"commit": "def456", "function": "transfer", "gas": 55000}]. Click "Track regressions" to analyze the data. The tool will display a summary showing the number of functions, regressions, improvements, and stable functions. Each function report includes the function name, status (regression, improvement, or stable), gas change, percentage change, first and last gas values, and a recommendation. The report can be copied or downloaded as JSON.
TECHNICAL NOTE: GAS REGRESSION DETECTION METHODOLOGY
The tool groups gas snapshots by function name and sorts entries by commit order (preserving the order in which commits appear in the input data). For each function, it compares the first and last snapshot to calculate the absolute and percentage change. Positive changes are classified as regressions (gas increase), negative changes as improvements (gas decrease), and zero changes as stable. The tool also tracks the total number of snapshots per function and provides tailored recommendations: for regressions, it suggests optimization; for improvements, it acknowledges the progress; for stable functions, it notes the consistency. The tool handles functions with only one snapshot gracefully, marking them as stable with a note to add more data.
WHAT IT CANNOT SEE
The tool cannot automatically detect gas regressions without historical data; it relies on user-provided snapshots. It is limited to the accuracy of the provided gas snapshots; inaccurate data will produce inaccurate results. It cannot detect issues in external contracts or libraries that are imported into the contract. It is limited by the parser's ability to handle Solidity syntax variations. It cannot track gas cost for non-EVM chains.
PLEASE NOTE
This tool is designed exclusively for Solidity contracts on EVM-compatible chains. It does not support other smart contract languages. The gas snapshots should be collected using a gas profiler or benchmarking tool. The analysis is based on the provided data and may not reflect actual gas usage in all contexts. The tool is read-only and does not modify any state. The tool provides no warranty that the analysis is complete or accurate; users are responsible for validating all findings.