Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Unified Diff: chromeos/dbus/debug_daemon_client.h

Issue 1218583002: metrics: Add dbus interface for GetRandomPerfOutput (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Check has_ms_after_login() instead of ms_after_login() value Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | chromeos/dbus/debug_daemon_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/debug_daemon_client.h
diff --git a/chromeos/dbus/debug_daemon_client.h b/chromeos/dbus/debug_daemon_client.h
index 85b1ccd02b65875652bc465459ee1f6ba11a6118..9a4d678d8e6b04a2f2c1ea09f6aae62d8ba30844 100644
--- a/chromeos/dbus/debug_daemon_client.h
+++ b/chromeos/dbus/debug_daemon_client.h
@@ -15,10 +15,6 @@
#include "chromeos/dbus/dbus_client.h"
#include "third_party/cros_system_api/dbus/service_constants.h"
-namespace metrics {
-class PerfDataProto;
-}
-
namespace chromeos {
// DebugDaemonClient is used to communicate with the debug daemon.
@@ -93,9 +89,26 @@ class CHROMEOS_EXPORT DebugDaemonClient : public DBusClient {
GetPerfDataCallback;
// Runs perf for |duration| seconds and returns data collected.
+ // TODO(sque): This is being replaced by GetPerfOutput(). Remove this function
+ // and the above callback typedef when the new function is running.
virtual void GetPerfData(uint32_t duration,
const GetPerfDataCallback& callback) = 0;
+ // Called once GetPerfOutput() is complete only if the the data is
+ // successfully obtained from debugd.
+ // Arguments:
+ // - The status from running perf.
+ // - Output from "perf record", in PerfDataProto format.
+ // - Output from "perf stat", in PerfStatProto format.
+ using GetPerfOutputCallback =
+ base::Callback<void(int status,
+ const std::vector<uint8>& perf_data,
+ const std::vector<uint8>& perf_stat)>;
+
+ // Runs perf for |duration| seconds and returns data collected.
+ virtual void GetPerfOutput(uint32_t duration,
+ const GetPerfOutputCallback& callback) = 0;
+
// Callback type for GetScrubbedLogs(), GetAllLogs() or GetUserLogFiles().
typedef base::Callback<void(bool succeeded,
const std::map<std::string, std::string>& logs)>
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | chromeos/dbus/debug_daemon_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698