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


Fix it, then Ship it!





src/master/allocator/mesos/hierarchical.cpp (lines 275 - 280)
<https://reviews.apache.org/r/43881/#comment183900>

    I would pull this into a helper in `Metrics` similar to 
`createGaugesForResource()`. This way we keep the allocator code minimal.



src/master/allocator/mesos/hierarchical.cpp (lines 344 - 347)
<https://reviews.apache.org/r/43881/#comment183901>

    Maybe here a helper as well.



src/master/allocator/mesos/hierarchical.cpp (lines 1498 - 1499)
<https://reviews.apache.org/r/43881/#comment183903>

    I think this should be around `allocated()` calls for sorters. When 
`allocated()` is called, the sorter's internal allocation counter is 
incremented. I'd say we should keep the counters in sync.
    
    Alternatively, we can expose the allocations counter from sorters and query 
it directly.



src/master/allocator/mesos/metrics.cpp (lines 59 - 60)
<https://reviews.apache.org/r/43881/#comment183902>

    If you say `using process::metrics::Counter` at the top, you can fit this 
into one line : ).



src/tests/hierarchical_allocator_tests.cpp (line 2464)
<https://reviews.apache.org/r/43881/#comment183904>

    Backtick `framework1` please.



src/tests/hierarchical_allocator_tests.cpp (lines 2464 - 2472)
<https://reviews.apache.org/r/43881/#comment183905>

    Do you want to set quota as part of your test? Because otherwise we can 
simplify the test a bit by not setting it and having `agent2` allocated to 
`framework2`.



src/tests/hierarchical_allocator_tests.cpp (line 2487)
<https://reviews.apache.org/r/43881/#comment183907>

    Feel free to kill this line



src/tests/hierarchical_allocator_tests.cpp (lines 2492 - 2495)
<https://reviews.apache.org/r/43881/#comment183906>

    How about 
    ```
      Clock::advance(flags.allocation_interval);
      Clock::settle();
      ++allocations;
    ```
    to keep clock manipulation together?


- Alexander Rukletsov


On March 3, 2016, 4:17 p.m., Benjamin Bannier wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43881/
> -----------------------------------------------------------
> 
> (Updated March 3, 2016, 4:17 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov and Ben Mahler.
> 
> 
> Bugs: MESOS-4719
>     https://issues.apache.org/jira/browse/MESOS-4719
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added allocator metric for the number of allocations to a framework.
> 
> 
> Diffs
> -----
> 
>   docs/monitoring.md 827f7073204fcf8575ca980a5571c8be4f5e4110 
>   src/master/allocator/mesos/hierarchical.cpp 
> 70291075c00a9a557529c2562dedcfc6c6c3ec32 
>   src/master/allocator/mesos/metrics.hpp PRE-CREATION 
>   src/master/allocator/mesos/metrics.cpp PRE-CREATION 
>   src/tests/hierarchical_allocator_tests.cpp 
> 3e4ad31925e1b815a74d67fa3962d23fa5bc89d1 
> 
> Diff: https://reviews.apache.org/r/43881/diff/
> 
> 
> Testing
> -------
> 
> make check (OS X)
> 
> I confirmed that this does not lead to general performance regressions in the 
> allocator; this is partially expected since the added code only inserts 
> metrics in the allocator while the actual work is perform asynchronously. 
> These tests where performed with 
> `HierarchicalAllocator_BENCHMARK_Test.DeclineOffers` on an optimized build 
> under OS X using clang(trunk) as compiler.
> 
> 
> Thanks,
> 
> Benjamin Bannier
> 
>

Reply via email to