> On March 3, 2016, 4:04 p.m., Alexander Rukletsov wrote: > > src/master/allocator/mesos/hierarchical.cpp, lines 1711-1712 > > <https://reviews.apache.org/r/43880/diff/13/?file=1279033#file1279033line1711> > > > > My intuition is that using `allocationScalarQuantities` will be more > > efficient. However, we should expose known clients from the sorter. What do > > you think?
As for efficiency, I don't think there's an issue here; we just create a `Value::Scalar` which I think cannot be avoided, and e.g., never create temporary `Resources`. Would we use `allocationScalarQuantities`, we'd always be forced to create temporary `Resources` (which in an ideal world could be optimized away again). > On March 3, 2016, 4:04 p.m., Alexander Rukletsov wrote: > > src/master/allocator/mesos/metrics.cpp, lines 78-81 > > <https://reviews.apache.org/r/43880/diff/13/?file=1279035#file1279035line78> > > > > Why not using C++ lambdas instead of `bind`? Good idea. > On March 3, 2016, 4:04 p.m., Alexander Rukletsov wrote: > > src/master/allocator/mesos/hierarchical.cpp, lines 540-545 > > <https://reviews.apache.org/r/43880/diff/13/?file=1279033#file1279033line540> > > > > Let's call it right after `CHECK_*`s Done. > On March 3, 2016, 4:04 p.m., Alexander Rukletsov wrote: > > src/master/allocator/mesos/hierarchical.hpp, lines 447-450 > > <https://reviews.apache.org/r/43880/diff/13/?file=1279032#file1279032line447> > > > > Do you still need it? You are right, not needed anymore and also not implemented. > On March 3, 2016, 4:04 p.m., Alexander Rukletsov wrote: > > docs/monitoring.md, line 879 > > <https://reviews.apache.org/r/43880/diff/13/?file=1279031#file1279031line879> > > > > Maybe "Allocated resources of kind KIND"? Done, also fixed the doc for `allocator/total` below. - Benjamin ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/43880/#review121860 ----------------------------------------------------------- On March 3, 2016, 5:17 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, 5:17 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 > 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 > >