> On April 9, 2014, 1:02 p.m., Ben Mahler wrote: > > 3rdparty/libprocess/include/process/metrics/metric.hpp, line 15 > > <https://reviews.apache.org/r/18718/diff/21/?file=553931#file553931line15> > > > > Have you considered just calling this 'value'? Snapshot sounds a bit > > opaque as to what this function is to be used for. > > > > What is the purpose of this being an Option<double>? That part is not > > clear and seems unnecessary, when would None() be used? > > Dominic Hamon wrote: > I considered 'snapshot', 'current' and 'value'. Value is too generic and > 'snapshot' was already in use as terminology when I started talking to > people. I'm happy to change this if we can get consensus ;) > > Option is necessary for Gauges. For instance, the system metrics > sometimes return 'None' when a value is not available.
As per discussion - use case for Option can be captured by Future failing. - Dominic ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/18718/#review39921 ----------------------------------------------------------- On April 9, 2014, 2:30 p.m., Dominic Hamon wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/18718/ > ----------------------------------------------------------- > > (Updated April 9, 2014, 2:30 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/metrics/counter.hpp PRE-CREATION > 3rdparty/libprocess/include/process/metrics/gauge.hpp PRE-CREATION > 3rdparty/libprocess/include/process/metrics/metric.hpp PRE-CREATION > 3rdparty/libprocess/include/process/metrics/metrics.hpp PRE-CREATION > 3rdparty/libprocess/src/metrics/metrics.cpp PRE-CREATION > 3rdparty/libprocess/src/tests/metrics_tests.cpp PRE-CREATION > > Diff: https://reviews.apache.org/r/18718/diff/ > > > Testing > ------- > > Added unit tests. make check. > > > Thanks, > > Dominic Hamon > >