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



3rdparty/libprocess/include/process/statistics.hpp
<https://reviews.apache.org/r/20047/#comment72863>

    Worst case this is N^2 * logN (you can use the second last summation here 
to derive this: http://en.wikipedia.org/wiki/Summation#Growth_rates), each 
insertion is O(i) worst-case and each lower_bound is log(i) worst case as well).
    
    Could we instead just build the vector and use std::sort? It would also be 
really clear to read as well!
    
    Since we're building so many of these, we may even want to .reserve the 
vector first.



3rdparty/libprocess/include/process/statistics.hpp
<https://reviews.apache.org/r/20047/#comment72864>

    Option<T>?
    
    How does one express the 99.99th percentile with an int?



3rdparty/libprocess/include/process/statistics.hpp
<https://reviews.apache.org/r/20047/#comment72865>

    Could we normalize the percentile instead? Semantically the 400th 
percentile == the 100th percentile and the -1th percentile == the 0th 
percentile, right?
    
    We could even normalize 'index' to simplify things further and avoid the 
need for any CHECKs here.



3rdparty/libprocess/include/process/statistics.hpp
<https://reviews.apache.org/r/20047/#comment72877>

    Why did you need this check? Was there an issue with the math below when 
the delta was small?
    
    If we normalized the 'index' we could avoid the need for this CHECK 
entirely.



3rdparty/libprocess/include/process/statistics.hpp
<https://reviews.apache.org/r/20047/#comment72878>

    This looks like a derived form of typical interpolation math, would it be 
easier to just show the standard formula for linear interpolation?
    
    lower + (upper - lower) * (index - floor(index))
    
    This way we don't even need to store a mysterious 'interp' variable too!


- Ben Mahler


On April 9, 2014, 6:01 p.m., Dominic Hamon wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/20047/
> -----------------------------------------------------------
> 
> (Updated April 9, 2014, 6:01 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Ben Mahler.
> 
> 
> Bugs: MESOS-1036
>     https://issues.apache.org/jira/browse/MESOS-1036
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> see summary
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/Makefile.am c785c4dd852eacaec1be11c68e0b0b95a328d96b 
>   3rdparty/libprocess/include/process/statistics.hpp 
> a4f1db3a8a219c39193a1d237477f0350e47e681 
>   3rdparty/libprocess/src/process.cpp 
> 9654c0437edb43cff65dbefdf08dee9e18ef96ab 
>   3rdparty/libprocess/src/statistics.cpp 
> 75aac4074d33cb5054da6c8b0bd4a890c2eaf80e 
>   3rdparty/libprocess/src/tests/statistics_tests.cpp 
> 3521bd565dae8fcbba464f2539b3b14a37a037f0 
>   3rdparty/libprocess/src/timeseries.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/20047/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Dominic Hamon
> 
>

Reply via email to