Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion benchmarks/activerecord/Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source "https://rubygems.org"
gem "activerecord", "~> 8.0"
gem "sqlite3", platform: :ruby
gem "sqlite3", platforms: [:ruby, :windows]
gem "activerecord-jdbc-adapter", github: "k0kubun/activerecord-jdbc-adapter", ref: "rails-8.1-sqlite3", platform: :jruby
gem "activerecord-jdbcsqlite3-adapter", github: "k0kubun/activerecord-jdbc-adapter", ref: "rails-8.1-sqlite3", platform: :jruby
gem "mutex_m"
Expand Down
14 changes: 13 additions & 1 deletion benchmarks/gvl_release_acquire/benchmark.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
require_relative "../../harness/loader"

# Windows has no /dev/zero, so read the same zeros from a regular file kept in data/.
ZERO_PATH = if File.exist?("/dev/zero")
"/dev/zero"
else
File.join(__dir__, "data", "zero").tap do |path|
unless File.size?(path) == 1_000_000
Dir.mkdir(File.dirname(path)) unless Dir.exist?(File.dirname(path))
File.binwrite(path, "\0" * 1_000_000)
end
end
end.freeze

run_benchmark(5) do |num_rs, ractor_args|
output = File.open(File::NULL, "wb")
input = File.open("/dev/zero", "rb")
input = File.open(ZERO_PATH, "rb")
100_000.times do
output.write(input.read(10))
end
Expand Down
3 changes: 3 additions & 0 deletions benchmarks/lobsters/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ gem "cgi" # Workaround cgi extraction in Ruby 3.5.0-dev
gem rails_gem, "~> 8.0"
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem "tzinfo-data", platforms: [:windows, :jruby]

gem "sqlite3"
#gem "mysql2"

Expand Down
1 change: 1 addition & 0 deletions benchmarks/lobsters/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ DEPENDENCIES
sqlite3
stackprof
svg-graph
tzinfo-data
vcr
webmock

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/railsbench/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ gem 'sprockets-rails', '3.2.2'

gem 'stackprof', platforms: :mri
# Use sqlite3 as the database for Active Record
gem 'sqlite3', platform: :ruby
gem 'sqlite3', platforms: [:ruby, :windows]
gem 'activerecord-jdbc-adapter', github: 'k0kubun/activerecord-jdbc-adapter', ref: 'rails-8.1-sqlite3', platform: :jruby
gem 'activerecord-jdbcsqlite3-adapter', github: 'k0kubun/activerecord-jdbc-adapter', ref: 'rails-8.1-sqlite3', platform: :jruby
# Use webrick for the web server since it's easy to install.
Expand Down
10 changes: 10 additions & 0 deletions benchmarks/rubyboy/benchmark.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@
# The rom is included in the gem in a sibling directory to the rubyboy code.
ROM_PATH = File.expand_path("../../roms/tobu.gb", $".detect { |x| x.end_with?("/rubyboy/emulator_headless.rb") }).freeze

# Rubyboy opens the ROM with mode "r", which converts CRLF to LF on Windows.
if Gem.win_platform?
File.singleton_class.prepend(Module.new do
def open(path, *args, **kwargs, &block)
args[0] = "rb" if path == ROM_PATH && args[0] == "r"
super(path, *args, **kwargs, &block)
end
end)
end

# A count of 500 produces results similar to our optcarrot benchmark.
# It's possible there is a number that produces a consistent benchmark without
# needing to re-initialize but not sure how to determine that.
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/sequel/Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source "https://rubygems.org"
gem "sequel", "~> 5.63"
gem "sqlite3", "~> 1.4", platform: :ruby
gem "sqlite3", "~> 1.4", platforms: [:ruby, :windows]
gem "jdbc-sqlite3", "~> 3.32.3", platform: :jruby

gem "bigdecimal"
3 changes: 3 additions & 0 deletions benchmarks/shipit/benchmark.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
require 'securerandom'
ENV['SECRET_KEY_BASE'] = SecureRandom.hex(128)

# shipit-engine requires pty, which Windows lacks, only to run deploy commands that the benchmark never starts.
$LOADED_FEATURES << File.join(RbConfig::CONFIG["archdir"], "pty.so") if Gem.win_platform?

require_relative 'config/environment'
require_relative "route_generator"

Expand Down
Loading