Fixed indentation in perf.cpp.
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/dbf35da4 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/dbf35da4 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/dbf35da4 Branch: refs/heads/master Commit: dbf35da460f85d98a06b670899eaa2fd6d4003d0 Parents: 1709e8a Author: Benjamin Mahler <[email protected]> Authored: Wed Aug 5 16:30:04 2015 -0700 Committer: Benjamin Mahler <[email protected]> Committed: Wed Aug 5 16:30:04 2015 -0700 ---------------------------------------------------------------------- src/linux/perf.cpp | 90 ++++++++++++++++++++++++------------------------- 1 file changed, 45 insertions(+), 45 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/dbf35da4/src/linux/perf.cpp ---------------------------------------------------------------------- diff --git a/src/linux/perf.cpp b/src/linux/perf.cpp index 5d4cb61..cb1a13d 100644 --- a/src/linux/perf.cpp +++ b/src/linux/perf.cpp @@ -296,56 +296,56 @@ private: await(perf.get().status(), io::read(perf.get().out().get()), io::read(perf.get().err().get())) - .onReady(defer(self(), [this](const tuple< - Future<Option<int>>, - Future<string>, - Future<string>>& results) { - Future<Option<int>> status = std::get<0>(results); - Future<string> output = std::get<1>(results); - - Option<Error> error = None(); - - if (!status.isReady()) { - error = Error("Failed to execute perf: " + - (status.isFailed() ? status.failure() : "discarded")); - } else if (status.get().isNone()) { - error = Error("Failed to execute perf: failed to reap"); - } else if (status.get().get() != 0) { - error = Error("Failed to collect perf statistics: " + - WSTRINGIFY(status.get().get())); - } else if (!output.isReady()) { - error = Error("Failed to read perf output: " + - (output.isFailed() ? output.failure() : "discarded")); - } + .onReady(defer(self(), [this](const tuple< + Future<Option<int>>, + Future<string>, + Future<string>>& results) { + Future<Option<int>> status = std::get<0>(results); + Future<string> output = std::get<1>(results); + + Option<Error> error = None(); + + if (!status.isReady()) { + error = Error("Failed to execute perf: " + + (status.isFailed() ? status.failure() : "discarded")); + } else if (status.get().isNone()) { + error = Error("Failed to execute perf: failed to reap"); + } else if (status.get().get() != 0) { + error = Error("Failed to collect perf statistics: " + + WSTRINGIFY(status.get().get())); + } else if (!output.isReady()) { + error = Error("Failed to read perf output: " + + (output.isFailed() ? output.failure() : "discarded")); + } - if (error.isSome()) { - promise.fail(error.get().message); - terminate(self()); - return; - } + if (error.isSome()) { + promise.fail(error.get().message); + terminate(self()); + return; + } - // Parse output from stdout. - Try<hashmap<string, mesos::PerfStatistics>> parse = - perf::parse(output.get()); + // Parse output from stdout. + Try<hashmap<string, mesos::PerfStatistics>> parse = + perf::parse(output.get()); - if (parse.isError()) { - promise.fail("Failed to parse perf output: " + parse.error()); - terminate(self()); - return; - } + if (parse.isError()) { + promise.fail("Failed to parse perf output: " + parse.error()); + terminate(self()); + return; + } - // Create a non-const copy from the Try<> so we can set the - // timestamp and duration. - hashmap<string, mesos::PerfStatistics> statistics = parse.get(); - foreachvalue (mesos::PerfStatistics& s, statistics) { - s.set_timestamp(start.secs()); - s.set_duration(duration.secs()); - } + // Create a non-const copy from the Try<> so we can set the + // timestamp and duration. + hashmap<string, mesos::PerfStatistics> statistics = parse.get(); + foreachvalue (mesos::PerfStatistics& s, statistics) { + s.set_timestamp(start.secs()); + s.set_duration(duration.secs()); + } - promise.set(statistics); - terminate(self()); - return; - })); + promise.set(statistics); + terminate(self()); + return; + })); } const vector<string> argv;
