ExHammer/hammer
70.6
Strong · 13 November 2026
2.6k
lines of production code
Elixir
primary language
8
measurements over time
What this system is
Features
Initial project scaffolding and documentation
The repository has been initialized with standard Elixir project configuration files, including \.credo.exs\ for code linting, \.formatter.exs\ for code formatting, \.editorconfig\ for editor consistency, and \.tool-versions\ pinning Elixir 1.20.4 and Erlang 29.0.5. Comprehensive documentation has been added, including a detailed \README.md\ describing the Hammer rate-limiter library, its backends (ETS, Atomic, Redis, Mnesia), algorithms, and installation via Igniter, alongside \CHANGELOG.md\, \BENCHMARKS.md\, \CONTRIBUTING.md\, \CODE\_OF\_CONDUCT.md\, and \LICENSE.md\.
(repo-wide) · high confidence
New ETS rate-limiting algorithms: Fixed Window, Per-Key Fixed Window, Leaky Bucket, Sliding Window, and Token Bucket
This release adds five new rate-limiting algorithm implementations for the ETS backend, giving users more granular control over traffic shaping. The \:fix\_window\ algorithm provides simple, wall-clock-aligned windows, while \:fix\_window\_per\_key\ anchors windows to each key's first hit to prevent globally synchronized burst boundaries. The \:sliding\_window\ algorithm offers precise enforcement by tracking individual request timestamps, eliminating boundary bursts at the cost of higher storage. Additionally, \:token\_bucket\ and \:leaky\_bucket\ algorithms are introduced to support burst tolerance and smooth, constant-rate limiting respectively, with configurable refill rates, capacities, and costs.
lib/hammer/ets · high confidence
New \`mix hammer.install\` task for automated rate limiter setup
Users can now run \mix hammer.install\ to automatically generate a rate limiter module (e.g., \MyApp.RateLimit\) and add it to the application supervision tree. The task supports selecting a backend via the \--backend\ flag (defaulting to \ets\, with options for \atomic\ and \redis\), and requires the Igniter framework to be installed to perform the code generation and dependency management.
lib/mix · high confidence
New atomic and ETS backends with configurable rate-limiting algorithms
The Hammer library now provides two distinct backend implementations for rate limiting: an atomic backend using Erlang's :atomics module (requiring OTP 21.2+) and an ETS-based backend. Both backends support multiple algorithms including :fix\_window, :fix\_window\_per\_key, :sliding\_window, :leaky\_bucket, and :token\_bucket, allowing users to choose the strategy that best fits their concurrency and burst requirements. A new \:before\_clean\ callback option is available on both backends, enabling users to execute custom logic (such as telemetry emission) on expired entries before they are deleted. The legacy \Hammer.Application\ module has been removed, reflecting a shift in how the backend supervisors are started.
lib/hammer · high confidence
New atomic rate-limiting backends for Token Bucket, Leaky Bucket, and Fixed Window algorithms
This change introduces three new ETS-backed rate-limiting implementations in the \lib/hammer/atomic\ directory: \TokenBucket\, \LeakyBucket\, and \FixWindow\ (along with a \FixWindowPerKey\ variant). These modules provide high-performance, race-condition-safe rate limiting using Erlang's \:atomics\ module for concurrent counter updates. Users can now configure their rate limiters to use \backend: :atomic\ with \algorithm: :token\_bucket\, \:leaky\_bucket\, or \:fix\_window\ to benefit from atomic operations and reduced locking overhead compared to previous backends.
lib/hammer/atomic · high confidence
Behavioural changes
Benchmark suite adds atomic backend support for Hammer rate limiter
The benchmark script now includes performance comparisons for Hammer's new atomic backend alongside the existing ETS backend. Specifically, it adds benchmarks for fix\_window, token\_bucket, and leaky\_bucket algorithms using the atomic backend, allowing users to evaluate the performance characteristics of atomic rate limiting against the previous ETS-based implementations.
bench · high confidence
New macro-based API for creating rate limiters with configurable backends
The Hammer library has replaced its previous module interface with a new \use Hammer\ macro, allowing users to define custom rate limiter modules by specifying a backend (such as \:ets\ or \:atomic\). This change introduces a standardized callback interface for rate limiting operations (including \hit\, \inc\, \set\, \get\, and \expires\_at\) and automatically configures the chosen backend at compile time, simplifying the setup process for rate-limited applications.
lib · high confidence
Removal of legacy Mix.Config configuration file
The \config/config.exs\ file has been deleted, removing the previous Mix.Config-based application configuration. This change eliminates the ability to configure the application via the legacy configuration module and suggests a shift towards alternative configuration methods, such as environment variables or direct code defaults, as the standard Mix.Config import mechanism is no longer present.
config · high confidence
Test coverage
Added comprehensive test coverage for ETS and Atomic backends; Added test coverage for atomic and ETS backend key types; Added test coverage for the atomic backend's rate-limiting algorithms; Added test helpers for bucket expiry and callback verification; Added tests for the mix hammer.install Igniter task.
Dependencies
Upgrade to Elixir 1.14 and update development dependencies
The project has been upgraded to require Elixir 1.14 (previously 1.4) and bumped the application version to 7.5.0. Development dependencies have been updated, including credo to 1.7.19, ex\_doc to 0.40.4, dialyxir to 1.4.8, and igniter to 0.8.4. The project structure has also been modernized to use the Mix.Project DSL, adding configuration for documentation, package metadata, and dialyzer PLT settings.
(dependencies) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 71 → 71 (-0.7)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.3) — scores are not directly comparable.
Lenses
- Code Health 99 → 99 (+0.0)
- Architecture 100 → 100 (+0.0)
- Maturity 58 → 62 (+4.4)
- Readiness 82 → 82 (-0.1)
- Security 78 → 68 (-10.8)
- Performance 85 → 85 (+0.0)
Resolved (1)
- Off-boarding risk: anonymized user #1
New (19)
- Edited copies of one member (3 members, 13+ corresponding lines) (lib/hammer/atomic/fix_window.ex)
- Edited copies of one member (3 members, 3+ corresponding lines) (lib/hammer/ets/leaky_bucket.ex)
- Edited copies of one member (3 members, 5+ corresponding lines) (lib/hammer/ets/leaky_bucket.ex)
- Edited copies of one member (4 members, 3+ corresponding lines) (lib/hammer/atomic/fix_window.ex)
- Edited copies of one member (4 members, 3+ corresponding lines) (lib/hammer/ets/fix_window.ex)
- Edited copy of a member (10 corresponding lines) (lib/hammer/atomic/fix_window_per_key.ex)
- Edited copy of a member (11 corresponding lines) (lib/hammer/ets/sliding_window.ex)
- Edited copy of a member (15 corresponding lines) (lib/hammer/atomic.ex)
- Edited copy of a member (18 corresponding lines) (lib/hammer/atomic/leaky_bucket.ex)
- Edited copy of a member (2 corresponding lines) (lib/hammer/ets/fix_window.ex)
- Edited copy of a member (2 corresponding lines) (lib/hammer/ets/fix_window.ex)
- Edited copy of a member (20 corresponding lines) (lib/hammer/atomic/fix_window_per_key.ex)
- Edited copy of a member (23 corresponding lines) (lib/hammer/atomic/leaky_bucket.ex)
- Edited copy of a member (23 corresponding lines) (lib/hammer/ets/fix_window_per_key.ex)
- Edited copy of a member (28 corresponding lines) (lib/hammer/atomic.ex)
- Edited copy of a member (7 corresponding lines) (lib/hammer/atomic/fix_window.ex)
- Edited copy of a member (7 corresponding lines) (lib/hammer/atomic/fix_window.ex)
- Off-boarding risk: anonymized user #1
- Outdated: dialyxir
Changes since last survey
- 4 commits — 3 feature/other, 1 fixes
By area
- (root) — 4 commits
Notable commits
- fix: fix(ets): don't count denied hits in sliding window (#210)
- change: build(deps): bump igniter, ex_ast, req, sourceror, spitfire, nimble_options, makeup (#216)
- change: build: pin toolchain to Elixir 1.20.5 / OTP 29.1.2 (#217)
- change: chore: Release 7.5.1 (#214)
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
ExHammer/hammer was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 13 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 69c74779a268d25109f17c798dc80fecd672ad2f — the exact code this score is about.
- Scored under rubric-2026.11.3 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.57+preprod-8ebfb01cf4c0.