Awfy
CLI tool to help run suites of benchmarks , and compare results over time, between control implementations, across branches and with or without YJIT.
Install / Use
/learn @stevegeek/AwfyREADME
Awfy (Are We Fast Yet)
A CLI tool for running and comparing Ruby benchmarks across different implementations, runtimes (MRI/YJIT), and git branches or commits.
Features
-
Multiple Benchmark Types
- IPS benchmarks (using benchmark-ips)
- Memory profiling (using memory_profiler)
- CPU profiling (using stackprof)
- Flamegraph generation (using vernier)
- YJIT statistics
-
Rich Comparison Features
- Compare multiple implementations
- Compare across git branches or commit ranges
- Compare with/without YJIT
- Generate summary reports
-
Persist results
- SQLite storage (default)
- JSON file storage
Example output:

Installation
Add to your application:
group :development, :test do
gem "awfy", require: false
end
Or install directly:
gem install awfy
Quick Start
- Create a benchmark suite directory:
mkdir -p benchmarks/tests
- Create a setup file (optional):
# benchmarks/setup.rb
require "awfy"
require "json" # Add any dependencies your benchmarks need
# Setup test data or helper methods
SAMPLE_DATA = { "name" => "test", "values" => [1, 2, 3] }.freeze
def create_test_object
SAMPLE_DATA.dup
end
- Write your first benchmark:
# benchmarks/tests/json_parsing.rb
Awfy.group "JSON" do
report "#parse" do
# Setup test data
json_string = SAMPLE_DATA.to_json
# Benchmark standard library as control
control "JSON.parse" do
JSON.parse(json_string)
end
# Benchmark your implementation
test "MyJSONParser" do
MyJSONParser.parse(json_string)
end
end
end
- Run the benchmark:
For example:
# Run IPS benchmark
bundle exec awfy ips
# or more explicitly:
# bundle exec awfy ips start JSON "#parse"
# Compare with another branch
bundle exec awfy ips --compare-with=main
# Run across a commit range
bundle exec awfy ips start --commit-range="HEAD~5..HEAD" --runner=commit_range
# Run across commits with a specific baseline
bundle exec awfy ips start --commit-range="HEAD~5..HEAD" --runner=commit_range --control-commit=HEAD~5
# Run without YJIT
bundle exec awfy ips --runtime=mri
# Run benchmark in parallel
bundle exec awfy ips --runner=forked
Documentation
For detailed documentation, see:
- Benchmark Suite Guide - How to write benchmarks
- Configuration Guide - Configuration options
- Command Reference - Available commands
- Advanced Usage - Advanced features
- Best Practices - Tips and guidelines
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/stevegeek/awfy.
License
Available as open source under the terms of the MIT License.
Related Skills
node-connect
349.7kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.7kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.7kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
