----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/66822/#review202680 -----------------------------------------------------------
src/master/metrics.cpp Lines 556-557 (patched) <https://reviews.apache.org/r/66822/#comment284653> Fits in one line. src/master/metrics.cpp Lines 595-623 (patched) <https://reviews.apache.org/r/66822/#comment284657> We could replace these two methods with a single method that that takes a `const scheduler::Call::Type&` instead of a `const scheduler::Call&`. We use this pattern for a lot of metrics, so should consider adding something like: ``` template <typename Type> class EnumCounter { EnumCounter(const lambda::function<std::string(const Type&)> _keyNameGenerator); ~EnumCounter(); void increment(const Type& type); private: hashmap<Type, Counter> counters; const lambda::function<std::string(const Type&)> keyNameGenerator; } ``` - Gaston Kleiman On April 30, 2018, 11:45 a.m., Gilbert Song wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/66822/ > ----------------------------------------------------------- > > (Updated April 30, 2018, 11:45 a.m.) > > > Review request for mesos, Benjamin Mahler, Gaston Kleiman, Greg Mann, and > Vinod Kone. > > > Repository: mesos > > > Description > ------- > > Added per Framework Calls to metrics. > > > Diffs > ----- > > src/master/http.cpp 135ae4389623385a6638158f5f23d6daca14a0ad > src/master/master.cpp c723a291ed8d219ced4492bc905ac6b52683ae47 > src/master/metrics.hpp ec76dbcd1d1fa5349d62ce73fb9603e1986a776b > src/master/metrics.cpp e46ead79f3f29e285426f9d061337077f453aa45 > > > Diff: https://reviews.apache.org/r/66822/diff/4/ > > > Testing > ------- > > > Thanks, > > Gilbert Song > >
