Project

awfy

0.01
There's a lot of open issues
awfy is a benchmarking tool that allows you to define groups of benchmarks and compare against runtimes, branches etc.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

>= 2.14, < 3.0
>= 2.3, < 3.0
>= 1.1, < 2.0
>= 0.2, < 1.0
>= 0.2, < 1.0
>= 3.0, < 4.0
>= 1.3, < 2.0
 Project Readme

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

  • 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:

Example benchmark table output

Installation

Add to your application:

group :development, :test do
  gem "awfy", require: false
end

Or install directly:

gem install awfy

Quick Start

  1. Create a benchmark suite directory:
mkdir -p benchmarks/tests
  1. 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
  1. 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
  1. 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 without YJIT
bundle exec awfy ips --runtime=mri

# Run benchmark in parallel
bundle exec awfy ips --runner=forked

Documentation

For detailed documentation, see:

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.