----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/11542/#review21363 -----------------------------------------------------------
3rdparty/libprocess/3rdparty/stout/include/stout/bandwidth.hpp <https://reviews.apache.org/r/11542/#comment44299> I'm not sold on the benefit of using boost rational here, were there other motivations besides the bad_rational handling? We generally do not use exceptions in libstout, but I see why you may have wanted to given the constructor can fail. But what are the failure scenarios you would like to handle? It seems a resulting SIGFPE from a duration of 0 is sufficient, no? 3rdparty/libprocess/3rdparty/stout/include/stout/bandwidth.hpp <https://reviews.apache.org/r/11542/#comment44297> kill? - Ben Mahler On May 31, 2013, 9:20 p.m., Jiang Yan Xu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/11542/ > ----------------------------------------------------------- > > (Updated May 31, 2013, 9:20 p.m.) > > > Review request for mesos, Benjamin Hindman, Vinod Kone, and Ben Mahler. > > > Description > ------- > > - This implementation uses Boost::rational<uint64_t> to store both the bits > and the nanoseconds as integers to preserve precision. > - It requires the boost lib to be repackaged to include Boost::rational. > - The usage 'rational' handles avoid overflow cases better (it doesn't) than > simply multiply the denominators in various arithmetic operations. > - Bandwidth always >= 0 > - Bandwidth constructor passes 'boost::bad_rational' up when the denominator > is zero. > > > Diffs > ----- > > 3rdparty/libprocess/3rdparty/Makefile.am > 7a9ede62145e3150f7af6675d4384feafd9c0a88 > 3rdparty/libprocess/3rdparty/boost-1.53.0.tar.gz > 770d837aaba23d031b04ad77658f339587174aae > 3rdparty/libprocess/3rdparty/stout/Makefile.am > 84062a0e1dfe4ec04bac7cac5ebaac4b945eb66e > 3rdparty/libprocess/3rdparty/stout/include/stout/bandwidth.hpp PRE-CREATION > 3rdparty/libprocess/3rdparty/stout/tests/bandwidth_tests.cpp PRE-CREATION > > Diff: https://reviews.apache.org/r/11542/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Jiang Yan Xu > >
