> On April 10, 2014, 12:27 p.m., Ben Mahler wrote: > > 3rdparty/libprocess/include/process/statistics.hpp, lines 82-84 > > <https://reviews.apache.org/r/20047/diff/2/?file=549754#file549754line82> > > > > 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.
it just saves the double lookup and interpolation. I'm happy to take it out. > On April 10, 2014, 12:27 p.m., Ben Mahler wrote: > > 3rdparty/libprocess/include/process/statistics.hpp, line 77 > > <https://reviews.apache.org/r/20047/diff/2/?file=549754#file549754line77> > > > > 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. I prefer normalizing 'p' in this case as it's the input to the method. The other CHECKs can be trivially removed when this is set and were there for debugging. > On April 10, 2014, 12:27 p.m., Ben Mahler wrote: > > 3rdparty/libprocess/include/process/statistics.hpp, line 86 > > <https://reviews.apache.org/r/20047/diff/2/?file=549754#file549754line86> > > > > 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! i find the first more readable (and it saves a whole lookup! ;)) but agree 'interp' is not necessary. - Dominic ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/20047/#review40057 ----------------------------------------------------------- On April 14, 2014, 1:36 p.m., Dominic Hamon wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/20047/ > ----------------------------------------------------------- > > (Updated April 14, 2014, 1:36 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/3rdparty/stout/include/stout/net.hpp > 97a09a17e5d3790a60c499aca3215f2808222542 > 3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp > 38756617ead1b6651e44ab989871ea3e68d130df > 3rdparty/libprocess/3rdparty/stout/tests/net_tests.cpp > 988b18f8c486dce23ce85d451e53700f49331237 > 3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp > 94eb256d24bc001660d63bd91b608988205a3d09 > 3rdparty/libprocess/Makefile.am d707ad759dacd16e0177e14f1bf5ece9e4ce2491 > 3rdparty/libprocess/include/process/collect.hpp > f4d39b72e40fd658add56edce282cd48f863dedd > 3rdparty/libprocess/include/process/future.hpp > f394a969170c07e9f326816a0ddff54a72a124a1 > 3rdparty/libprocess/include/process/metrics/counter.hpp > f4774ada4dbe3fa18b5a8b204f97f59ca015b3c1 > 3rdparty/libprocess/include/process/metrics/gauge.hpp > 4f5c1086ac3553319431283165c5451df1a0ee3f > 3rdparty/libprocess/include/process/metrics/metric.hpp > ea64f699fd9ec38745d84c7523133709827f96db > 3rdparty/libprocess/include/process/metrics/metrics.hpp > c20bb639e8ef79de63f0d0d56c2ea40a15a1f995 > 3rdparty/libprocess/include/process/statistics.hpp > a4f1db3a8a219c39193a1d237477f0350e47e681 > 3rdparty/libprocess/src/metrics/metrics.cpp > 391295aea91e837bb856a40ef51d1c33d44371d8 > 3rdparty/libprocess/src/process.cpp > 9654c0437edb43cff65dbefdf08dee9e18ef96ab > 3rdparty/libprocess/src/statistics.cpp > 75aac4074d33cb5054da6c8b0bd4a890c2eaf80e > 3rdparty/libprocess/src/tests/metrics_tests.cpp > 0cc9f4bcbbb03ac3a9a2d57f64b944443fcb94bb > 3rdparty/libprocess/src/tests/process_tests.cpp > ff0ee757c75732a2a99b5dac1aa43a7db8a60158 > 3rdparty/libprocess/src/tests/statistics_tests.cpp > 3521bd565dae8fcbba464f2539b3b14a37a037f0 > 3rdparty/libprocess/src/timeseries.cpp PRE-CREATION > Makefile.am b91d8cf011832e6e91b16f03a2d80fbb601eba8f > docs/getting-started.md 8640ddd9ca98f656dcb05934902dcb25824bd03c > docs/high-availability.md d8a4dd3b5685f0397df5c874a0e6c055cd4d6a3f > docs/home.md 6a512dead55c0645d640161d3e90e6299dec95db > docs/mesos-frameworks.md 56e540e8eff8d7c67685f8a0313d80ba48bcef63 > src/slave/containerizer/mesos_containerizer.cpp > 1ce41d71eb13582b46d240d48f0508bdc3e7ef10 > src/slave/slave.hpp 08f6005f57e6b74b657496da1d245531c1614594 > src/slave/slave.cpp cddb241f12f3ca19d3ab3069b6d8399c2e3ea9bd > src/tests/containerizer_tests.cpp 6c48146ede2a47ff340efb6d813d787efe93fb3f > src/tests/environment.hpp 9cf14bcc8f7d386f6aa26b686d3f953c969aaf63 > src/tests/environment.cpp 1267b3e55fa2b3683d7dfa2856dc8a8571cdaaf7 > src/tests/flags.hpp a003e7fca5e7461cdbb5c62ff9909a287d1b3bd7 > src/tests/main.cpp 442be5109a941fc1db5b183c8e00add44e0cab68 > support/release.sh 633bbace091bddd582b9fcef5d35b331a0f169f0 > > Diff: https://reviews.apache.org/r/20047/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Dominic Hamon > >
