-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63454/
-----------------------------------------------------------

Review request for Aurora, David McLaughlin and Jordan Ly.


Repository: aurora


Description
-------

Was surprised to see `TierInfo#hashCode()` show up in a profiler, and ended up 
in this rabbit hole.  A `Cache` is overkill for caching revocable and 
non-revocable resources in an offer.  I then pulled a thread on `TierInfo` 
being passed around when we only need the `revocable` flag.

I find the resulting code easier to comprehend as well.


Diffs
-----

  src/jmh/java/org/apache/aurora/benchmark/SchedulingBenchmarks.java 
456e7808140dd9defd129800513b19b54b0a0f38 
  src/main/java/org/apache/aurora/scheduler/HostOffer.java 
acc637a5f695741e8ee527385bad9dec17ea4f15 
  src/main/java/org/apache/aurora/scheduler/mesos/MesosTaskFactory.java 
34ed8207c6bc09cde2a82b5867f4fd47a047a54e 
  src/main/java/org/apache/aurora/scheduler/resources/AcceptedOffer.java 
291d5c95916915afc48a7143759e523fccd52feb 
  src/main/java/org/apache/aurora/scheduler/resources/ResourceManager.java 
9aa263a9cfae03a9a0c5bc7fe3a1405397d3009c 
  src/main/java/org/apache/aurora/scheduler/state/TaskAssigner.java 
549fd2988569d37cfff199d058010259750938fc 
  src/test/java/org/apache/aurora/scheduler/mesos/MesosTaskFactoryImplTest.java 
d91b54047a611bce5c89a0b77b07fa88ff40eae9 
  src/test/java/org/apache/aurora/scheduler/resources/AcceptedOfferTest.java 
c47f7c9fec61399f09a2b2a7eccfd1615dde8230 
  src/test/java/org/apache/aurora/scheduler/resources/ResourceManagerTest.java 
37dfcbc073e3c0b6c3126dba31fdc4422629b335 
  src/test/java/org/apache/aurora/scheduler/state/FirstFitTaskAssignerTest.java 
5837250407cace3fa614f83a4992d430b70cdee3 


Diff: https://reviews.apache.org/r/63454/diff/1/


Testing
-------

No discernable performance changes in benchmarks (within error margins).

Master:
```
Benchmark                                                                     
(numPendingTasks)   Mode  Cnt       Score      Error  Units
SchedulingBenchmarks.ClusterFullUtilizationBenchmark.runBenchmark               
            N/A  thrpt   10  178037.291 ± 6295.285  ops/s
SchedulingBenchmarks.FillClusterBenchmark.runBenchmark                          
            N/A  thrpt   10    1465.314 ± 1538.509  ops/s
SchedulingBenchmarks.InsufficientResourcesSchedulingBenchmark.runBenchmark      
            N/A  thrpt   10   13993.963 ±  747.815  ops/s
SchedulingBenchmarks.LimitConstraintMismatchSchedulingBenchmark.runBenchmark    
            N/A  thrpt   10    1296.855 ±   61.355  ops/s
SchedulingBenchmarks.PreemptorSlotSearchBenchmark.runBenchmark                  
              1  thrpt   10      87.170 ±    1.377  ops/s
SchedulingBenchmarks.PreemptorSlotSearchBenchmark.runBenchmark                  
             10  thrpt   10      85.035 ±    7.125  ops/s
SchedulingBenchmarks.PreemptorSlotSearchBenchmark.runBenchmark                  
            100  thrpt   10      86.725 ±    4.409  ops/s
SchedulingBenchmarks.PreemptorSlotSearchBenchmark.runBenchmark                  
           1000  thrpt   10      75.962 ±    0.975  ops/s
SchedulingBenchmarks.ValueConstraintMismatchSchedulingBenchmark.runBenchmark    
            N/A  thrpt   10   16358.086 ±  139.123  ops/s
```

With this patch:
```
Benchmark                                                                     
(numPendingTasks)   Mode  Cnt       Score      Error  Units
SchedulingBenchmarks.ClusterFullUtilizationBenchmark.runBenchmark               
            N/A  thrpt   10  174874.109 ± 8002.217  ops/s
SchedulingBenchmarks.FillClusterBenchmark.runBenchmark                          
            N/A  thrpt   10    1194.696 ± 1400.142  ops/s
SchedulingBenchmarks.InsufficientResourcesSchedulingBenchmark.runBenchmark      
            N/A  thrpt   10   15787.903 ±  837.119  ops/s
SchedulingBenchmarks.LimitConstraintMismatchSchedulingBenchmark.runBenchmark    
            N/A  thrpt   10    1341.742 ±   49.151  ops/s
SchedulingBenchmarks.PreemptorSlotSearchBenchmark.runBenchmark                  
              1  thrpt   10      86.147 ±    2.213  ops/s
SchedulingBenchmarks.PreemptorSlotSearchBenchmark.runBenchmark                  
             10  thrpt   10      86.729 ±    1.586  ops/s
SchedulingBenchmarks.PreemptorSlotSearchBenchmark.runBenchmark                  
            100  thrpt   10      84.574 ±    2.526  ops/s
SchedulingBenchmarks.PreemptorSlotSearchBenchmark.runBenchmark                  
           1000  thrpt   10      71.776 ±    3.214  ops/s
SchedulingBenchmarks.ValueConstraintMismatchSchedulingBenchmark.runBenchmark    
            N/A  thrpt   10   14757.428 ±  402.668  ops/s
```


Thanks,

Bill Farner

Reply via email to