----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/68224/#review207045 -----------------------------------------------------------
Overall looks good, just a couple of minor comments below: 3rdparty/libprocess/include/process/statistics.hpp Lines 32-36 (original), 34-39 (patched) <https://reviews.apache.org/r/68224/#comment290229> It would be great to have a TODO here to remove the time series specialization by having time series use an iterator adaptor (e.g. https://www.boost.org/doc/libs/1_51_0/libs/range/doc/html/range/reference/adaptors/reference/map_values.html) 3rdparty/libprocess/include/process/statistics.hpp Lines 60-64 (patched) <https://reviews.apache.org/r/68224/#comment290224> We should just have the caller do this using an iterator adaptor (e.g. they have a `transform` one akin to what you're suggesting here, but they also have one that directly provides map values: https://www.boost.org/doc/libs/1_51_0/libs/range/doc/html/range/reference/adaptors/reference/map_values.html) rather than push it down into the library 3rdparty/libprocess/include/process/statistics.hpp Lines 96-97 (patched) <https://reviews.apache.org/r/68224/#comment290225> Let's take it by rvalue reference here and std::move it in? Alternatively, we can call this `fromSorted`, take it by const ref, and require that the caller sort, but there's a cost to checking that it's indeed sorted if we wanted to be safe here 3rdparty/libprocess/src/tests/statistics_tests.cpp Lines 94 (patched) <https://reviews.apache.org/r/68224/#comment290226> It's tough to tell if this is the right p90, could we update the data to make it more obviously right? E.g. p90 -> 90 - Benjamin Mahler On Aug. 9, 2018, 2:20 p.m., Alexander Rukletsov wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/68224/ > ----------------------------------------------------------- > > (Updated Aug. 9, 2018, 2:20 p.m.) > > > Review request for mesos, Benno Evers and Benjamin Mahler. > > > Repository: mesos > > > Description > ------- > > See summary. > > > Diffs > ----- > > 3rdparty/libprocess/include/process/statistics.hpp > e9f1fc23bf83f92a2e7de94dba0df48272cc3394 > 3rdparty/libprocess/src/tests/statistics_tests.cpp > a2a780bf9de018c823b68aa48977fd9fd1b8a064 > > > Diff: https://reviews.apache.org/r/68224/diff/2/ > > > Testing > ------- > > make check > > > Thanks, > > Alexander Rukletsov > >
