Repository: mesos Updated Branches: refs/heads/master 8e3fa70be -> d72c11cf9
Fixed right angle brackets in perf sampler. Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/d72c11cf Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/d72c11cf Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/d72c11cf Branch: refs/heads/master Commit: d72c11cf9ae80019ccc3ab983e21537b6316cd18 Parents: 8e3fa70 Author: Jie Yu <[email protected]> Authored: Thu Apr 2 11:50:55 2015 -0700 Committer: Jie Yu <[email protected]> Committed: Thu Apr 2 11:50:55 2015 -0700 ---------------------------------------------------------------------- src/linux/perf.cpp | 20 ++++++++++---------- src/linux/perf.hpp | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/d72c11cf/src/linux/perf.cpp ---------------------------------------------------------------------- diff --git a/src/linux/perf.cpp b/src/linux/perf.cpp index 863aa4a..377b6d2 100644 --- a/src/linux/perf.cpp +++ b/src/linux/perf.cpp @@ -118,7 +118,7 @@ public: virtual ~PerfSampler() {} - Future<hashmap<string, mesos::PerfStatistics> > future() + Future<hashmap<string, mesos::PerfStatistics>> future() { return promise.future(); } @@ -181,7 +181,7 @@ private: .onAny(defer(self(), &Self::_sample, lambda::_1)); } - void _sample(const Future<Option<int> >& status) + void _sample(const Future<Option<int>>& status) { if (!status.isReady()) { promise.fail("Failed to get exit status of perf process: " + @@ -202,7 +202,7 @@ private: collect(output).onAny(defer(self(), &Self::__sample, lambda::_1)); } - void __sample(const Future<list<string> >& future) + void __sample(const Future<list<string>>& future) { if (!future.isReady()) { promise.fail("Failed to collect output of perf process: " + @@ -212,7 +212,7 @@ private: } // Parse output from stdout. - Try<hashmap<string, mesos::PerfStatistics> > parse = + Try<hashmap<string, mesos::PerfStatistics>> parse = perf::parse(output.front().get()); if (parse.isError()) { promise.fail("Failed to parse perf output: " + parse.error()); @@ -237,8 +237,8 @@ private: const Duration duration; Time start; Option<Subprocess> perf; - Promise<hashmap<string, mesos::PerfStatistics> > promise; - list<Future<string> > output; + Promise<hashmap<string, mesos::PerfStatistics>> promise; + list<Future<string>> output; }; @@ -275,7 +275,7 @@ Future<mesos::PerfStatistics> sample( const string command = internal::command(events, pids, duration); internal::PerfSampler* sampler = new internal::PerfSampler(command, duration); - Future<hashmap<string, mesos::PerfStatistics> > future = sampler->future(); + Future<hashmap<string, mesos::PerfStatistics>> future = sampler->future(); spawn(sampler, true); return future .then(lambda::bind(&internal::select, PIDS_KEY, lambda::_1)); @@ -294,7 +294,7 @@ Future<mesos::PerfStatistics> sample( } -Future<hashmap<string, mesos::PerfStatistics> > sample( +Future<hashmap<string, mesos::PerfStatistics>> sample( const set<string>& events, const set<string>& cgroups, const Duration& duration) @@ -305,7 +305,7 @@ Future<hashmap<string, mesos::PerfStatistics> > sample( const string command = internal::command(events, cgroups, duration); internal::PerfSampler* sampler = new internal::PerfSampler(command, duration); - Future<hashmap<string, mesos::PerfStatistics> > future = sampler->future(); + Future<hashmap<string, mesos::PerfStatistics>> future = sampler->future(); spawn(sampler, true); return future; } @@ -339,7 +339,7 @@ bool supported() } -Try<hashmap<string, mesos::PerfStatistics> > parse(const string& output) +Try<hashmap<string, mesos::PerfStatistics>> parse(const string& output) { hashmap<string, mesos::PerfStatistics> statistics; http://git-wip-us.apache.org/repos/asf/mesos/blob/d72c11cf/src/linux/perf.hpp ---------------------------------------------------------------------- diff --git a/src/linux/perf.hpp b/src/linux/perf.hpp index dd9299c..b77b61d 100644 --- a/src/linux/perf.hpp +++ b/src/linux/perf.hpp @@ -52,7 +52,7 @@ process::Future<mesos::PerfStatistics> sample( // for duration. The returned hashmap is keyed by cgroup. // NOTE: cgroups should be relative to the perf_event subsystem mount, // e.g., mesos/test for /sys/fs/cgroup/perf_event/mesos/test. -process::Future<hashmap<std::string, mesos::PerfStatistics> > sample( +process::Future<hashmap<std::string, mesos::PerfStatistics>> sample( const std::set<std::string>& events, const std::set<std::string>& cgroup, const Duration& duration); @@ -75,7 +75,7 @@ bool supported(); // Note: Exposed for testing purposes. -Try<hashmap<std::string, mesos::PerfStatistics> > parse( +Try<hashmap<std::string, mesos::PerfStatistics>> parse( const std::string& output); } // namespace perf {
