{"id":16871872,"url":"https://github.com/luislavena/bench-micro","last_synced_at":"2025-04-08T03:12:12.349Z","repository":{"id":12177795,"uuid":"14777584","full_name":"luislavena/bench-micro","owner":"luislavena","description":"Benchmark some Ruby web microframeworks, just for fun","archived":false,"fork":false,"pushed_at":"2022-12-14T08:19:00.000Z","size":143,"stargazers_count":245,"open_issues_count":9,"forks_count":30,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-31T18:19:36.621Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/luislavena.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-28T13:26:43.000Z","updated_at":"2025-02-20T08:14:37.000Z","dependencies_parsed_at":"2023-01-11T20:17:38.751Z","dependency_job_id":null,"html_url":"https://github.com/luislavena/bench-micro","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luislavena%2Fbench-micro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luislavena%2Fbench-micro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luislavena%2Fbench-micro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luislavena%2Fbench-micro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luislavena","download_url":"https://codeload.github.com/luislavena/bench-micro/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247767236,"owners_count":20992548,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T15:10:02.297Z","updated_at":"2025-04-08T03:12:12.325Z","avatar_url":"https://github.com/luislavena.png","language":"Ruby","readme":"# bench some web microframeworks (Ruby)\n\nBecause we don't have enough drama, let's bench some *hello world* apps!\n\n## Why?\n\nAs part of some research, collected some benchmark around Ruby web\nmicroframeworks.\n\nThe idea is bench the performance from [Rack](https://github.com/rack/rack),\nthrought the stack of the framework to the minimum representation of an\napplication (*Hello World* apps).\n\nIt is not the goal to bechmark hits to the database or external services,\nnor to do a silly *fibonacci-as-a-service*, ok?\n\n## What?\n\nRack 2 compatible frameworks\n\n- [Cuba](https://github.com/soveran/cuba) - [cuba.ru](apps/cuba.ru)\n- [Flame](https://github.com/AlexWayfer/flame) - [flame.ru](apps/flame.ru)\n- [Grape](https://github.com/ruby-grape/grape) - [grape.ru](apps/grape.ru)\n- [Hanami (Router)](https://github.com/hanami/router) - [hanami-router.ru](apps/hanami-router.ru)\n- [Hobbit](https://github.com/patriciomacadden/hobbit) - [hobbit.ru](apps/hobbit.ru)\n- [Hobby](https://github.com/ch1c0t/hobby) - [hobby.ru](apps/hobby.ru)\n- [Newark](https://github.com/mje113/newark) - [newark.ru](apps/newark.ru)\n- [Plezi](https://github.com/boazsegev/plezi) - [plezi.ru](apps/plezi.ru)\n- [Rack](https://github.com/rack/rack) - [rack.ru](apps/rack.ru) + [rack-response.ru](apps/rack-response.ru)\n- [Rack-App](https://github.com/rack-app/rack-app) - [rack-app.ru](apps/rack-app.ru)\n- [RackStep](https://github.com/mfdavid/rackstep) - [rackstep.ru](apps/rackstep.ru)\n- [Rails (API + Metal)](https://github.com/rails/rails) - [rails-api.ru](apps/rails-api.ru)  + [rails-metal.ru](apps/rails-metal.ru)\n- [Rambutan](https://github.com/NewRosies/rambutan) - [rambutan.ru](apps/rambutan.ru)\n- [Roda](https://github.com/jeremyevans/roda) - [roda.ru](apps/roda.ru)\n- [Sinatra](https://github.com/sinatra/sinatra) - [sinatra.ru](apps/sinatra.ru)\n- [Syro](https://github.com/soveran/syro) - [syro](apps/syro.ru)\n- [Watts](https://github.com/pete/watts) - [watts](apps/watts.ru)\n\nPlease note that while Rails has been added to the list, it is just a\nminimalistic representation with ActionPack gem (using API and Metal, no full middleware stack, etc). You\nshouldn't take the performance numbers mentioned here about Rails (or any\nother) as scientific and decision-taking references.\n\n## How?\n\nUsed [wrk](https://github.com/wg/wrk) to benchmark, locally, a burst of\nrequests (in 2 threads) over 10 seconds. The command line used was:\n\n```console\n$ wrk -t 2 http://localhost:9292/\n```\n\nAll the frameworks using [Puma](https://github.com/puma/puma) on\nRuby 2.4, in production mode with 16 threads:\n\n```console\n$ puma -e production -t 16:16 apps/\u003cframework.ru\u003e\n```\n\n## Run benchmark for all frameworks\n\n```console\n# use `bundle exec`, if needed\n$ bench/summary-memory\n$ bench/summary-speed\n```\n\n### Have some numbers around?\n\nYup, I do:\n\n#### Requests/sec\n\u003c!-- speed_table --\u003e\n```\nFramework            Requests/sec  % from best\n----------------------------------------------\nrack                     15839.64      100.00%\nwatts                    13585.65       85.77%\nsyro                     13306.01       84.00%\nroda                     11776.27       74.35%\ncuba                     11501.96       72.62%\nrack-response            11480.11       72.48%\nhobbit                   11140.22       70.33%\nhobby                    10606.80       66.96%\nhanami-router            10247.61       64.70%\nnewark                    8896.35       56.17%\nrambutan                  8466.83       53.45%\nplezi                     8240.07       52.02%\nrackstep                  8187.32       51.69%\nrack-app                  7473.52       47.18%\nrails-metal               6598.65       41.66%\nflame                     5454.46       34.44%\nsinatra                   3977.30       25.11%\ngrape                     2937.03       18.54%\nrails-api                 1211.33        7.65%\n```\n\u003c!-- speed_table_end --\u003e\n\n#### Memory Allocation/Request\n\u003c!-- mem_table --\u003e\n```\nFramework       Allocs/Req Memsize/Req\n--------------------------------------\nrack                    41        2920\nroda                    45        3608\nsyro                    45        3608\ncuba                    47        3688\nwatts                   48        3200\nhobbit                  49        3928\nhobby                   53        4240\nrack-response           56        4136\nrails-metal             60        5728\nplezi                   66        5040\nhanami-router           68        4880\nnewark                  72        5928\nrackstep                81        4944\nrack-app                83        7184\nrambutan                83        5944\nflame                  125        8536\nsinatra                191       12512\ngrape                  272       20800\nrails-api              385       28017\n```\n\u003c!-- mem_table_end --\u003e\n\n#### Hardware\n\nThese numbers were collected on:\n\n- Ubuntu 16.10 64-bit (kernel: 4.8.0-56-generic)\n- Dell XPS 13 (9343, QHD, Developer Edition)\n- Intel® Core™ i7-5500U CPU @ 2.40GHz × 4\n- 8GB RAM\n- 256GB SSD\n- ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]\n","funding_links":[],"categories":["Benchmarks"],"sub_categories":["Application Insights"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluislavena%2Fbench-micro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluislavena%2Fbench-micro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluislavena%2Fbench-micro/lists"}