DaanVanYperen/artemis-odb-contrib — pull request #35 by DaanVanYperen (2014-09-14 19:15:32+00:00)
Title: Feature benchmarking

Hey @junkdog, mind taking a quick glance to see if you have any quick tips for a newbie?

My experience with JMH is pretty limited. Wondering if my event handlers calling count++ is getting optimized away like crazy. see `public void handle8 ( EventNest8 event ) { count++; }`

eventWithNoHierarchyAndOneHandler - Basic dispatch to single listener
eventWithFiftyListeners - Dispatches event to 50 listeners
eventWithHierarchyAndOneHandler - Subclassed event calling superclass listener
eventWithManySubclassListeners - Event that's 8 subclasses deep, dispatched to 9 handlers.
eventWithMixedCalls - Alternate dispatching two events

Mode Samples Score Score error Units
BaselineDispatcherBenchmark.eventWithFiftyListeners thrpt 20 556085581,037 1462514,781 ops/s
BaselineDispatcherBenchmark.eventWithHierarchyAndOneHandler thrpt 20 560162655,205 1907512,765 ops/s
BaselineDispatcherBenchmark.eventWithManySubclassListeners thrpt 20 144294284,056 2494734,804 ops/s
BaselineDispatcherBenchmark.eventWithMixedCalls thrpt 20 1108299045,638 8704825,183 ops/s
BaselineDispatcherBenchmark.eventWithNoHierarchyAndOneHandler thrpt 20 554561708,890 573565,310 ops/s
BasicDispatcherBenchmark.eventWithFiftyListeners thrpt 20 256172,742 1578,267 ops/s
BasicDispatcherBenchmark.eventWithHierarchyAndOneHandler thrpt 20 462958,427 3402,880 ops/s
BasicDispatcherBenchmark.eventWithManySubclassListeners thrpt 20 421041,497 2172,755 ops/s
BasicDispatcherBenchmark.eventWithMixedCalls thrpt 20 469353,296 3994,158 ops/s
BasicDispatcherBenchmark.eventWithNoHierarchyAndOneHandler thrpt 20 461526,849 3005,714 ops/s
FastDispatcherBenchmark.eventWithFiftyListeners thrpt 20 778542,625 6120,965 ops/s
FastDispatcherBenchmark.eventWithHierarchyAndOneHandler thrpt 20 43460455,559 1168799,737 ops/s
FastDispatcherBenchmark.eventWithManySubclassListeners thrpt 20 5967982,693 57935,111 ops/s
FastDispatcherBenchmark.eventWithMixedCalls thrpt 20 46561272,709 375971,424 ops/s
FastDispatcherBenchmark.eventWithNoHierarchyAndOneHandler thrpt 20 45035199,564 454572,026 ops/s