{"id":15284322,"url":"https://github.com/wbotelhos/rspeed","last_synced_at":"2025-04-12T23:21:39.912Z","repository":{"id":56893010,"uuid":"115887015","full_name":"wbotelhos/rspeed","owner":"wbotelhos","description":"RSpeed splits your specs to you run parallels tests","archived":false,"fork":false,"pushed_at":"2021-02-08T16:12:24.000Z","size":355,"stargazers_count":4,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T17:21:20.618Z","etag":null,"topics":["parallel","report","rspec"],"latest_commit_sha":null,"homepage":"https://www.danca.com","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wbotelhos.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"patreon":"wbotelhos"}},"created_at":"2017-12-31T21:51:41.000Z","updated_at":"2025-01-17T20:11:31.000Z","dependencies_parsed_at":"2022-08-21T01:20:54.925Z","dependency_job_id":null,"html_url":"https://github.com/wbotelhos/rspeed","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wbotelhos%2Frspeed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wbotelhos%2Frspeed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wbotelhos%2Frspeed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wbotelhos%2Frspeed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wbotelhos","download_url":"https://codeload.github.com/wbotelhos/rspeed/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248644181,"owners_count":21138564,"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":["parallel","report","rspec"],"created_at":"2024-09-30T14:53:29.775Z","updated_at":"2025-04-12T23:21:39.885Z","avatar_url":"https://github.com/wbotelhos.png","language":"Ruby","funding_links":["https://patreon.com/wbotelhos","https://www.patreon.com/wbotelhos"],"categories":[],"sub_categories":[],"readme":"# RSpeed\n\n[![CI](https://github.com/wbotelhos/rspeed/workflows/CI/badge.svg)](https://github.com/wbotelhos/rspeed/actions)\n[![Gem Version](https://badge.fury.io/rb/rspeed.svg)](https://badge.fury.io/rb/rspeed)\n[![Maintainability](https://api.codeclimate.com/v1/badges/f312587b4f126bb13e85/maintainability)](https://codeclimate.com/github/wbotelhos/rspeed/maintainability)\n[![Coverage](https://codecov.io/gh/wbotelhos/rspeed/branch/main/graph/badge.svg)](https://codecov.io/gh/wbotelhos/rspeed)\n[![Sponsor](https://img.shields.io/badge/sponsor-%3C3-green)](https://www.patreon.com/wbotelhos)\n\nRSpeed splits your specs to you run parallels tests.\n\n## Install\n\nAdd the following code on your `Gemfile` and run `bundle install`:\n\n```ruby\ngem 'rspeed'\n```\n\n## Setup\n\nWe need to extract the rake that executes the split via `rspeed:run`.\n\n```ruby\nrake rspeed:install\n```\n\n## Usage\n\n- `RSPEED_APP`: You app name to avoid data override\n- `RSPEED_PIPE`: Current pipe\n- `RSPEED_PIPES`: Quantity of pipes\n- `RSPEED_SPEC_PATH`: The specs folders path\n- `RSPEED`: Enables RSpeed\n\n```sh\nRSPEED=true RSPEED_APP=blog RSPEED_PIPE=1 RSPEED_PIPES=3 bundle exec rake rspeed:run\n```\n\n## How it Works\n\n### First run\n\n1. Since we have no statistics on the first time, we run all specs and collect it;\n\n```json\n{ \"file\": \"./spec/models/1_spec.rb\", \"time\": 0.01 }\n{ \"file\": \"./spec/models/2_spec.rb\", \"time\": 0.02 }\n{ \"file\": \"./spec/models/3_spec.rb\", \"time\": 0.001 }\n{ \"file\": \"./spec/models/4_spec.rb\", \"time\": 1 }\n```\n\n### Second and next runs\n\n1. Previous statistics is balanced by times and distributed between pipes:\n\n```json\n{ \"file\": \"./spec/models/4_spec.rb\", \"time\": 1 }\n```\n\n```json\n{ \"file\": \"./spec/models/2_spec.rb\", \"time\": 0.02 }\n```\n\n```json\n{ \"file\": \"./spec/models/3_spec.rb\", \"time\": 0.001 }\n{ \"file\": \"./spec/models/1_spec.rb\", \"time\": 0.01 }\n```\n\n2. Run the current pipe `1`:\n\n```json\n{ \"file\": \"./spec/models/4_spec.rb\", \"time\": 1 }\n```\n\n- Collects statistics and temporary save it;\n\n4. Run the current pipe `2`:\n\n```json\n{ \"file\": \"./spec/models/2_spec.rb\", \"time\": 0.02 }\n```\n\n- Collects statistics and temporary save it;\n\n5. Run the current pipe `3`:\n\n```json\n{ \"file\": \"./spec/models/3_spec.rb\", \"time\": 0.001 }\n{ \"file\": \"./spec/models/1_spec.rb\", \"time\": 0.01 }\n```\n\n- Collects statistics and temporary save it;\n- Sum all the last statistics and save it for the next run;\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwbotelhos%2Frspeed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwbotelhos%2Frspeed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwbotelhos%2Frspeed/lists"}