LMAX-Exchange/disruptor
55.9
Weak · 24 September 2026
12.1k
lines of production code
Java
primary language
5
measurements over time
What this system is
This system is a high-performance, low-latency inter-thread messaging library known as the Disruptor. It provides a ring buffer-based concurrency framework that enables efficient event processing through features like batch handling, multiple consumer topologies, and various wait strategies. The codebase includes extensive performance benchmarking and stress testing infrastructure to validate throughput, latency, and memory ordering under concurrent access.
How it got here
2012 — Build system migration and test modernization
12 changes.
The project migrated its build infrastructure to Gradle and updated the test suite to JUnit 5. This period also introduced batch processing capabilities and refactored the Disruptor DSL to improve extensibility and internal structure.
2013 — Performance test suite expansion
7 changes.
This period focused on expanding the Disruptor's performance testing coverage across various implementation patterns, including raw, sequenced, queue-based, and off-heap configurations. The work introduced new benchmark classes to measure throughput and latency for specific topologies and memory layouts, while also refactoring the test framework to report detailed batch processing metrics.
2020–2021 — Benchmarking and module system support
8 changes.
This period focused on enhancing the Disruptor library's usability and verifiability by introducing Java Platform Module System (JPMS) support and comprehensive JMH benchmarks. The team also expanded the codebase with extensive example code and stress tests to validate concurrency primitives and performance characteristics.
Features
Add JMH benchmark utilities for performance testing
Added new utility classes for JMH benchmarks: Constants defining ring buffer size and iteration counts, a SimpleEvent data carrier, and a SimpleEventHandler that consumes events using JMH's Blackhole to prevent dead-code elimination. These changes support benchmarking the Disruptor's performance characteristics.
src/jmh/java/com/lmax/disruptor/util · high confidence
Add Java module descriptor for the Disruptor library
A new module-info.java file has been added to the main source directory, defining the 'com.lmax.disruptor' Java module. This change exports the 'com.lmax.disruptor', 'com.lmax.disruptor.dsl', and 'com.lmax.disruptor.util' packages, enabling the library to be used as a proper Java Platform Module System (JPMS) module.
src/main/java · high confidence
Add performance tests for custom immutable ring buffer
Added a new set of performance tests in the \src/perftest/java/com/lmax/disruptor/immutable\ directory to benchmark a custom immutable ring buffer implementation. This includes the \CustomRingBuffer\ and \SimplePerformanceTest\ classes, which utilize \BatchEventProcessorBuilder\ for constructing processors, and supporting classes like \EventAccessor\ and \Constants\ to measure throughput and latency.
src/perftest/java/com/lmax/disruptor/immutable · high confidence
Added JMH benchmarks for Disruptor performance analysis
Added a suite of JMH benchmarks to measure and compare the performance of various Disruptor components, including the RingBuffer, MultiProducerSequencer, and Sequence classes. The new benchmarks allow for detailed profiling of array access, false-sharing, and thread pinning, providing insights into the performance characteristics of different implementation approaches such as Unsafe, VarHandle, and standard array access.
src/jmh/java/com/lmax/disruptor · high confidence
Added LongEvent and ObjectEvent example implementations
Added new example files for the Disruptor library, including LongEvent, LongEventFactory, LongEventHandler, LongEventProducer, and their lambda/method-reference variants, as well as ObjectEvent, ClearingEventHandler, and ProcessingEventHandler. These files provide concrete usage examples for handling long and object events within the Disruptor framework.
src/examples/java/com/lmax/disruptor/examples/longevent · high confidence
Added example code for Disruptor usage patterns
The repository now includes a new \src/examples/java/com/lmax/disruptor/examples\ source set containing a collection of Java examples. These demonstrate various Disruptor patterns, including dynamic handler addition, early sequence release, exception handling, pipelining, sequential and parallel consumer chains, and polling strategies.
src/examples/java/com/lmax/disruptor/examples · high confidence
Added performance test support classes for benchmarking
Added a suite of new classes in the \com.lmax.disruptor.support\ package to support performance testing, including \MultiBufferBatchEventProcessor\ for processing multiple buffers, \ValueEvent\ and \FunctionEvent\ for data carriers, and various queue processors and event handlers (e.g., \ValueAdditionQueueProcessor\, \FizzBuzzEventHandler\) to facilitate benchmarking scenarios.
src/perftest/java/com/lmax/disruptor/support · high confidence
Added project configuration and build infrastructure
The repository now includes a Gradle build script and wrapper scripts (gradlew, gradlew.bat) to standardize the build process. Additionally, an .editorconfig file was added to enforce consistent code formatting across different IDEs, and a .gitignore file was introduced to exclude generated files, IDE settings, and build artifacts from version control.
(repo-wide) · high confidence
Introduction of batch processing and event polling capabilities
The Disruptor now supports processing events in configurable batches, allowing consumers to handle multiple events in a single pass for improved throughput. A new \BatchEventProcessor\ and \BatchEventProcessorBuilder\ enable this behavior, while the \BatchRewindStrategy\ interface allows custom handling of batch failures. Additionally, an experimental \EventPoller\ has been added to provide a pull-based, manual control flow for consuming events, decoupling the consumer from the standard event processing loop.
src/main/java/com/lmax/disruptor · high confidence
Behavioural changes
Added utility classes and deprecated ThreadHints
Added new utility classes DaemonThreadFactory, ThreadHints, and Util to the com.lmax.disruptor.util package, providing common functions such as power-of-two rounding, sequence minimum calculation, and spin-wait hints. ThreadHints is now deprecated in favor of using Thread.onSpinWait() directly, and the package includes updated Javadoc and package-info documentation.
src/main/java/com/lmax/disruptor/util · medium confidence
Enforce code quality and tests before commits
A new pre-commit hook has been added to the .githooks directory. This hook automatically runs the Gradle check and test tasks (./gradlew check test) before each commit. The script also temporarily stashes any unstaged changes to ensure a clean state during the checks, and restores them afterwards.
.githooks · medium confidence
Performance tests now report batch metrics
The performance test suite has been refactored to include a new PerfTestContext class that tracks batch processing statistics. As a result, the output of the performance tests now includes the percentage of operations processed in batches and the average batch size, providing more detailed insights into throughput and batching efficiency.
src/perftest/java/com/lmax/disruptor · high confidence
Refactored Disruptor DSL with new internal components
The Disruptor DSL has been refactored to improve internal structure and extensibility. New classes including ConsumerInfo, ConsumerRepository, EventProcessorInfo, and ExceptionHandlerWrapper have been introduced to manage event processing state and lifecycle. The Disruptor class now delegates consumer management to the ConsumerRepository, and the EventHandlerGroup supports combining groups via the new 'and' method. Custom event processors can now be integrated into the processing chain using the new EventProcessorFactory interface.
src/main/java/com/lmax/disruptor/dsl · high confidence
Test coverage
Add JCStress tests for sequence and logger initialization; Added alternative sequence and ring buffer implementations for testing; Added off-heap and on-heap throughput performance tests; Added performance test for EventTranslator throughput; Added performance tests for sequenced ring buffer patterns; Added raw throughput performance tests for single-publisher, single-consumer scenarios; Added test stubs for Disruptor components; Added test support classes for Disruptor; Added test utilities and rewritten tests for the disruptor util package; Added tests for ConsumerRepository and Disruptor DSL; Migrate test suite to JUnit 5; New queue-based performance tests for various event processor topologies.
Dependencies
Migrate build system to Gradle with updated test and benchmark dependencies
The project has been migrated to a Gradle build system, introducing new build scripts for Maven publishing, JMH benchmarks, JCStress tests, and performance testing. This change updates the test framework to JUnit 5.9.0 and Hamcrest 2.2, and upgrades the JMH benchmarking library to version 1.35. Additionally, the HdrHistogram dependency for performance tests is updated to version 2.1.12.
(dependencies) · high confidence
Updated Gradle wrapper to version 8.10
The Gradle wrapper has been updated to use Gradle version 8.10. This change ensures that the project uses a specific, consistent version of the Gradle build tool, which may include new features, performance improvements, and bug fixes compared to previous versions.
gradle · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.
Score
- CAI 51 → 56 (+5.2)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 96 → 97 (+1.5)
- Architecture 100 → 96 (-3.5)
- Maturity 36 → 36 (+0.0)
- Readiness 73 → 69 (-3.5)
- Security 42 → 64 (+22.0)
Resolved (31)
- Coverage not included — suite not readable by the collector
- Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
- Duplicated block (12 lines × 2) (src/main/java/com/lmax/disruptor/RingBuffer.java)
- Duplicated block (13 lines × 2) (src/main/java/com/lmax/disruptor/dsl/Disruptor.java)
- Duplicated block (7 lines × 2) (src/main/java/com/lmax/disruptor/RingBuffer.java)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- …and 11 more
New (64)
- Ambiguous lifecycle termination methods. halt() suggests an immediate, potentially abrupt stop, while shutdown() suggests a graceful termination. However, in the context of the Disruptor, halt() is often used to stop the ring buffer's processing, whereas shutdown() stops the entire Disruptor instance (including the ring buffer). The naming is slightly confusing because halt is a method on EventProcessor and BatchEventProcessor as well, creating a hierarchy of 'stopping' actions that aren't clearly distinguished by name alone (e.g., is halt on Disruptor the same as shutdown? No, but the names don't clearly convey the scope difference).
- Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
- Documentation: no contributor guidance (README.adoc)
- Documentation: no installation or build instructions (README.adoc)
- Documentation: no usage examples (README.adoc)
- Duplicated block (13 lines × 2) (src/main/java/com/lmax/disruptor/dsl/Disruptor.java)
- Duplicated block (14 lines × 2) (src/main/java/com/lmax/disruptor/RingBuffer.java)
- Duplicated block (7 lines × 4) (src/main/java/com/lmax/disruptor/RingBuffer.java)
- High interface indirection
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- …and 44 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
LMAX-Exchange/disruptor 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 24 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit c871ca49826a6be7ada6957f6fbafcfecf7b1f87 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-ae95d6cad036.