{"id":13507272,"url":"https://github.com/whitfin/jumper","last_synced_at":"2025-04-19T13:56:55.439Z","repository":{"id":57510664,"uuid":"134809265","full_name":"whitfin/jumper","owner":"whitfin","description":"Jump consistent hash implementation in Elixir (without NIFs)","archived":false,"fork":false,"pushed_at":"2023-08-30T20:46:57.000Z","size":21,"stargazers_count":12,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T08:24:27.686Z","etag":null,"topics":["algorithm","distributed-systems","hashing"],"latest_commit_sha":null,"homepage":null,"language":"Elixir","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/whitfin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-05-25T05:49:38.000Z","updated_at":"2023-09-14T16:24:46.000Z","dependencies_parsed_at":"2024-03-04T20:01:14.364Z","dependency_job_id":null,"html_url":"https://github.com/whitfin/jumper","commit_stats":{"total_commits":9,"total_committers":1,"mean_commits":9.0,"dds":0.0,"last_synced_commit":"ade6e5ec19ff6e2c8cb45e129d11ff3f7b3afb11"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whitfin%2Fjumper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whitfin%2Fjumper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whitfin%2Fjumper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whitfin%2Fjumper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/whitfin","download_url":"https://codeload.github.com/whitfin/jumper/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249708441,"owners_count":21313940,"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":["algorithm","distributed-systems","hashing"],"created_at":"2024-08-01T02:00:29.592Z","updated_at":"2025-04-19T13:56:55.412Z","avatar_url":"https://github.com/whitfin.png","language":"Elixir","funding_links":[],"categories":["Algorithms and Data structures"],"sub_categories":[],"readme":"# Jumper\n[![Build Status](https://img.shields.io/github/actions/workflow/status/whitfin/jumper/ci.yml?branch=main)](https://github.com/whitfin/jumper/actions) [![Coverage Status](https://img.shields.io/coveralls/whitfin/jumper.svg)](https://coveralls.io/github/whitfin/jumper) [![Hex.pm Version](https://img.shields.io/hexpm/v/jumper.svg)](https://hex.pm/packages/jumper) [![Documentation](https://img.shields.io/badge/docs-latest-blue.svg)](https://hexdocs.pm/jumper/)\n\n### Installation\n\nJumper is available on [Hex](https://hex.pm/). You can install the package by adding it to your dependencies in `mix.exs`:\n\n ```elixir\ndef deps do\n  [{:jumper, \"~\u003e 1.0\"}]\nend\n```\n\n### Usage\n\nUsing Jumper is pretty trivial; there is a single API used to slot keys into a range of buckets:\n\n```elixir\niex\u003e Jumper.slot(256, 1024)\n520\n```\n\nThe first argument is the key, and the second is the number of buckets the key can be slotted into. The result is the bucket the key should be routed to. Both the key and the bucket count should be valid integers. If you want to check a non-integer key, you could always use `:erlang.phash2/1` to generate a hash code for the value:\n\n```elixir\niex\u003e %{} |\u003e :erlang.phash2 |\u003e Jumper.slot(1024)\n29\n```\n\n### Benchmarks\n\nThere are some very trivial benchmarks available using [Benchee](https://github.com/PragTob/benchee) in the `benchmarks/` directory. You can run the benchmarks using the following command:\n\n```bash\n$ mix bench\n```\n\nTypical results are a microsecond or two, based on the number of buckets you're trying to slot into (scales to the number of buckets).\n\n### Contributions\n\nIf you feel something can be improved, or have any questions about certain behaviours or pieces of implementation, please feel free to file an issue. Proposed changes should be taken to issues before any PRs to avoid wasting time on code which might not be merged upstream.\n\nIf you *do* make changes to the codebase, please make sure you test your changes thoroughly, and include any unit tests alongside new or changed behaviours. jumper currently uses the excellent [excoveralls](https://github.com/parroty/excoveralls) to track code coverage.\n\n```bash\n$ mix test\n$ mix credo\n$ mix coveralls\n$ mix coveralls.html \u0026\u0026 open cover/excoveralls.html\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhitfin%2Fjumper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwhitfin%2Fjumper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhitfin%2Fjumper/lists"}