Giter VIP home page Giter VIP logo

benchmark.fyi's Introduction

benchmark.fyi

This project is a place to share benchmark-ips data for all your benchmarks

Getting Started

You can locally setup this Rails application by calling this command:

./bin/setup

Submitting Data

In order to submit data to your local instance, you can do it like this:

SHARE_URL=http://localhost:3000 ruby my-awesome-benchmark-ips-example.rb

benchmark.fyi's People

Contributors

arielj avatar bronzdoc avatar etagwerker avatar evanphx avatar lubc avatar mateusdeap avatar olimart avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

olimart

benchmark.fyi's Issues

[BUG] BadRequest raised on a three-fold comparison share

Before we start...:

  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed
  • I'm reporting the issue to the correct repository (for multi-repository projects)

Branch/Commit:

Main branch.

Expected behavior:

Comparison sharing for this snippet should just work:

require 'benchmark/ips'

NUM = 1.12678.freeze

def fast
  NUM.round(2).to_s
end

def avg
  format('%.2f', NUM)
end

def slow
  '%.2f' % NUM
end

Benchmark.ips do |x|
  x.report('Float#round') { fast }
  x.report('Kernel#format') { avg }
  x.report('String#%') { slow }
  x.compare!
end

Actual behavior:

It raises a ActionController::BadRequest (Invalid request parameters: invalid %-encoding) error.

Steps to reproduce:

  1. git clone [email protected]:fastruby/fast-ruby.git
  2. cd fast-ruby
  3. bundle
  4. SHARE=1 bundle exec ruby -v code/general/format-vs-round-and-to-s.rb

Logs

Client log:

➜  fast-ruby git:(master) ✗ SHARE=1 bundle exec ruby -v code/general/format-vs-round-and-to-s.rb
ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-darwin20]
Warming up --------------------------------------
         Float#round   154.985k i/100ms
       Kernel#format   165.010k i/100ms
            String#%   152.993k i/100ms
Calculating -------------------------------------
         Float#round      1.547M (± 0.4%) i/s -      7.749M in   5.010822s
       Kernel#format      1.659M (± 1.3%) i/s -      8.416M in   5.072483s
            String#%      1.540M (± 0.4%) i/s -      7.803M in   5.065333s

Comparison:
       Kernel#format:  1659346.4 i/s
         Float#round:  1546528.5 i/s - 1.07x  (± 0.00) slower
            String#%:  1540419.9 i/s - 1.08x  (± 0.00) slower

/Users/etagwerker/.rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0/net/http/generic_request.rb:186: warning: net/http: Content-Type did not set; using application/x-www-form-urlencoded
Error sharing report

Server log:

2021-10-17T16:11:10.437155+00:00 heroku[router]: at=info method=POST path="/reports" host=ips.fastruby.io request_id=bfec470d-de2c-4ab2-a59d-26d41de2cbe9 fwd="71.224.18.32" dyno=web.1 connect=0ms service=4ms status=400 bytes=179 protocol=https
2021-10-17T16:11:10.435586+00:00 app[web.1]: Invalid or incomplete POST params
2021-10-17T16:11:10.435951+00:00 app[web.1]: I, [2021-10-17T16:11:10.435890 #4]  INFO -- : [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] Started POST "/reports" for 71.224.18.32 at 2021-10-17 16:11:10 +0000
2021-10-17T16:11:10.437547+00:00 app[web.1]: F, [2021-10-17T16:11:10.437480 #4] FATAL -- : [bfec470d-de2c-4ab2-a59d-26d41de2cbe9]
2021-10-17T16:11:10.437548+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] ActionController::BadRequest (Invalid request parameters: invalid %-encoding ({"entries":[{"name":"Float#round","central_tendency":1546528.508682263,"ips":1546528.508682263,"error":6255,"stddev":6255,"microseconds":5010822.0,"iterations":7749250,"cycles":154985},{"name":"Kernel#format","central_tendency":1659346.446822267,"ips":1659346.446822267,"error":21921,"stddev":21921,"microseconds":5072483.0,"iterations":8415510,"cycles":165010},{"name":"String#%","central_tendency":1540419.907131491,"ips":1540419.907131491,"error":5411,"stddev":5411,"microseconds":5065333.0,"iterations":7802643,"cycles":152993}],"options":{"compare":true}})):
2021-10-17T16:11:10.437548+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9]
2021-10-17T16:11:10.437549+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] vendor/ruby-2.7.2/lib/ruby/2.7.0/uri/common.rb:387:in `decode_www_form_component'
2021-10-17T16:11:10.437549+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] rack (2.2.3) lib/rack/utils.rb:54:in `unescape'
2021-10-17T16:11:10.437550+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] rack (2.2.3) lib/rack/query_parser.rb:155:in `unescape'
2021-10-17T16:11:10.437550+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] rack (2.2.3) lib/rack/query_parser.rb:69:in `block (2 levels) in parse_nested_query'
2021-10-17T16:11:10.437550+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] rack (2.2.3) lib/rack/query_parser.rb:69:in `map!'
2021-10-17T16:11:10.437551+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] rack (2.2.3) lib/rack/query_parser.rb:69:in `block in parse_nested_query'
2021-10-17T16:11:10.437551+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] rack (2.2.3) lib/rack/query_parser.rb:68:in `each'
2021-10-17T16:11:10.437551+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] rack (2.2.3) lib/rack/query_parser.rb:68:in `parse_nested_query'
2021-10-17T16:11:10.437552+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] rack (2.2.3) lib/rack/request.rb:590:in `parse_query'
2021-10-17T16:11:10.437552+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] rack (2.2.3) lib/rack/request.rb:454:in `POST'
2021-10-17T16:11:10.437552+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] actionpack (6.1.4) lib/action_dispatch/http/request.rb:400:in `block (2 levels) in POST'
2021-10-17T16:11:10.437553+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] actionpack (6.1.4) lib/action_dispatch/http/parameters.rb:90:in `block in parse_formatted_parameters'
2021-10-17T16:11:10.437553+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] actionpack (6.1.4) lib/action_dispatch/http/parameters.rb:90:in `fetch'
2021-10-17T16:11:10.437553+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] actionpack (6.1.4) lib/action_dispatch/http/parameters.rb:90:in `parse_formatted_parameters'
2021-10-17T16:11:10.437553+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] actionpack (6.1.4) lib/action_dispatch/http/request.rb:399:in `block in POST'
2021-10-17T16:11:10.437554+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] rack (2.2.3) lib/rack/request.rb:69:in `fetch'
2021-10-17T16:11:10.437554+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] rack (2.2.3) lib/rack/request.rb:69:in `fetch_header'
2021-10-17T16:11:10.437554+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] actionpack (6.1.4) lib/action_dispatch/http/request.rb:398:in `POST'
2021-10-17T16:11:10.437554+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] actionpack (6.1.4) lib/action_dispatch/http/parameters.rb:55:in `parameters'
2021-10-17T16:11:10.437555+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] actionpack (6.1.4) lib/action_dispatch/http/filter_parameters.rb:43:in `filtered_parameters'
2021-10-17T16:11:10.437555+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] actionpack (6.1.4) lib/action_controller/metal/instrumentation.rb:24:in `process_action'
2021-10-17T16:11:10.437555+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] actionpack (6.1.4) lib/action_controller/metal/params_wrapper.rb:249:in `process_action'
2021-10-17T16:11:10.437555+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] activerecord (6.1.4) lib/active_record/railties/controller_runtime.rb:27:in `process_action'
2021-10-17T16:11:10.437555+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] actionpack (6.1.4) lib/abstract_controller/base.rb:165:in `process'
2021-10-17T16:11:10.437556+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] actionview (6.1.4) lib/action_view/rendering.rb:39:in `process'
2021-10-17T16:11:10.437556+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] actionpack (6.1.4) lib/action_controller/metal.rb:190:in `dispatch'
2021-10-17T16:11:10.437556+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] actionpack (6.1.4) lib/action_controller/metal.rb:254:in `dispatch'
2021-10-17T16:11:10.437556+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] actionpack (6.1.4) lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
2021-10-17T16:11:10.437556+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] actionpack (6.1.4) lib/action_dispatch/routing/route_set.rb:33:in `serve'
2021-10-17T16:11:10.437558+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] actionpack (6.1.4) lib/action_dispatch/journey/router.rb:50:in `block in serve'
2021-10-17T16:11:10.437559+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] actionpack (6.1.4) lib/action_dispatch/journey/router.rb:32:in `each'
2021-10-17T16:11:10.437559+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] actionpack (6.1.4) lib/action_dispatch/journey/router.rb:32:in `serve'
2021-10-17T16:11:10.437559+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] actionpack (6.1.4) lib/action_dispatch/routing/route_set.rb:842:in `call'
2021-10-17T16:11:10.437559+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] rack (2.2.3) lib/rack/tempfile_reaper.rb:15:in `call'
2021-10-17T16:11:10.437559+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] rack (2.2.3) lib/rack/etag.rb:27:in `call'
2021-10-17T16:11:10.437559+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] rack (2.2.3) lib/rack/conditional_get.rb:40:in `call'
2021-10-17T16:11:10.437559+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] rack (2.2.3) lib/rack/head.rb:12:in `call'
2021-10-17T16:11:10.437560+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] actionpack (6.1.4) lib/action_dispatch/http/permissions_policy.rb:22:in `call'
2021-10-17T16:11:10.437560+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] actionpack (6.1.4) lib/action_dispatch/http/content_security_policy.rb:18:in `call'
2021-10-17T16:11:10.437560+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] rack (2.2.3) lib/rack/session/abstract/id.rb:266:in `context'
2021-10-17T16:11:10.437560+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] rack (2.2.3) lib/rack/session/abstract/id.rb:260:in `call'
2021-10-17T16:11:10.437560+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] actionpack (6.1.4) lib/action_dispatch/middleware/cookies.rb:689:in `call'
2021-10-17T16:11:10.437560+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] actionpack (6.1.4) lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
2021-10-17T16:11:10.437561+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] activesupport (6.1.4) lib/active_support/callbacks.rb:98:in `run_callbacks'
2021-10-17T16:11:10.437561+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] actionpack (6.1.4) lib/action_dispatch/middleware/callbacks.rb:26:in `call'
2021-10-17T16:11:10.437561+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] actionpack (6.1.4) lib/action_dispatch/middleware/actionable_exceptions.rb:18:in `call'
2021-10-17T16:11:10.437561+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] actionpack (6.1.4) lib/action_dispatch/middleware/debug_exceptions.rb:29:in `call'
2021-10-17T16:11:10.437561+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] actionpack (6.1.4) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
2021-10-17T16:11:10.437561+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] railties (6.1.4) lib/rails/rack/logger.rb:37:in `call_app'
2021-10-17T16:11:10.437561+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] railties (6.1.4) lib/rails/rack/logger.rb:26:in `block in call'
2021-10-17T16:11:10.437562+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] activesupport (6.1.4) lib/active_support/tagged_logging.rb:99:in `block in tagged'
2021-10-17T16:11:10.437562+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] activesupport (6.1.4) lib/active_support/tagged_logging.rb:37:in `tagged'
2021-10-17T16:11:10.437562+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] activesupport (6.1.4) lib/active_support/tagged_logging.rb:99:in `tagged'
2021-10-17T16:11:10.437562+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] railties (6.1.4) lib/rails/rack/logger.rb:26:in `call'
2021-10-17T16:11:10.437562+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] actionpack (6.1.4) lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
2021-10-17T16:11:10.437562+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] actionpack (6.1.4) lib/action_dispatch/middleware/request_id.rb:26:in `call'
2021-10-17T16:11:10.437563+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] rack (2.2.3) lib/rack/method_override.rb:24:in `call'
2021-10-17T16:11:10.437563+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] rack (2.2.3) lib/rack/runtime.rb:22:in `call'
2021-10-17T16:11:10.437563+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] activesupport (6.1.4) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
2021-10-17T16:11:10.437563+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] actionpack (6.1.4) lib/action_dispatch/middleware/executor.rb:14:in `call'
2021-10-17T16:11:10.437563+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] actionpack (6.1.4) lib/action_dispatch/middleware/static.rb:24:in `call'
2021-10-17T16:11:10.437563+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] rack (2.2.3) lib/rack/sendfile.rb:110:in `call'
2021-10-17T16:11:10.437564+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] actionpack (6.1.4) lib/action_dispatch/middleware/host_authorization.rb:92:in `call'
2021-10-17T16:11:10.437564+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] railties (6.1.4) lib/rails/engine.rb:539:in `call'
2021-10-17T16:11:10.437564+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] puma (4.3.8) lib/puma/configuration.rb:228:in `call'
2021-10-17T16:11:10.437564+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] puma (4.3.8) lib/puma/server.rb:718:in `handle_request'
2021-10-17T16:11:10.437564+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] puma (4.3.8) lib/puma/server.rb:472:in `process_client'
2021-10-17T16:11:10.437567+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] puma (4.3.8) lib/puma/server.rb:328:in `block in run'
2021-10-17T16:11:10.437567+00:00 app[web.1]: [bfec470d-de2c-4ab2-a59d-26d41de2cbe9] puma (4.3.8) lib/puma/thread_pool.rb:134:in `block in spawn_thread'

I will abide by the code of conduct

Track more attributes per report

As a user of benchmark-ips and benchmark.fyi I'd like to keep track of more details per benchmark:

  • Ruby version (default)
  • Operating system (default)
  • OS Architecture (default)
  • Project name (optional)
  • Benchmark name (optional)

That way, I can keep track of my benchmarks over time and compare results.

[BUG] bin/setup script fails with yarn error and failed db:prepare

Branch/Commit:

main branch

Expected behavior:

bin/setup should setup the application

Actual behavior:

It shows an error and fails to setup the application:

$ ./bin/setup 
== Installing dependencies ==
The Gemfile's dependencies are satisfied

== Preparing database ==
error Couldn't find an integrity file                                          
error Found 1 errors.                                                          


========================================
  Your Yarn packages are out of date!
  Please run `yarn install --check-files` to update.
========================================


To disable this check, please change `check_yarn_integrity`
to `false` in your webpacker config file (config/webpacker.yml).


yarn check v1.22.19
info Visit https://yarnpkg.com/en/docs/cli/check for documentation about this command.



== Command ["bin/rails db:prepare"] failed ==

Steps to reproduce:

  1. Step 1: Clone the repo
  2. Step 2: run bundle install
  3. Step 3: run ./bin/setup

I will abide by the [code of conduct] (https://github.com/fastruby/benchmark.fyi/blob/main/CODE_OF_CONDUCT.md)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.