You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Alexander Rukletsov <ru...@gmail.com> on 2016/03/01 12:48:44 UTC

Re: Review Request 43880: Added allocator metrics for total and allocated scalar resources.

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




docs/monitoring.md (lines 881 - 883)
<https://reviews.apache.org/r/43880/#comment183105>

    Same question as in the previous review: does it make sense to put them all on the same line?



src/master/allocator/mesos/hierarchical.hpp (lines 283 - 284)
<https://reviews.apache.org/r/43880/#comment183106>

    Blank line, please!
    
    We usually separate loops with blank lines from the surrounding code, except when it tightly related to the loop, which is not the case here, right?



src/master/allocator/mesos/hierarchical.cpp (line 402)
<https://reviews.apache.org/r/43880/#comment183092>

    Can we factor this out to a separate file? I would like to keep this file as small and readable as possible.



src/tests/hierarchical_allocator_tests.cpp (line 2406)
<https://reviews.apache.org/r/43880/#comment183081>

    I believe the actual value in JSON is double, right?



src/tests/hierarchical_allocator_tests.cpp (lines 2419 - 2420)
<https://reviews.apache.org/r/43880/#comment183110>

    Let's insert a blank line here or make the comment trailing.



src/tests/hierarchical_allocator_tests.cpp (line 2423)
<https://reviews.apache.org/r/43880/#comment183108>

    Don't forget to backtick variables! Here it's `agent1`.



src/tests/hierarchical_allocator_tests.cpp (lines 2445 - 2446)
<https://reviews.apache.org/r/43880/#comment183111>

    How it is different to the previous block?



src/tests/hierarchical_allocator_tests.cpp (line 2476)
<https://reviews.apache.org/r/43880/#comment183112>

    Why this math?


- Alexander Rukletsov


On Feb. 28, 2016, 9:28 p.m., Benjamin Bannier wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43880/
> -----------------------------------------------------------
> 
> (Updated Feb. 28, 2016, 9:28 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov and Ben Mahler.
> 
> 
> Bugs: MESOS-4720
>     https://issues.apache.org/jira/browse/MESOS-4720
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added allocator metrics for total and allocated scalar resources.
> 
> 
> Diffs
> -----
> 
>   docs/monitoring.md 827f7073204fcf8575ca980a5571c8be4f5e4110 
>   src/master/allocator/mesos/hierarchical.hpp 3043888630b066505410d3b32c5b3f813cc458c1 
>   src/master/allocator/mesos/hierarchical.cpp 24fa50f62dec10ed43089297473cc386d6ba2f78 
>   src/tests/hierarchical_allocator_tests.cpp 5f771f02db9bd098f3cd36730cd84bf2f5e87a33 
> 
> Diff: https://reviews.apache.org/r/43880/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
> 
>


Re: Review Request 43880: Added allocator metrics for total and allocated scalar resources.

Posted by Benjamin Bannier <be...@mesosphere.io>.

> On March 1, 2016, 12:48 p.m., Alexander Rukletsov wrote:
> > src/tests/hierarchical_allocator_tests.cpp, line 2406
> > <https://reviews.apache.org/r/43880/diff/9/?file=1273636#file1273636line2406>
> >
> >     I believe the actual value in JSON is double, right?

This is actually a `JSON::Value`; the corresponding `operator==` which will convert the lhs to a `JSON::Value` as well.


> On March 1, 2016, 12:48 p.m., Alexander Rukletsov wrote:
> > src/master/allocator/mesos/hierarchical.cpp, line 402
> > <https://reviews.apache.org/r/43880/diff/9/?file=1273635#file1273635line402>
> >
> >     Can we factor this out to a separate file? I would like to keep this file as small and readable as possible.

I moved this into the `Metrics` (which also live in a different file now).


> On March 1, 2016, 12:48 p.m., Alexander Rukletsov wrote:
> > src/tests/hierarchical_allocator_tests.cpp, lines 2445-2446
> > <https://reviews.apache.org/r/43880/diff/9/?file=1273636#file1273636line2445>
> >
> >     How it is different to the previous block?

Thanks, my `Control-C Control-V` key must have been stuck ;)


> On March 1, 2016, 12:48 p.m., Alexander Rukletsov wrote:
> > src/tests/hierarchical_allocator_tests.cpp, line 2476
> > <https://reviews.apache.org/r/43880/diff/9/?file=1273636#file1273636line2476>
> >
> >     Why this math?

I added some comments.


- Benjamin


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


On March 2, 2016, 11:35 a.m., Benjamin Bannier wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43880/
> -----------------------------------------------------------
> 
> (Updated March 2, 2016, 11:35 a.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov and Ben Mahler.
> 
> 
> Bugs: MESOS-4720
>     https://issues.apache.org/jira/browse/MESOS-4720
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added allocator metrics for total and allocated scalar resources.
> 
> 
> Diffs
> -----
> 
>   docs/monitoring.md 827f7073204fcf8575ca980a5571c8be4f5e4110 
>   src/master/allocator/mesos/hierarchical.hpp 3043888630b066505410d3b32c5b3f813cc458c1 
>   src/master/allocator/mesos/hierarchical.cpp 24fa50f62dec10ed43089297473cc386d6ba2f78 
>   src/master/allocator/mesos/metrics.hpp PRE-CREATION 
>   src/tests/hierarchical_allocator_tests.cpp 5f771f02db9bd098f3cd36730cd84bf2f5e87a33 
> 
> Diff: https://reviews.apache.org/r/43880/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
> 
>


Re: Review Request 43880: Added allocator metrics for total and allocated scalar resources.

Posted by Alexander Rukletsov <ru...@gmail.com>.

> On March 1, 2016, 11:48 a.m., Alexander Rukletsov wrote:
> > src/tests/hierarchical_allocator_tests.cpp, line 2406
> > <https://reviews.apache.org/r/43880/diff/9/?file=1273636#file1273636line2406>
> >
> >     I believe the actual value in JSON is double, right?
> 
> Benjamin Bannier wrote:
>     This is actually a `JSON::Value`; the corresponding `operator==` which will convert the lhs to a `JSON::Value` as well.

Does it make sense to say `0.` to hint the compiler create a `JSON::Value` with a double? It looks like `Value::ContainmentComparator` will do the job anyway, but it feels cleaner to me. What do you think?


- Alexander


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


On March 3, 2016, 1:12 p.m., Benjamin Bannier wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43880/
> -----------------------------------------------------------
> 
> (Updated March 3, 2016, 1:12 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov and Ben Mahler.
> 
> 
> Bugs: MESOS-4720
>     https://issues.apache.org/jira/browse/MESOS-4720
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   docs/monitoring.md 827f7073204fcf8575ca980a5571c8be4f5e4110 
>   src/master/allocator/mesos/hierarchical.hpp 3043888630b066505410d3b32c5b3f813cc458c1 
>   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/43880/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
> 
>