You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Mesos Reviewbot <re...@mesos.apache.org> on 2017/07/01 07:01:11 UTC

Re: Review Request 60545: Optimized use of DispatchEvent by lazy evaluation of method value.

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



Patch looks great!

Reviews applied: [60008, 60545]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' CONFIGURATION='--verbose' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker-build.sh

- Mesos Reviewbot


On June 29, 2017, 5:08 p.m., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60545/
> -----------------------------------------------------------
> 
> (Updated June 29, 2017, 5:08 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov and Michael Park.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> DispatchEvent contains value of pointer-to-member function stored in
> std::string, which is calculated each time DispatchEvent object is
> constructed. However, this value is used only in tests (see
> FUTURE_DISPATCH), imposing unnecessary overhead in production.
> This patch introduces lazy evolution of pointer-to-member by storing
> std::function object instead of std::string. Wrapper function captures
> value of pointer-to-member function and returns its stringified version
> on invocation. This function invoked by demand in test code, hence
> mitigating overhead of evaluation and storing value of pointer to
> member function.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/include/process/dispatch.hpp 3a0793888dc0df5e3ec31b06f47cd920c71e0db9 
>   3rdparty/libprocess/include/process/event.hpp 8afe6266eb0dc5a17af35d79efb6bfdf9e6a0ee9 
>   3rdparty/libprocess/include/process/gmock.hpp e9af943b39436f365fe687301febb5c7fbefffc4 
>   3rdparty/libprocess/src/process.cpp 8ff37d1b5781c42f96be2da391ed000158eea7b8 
> 
> 
> Diff: https://reviews.apache.org/r/60545/diff/1/
> 
> 
> Testing
> -------
> 
> 1. make check (mac os x 10.12, fedora 25)
> 2. internal CI
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>