mesos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jie Yu" <yujie....@gmail.com>
Subject Re: Review Request 18718: Added simple metrics API.
Date Fri, 21 Mar 2014 19:03:01 GMT

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



3rdparty/libprocess/include/process/metrics/counter.hpp
<https://reviews.apache.org/r/18718/#comment70135>

    I don't think we need the __sync call here. Simply to the following is sufficient:
    
    return static_cast<double>(value);
    
    First, we don't use counter for synchronization, as a result, we don't really need memory
barrier here.
    
    Second, since 'value' is a single variable, the cache coherence protocol will make sure
that a read gets the mostly written value (i.e., if some other processor writes to this value,
the cache copies in other processors will be invalidated).
    


- Jie Yu


On March 20, 2014, 9:44 p.m., Dominic Hamon wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/18718/
> -----------------------------------------------------------
> 
> (Updated March 20, 2014, 9:44 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 3c6219eb6e76306463b3710ab7e50ec8b75d3d76 
>   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/src/metrics/metric.cpp PRE-CREATION 
>   3rdparty/libprocess/src/metrics/metrics.hpp PRE-CREATION 
>   3rdparty/libprocess/src/metrics/metrics.cpp PRE-CREATION 
>   3rdparty/libprocess/src/process.cpp 6c6acc03ad78779e8f25b1a4584069fd377f647b 
>   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
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message