summaryrefslogtreecommitdiffstats
path: root/dbus/object_proxy.h
diff options
context:
space:
mode:
authorsatorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-06 20:53:30 +0000
committersatorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-06 20:53:30 +0000
commita733898942fc96ec09b7ddacef6152051390317f (patch)
tree213ac0c01492d5f0d1df32114aee3b13581a6cab /dbus/object_proxy.h
parent6bd91debb17f5790401f3a28da1d71bc0d1a83ce (diff)
downloadchromium_src-a733898942fc96ec09b7ddacef6152051390317f.zip
chromium_src-a733898942fc96ec09b7ddacef6152051390317f.tar.gz
chromium_src-a733898942fc96ec09b7ddacef6152051390317f.tar.bz2
Add some histograms to the D-Bus library:
- DBus.SyncMethodCallTime: time spent to perform synchronos method calls - DBus.AsyncMethodCallTime: time spent to perform asynchronos method calls - DBus.SyncMethodCallSuccess: success ratio of synchronous method calls - DBus.AsyncMethodCallSuccess: success ratio of asynchronous method calls - DBus.ExportedMethodHandleTime: time spent to handle calls to export methods - DBus.ExportedMethodHandleSuccess: success ratio of the exported method calls - DBus.SignalHandleTime: time spent to handle signals - DBus.SignalSendTime: time spent to send signals BUG=chromium:90036 TEST=dbus_unittests Review URL: http://codereview.chromium.org/7824054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99811 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'dbus/object_proxy.h')
-rw-r--r--dbus/object_proxy.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/dbus/object_proxy.h b/dbus/object_proxy.h
index f75e330..ffd59c2 100644
--- a/dbus/object_proxy.h
+++ b/dbus/object_proxy.h
@@ -13,6 +13,7 @@
#include "base/callback.h"
#include "base/memory/ref_counted.h"
+#include "base/time.h"
class MessageLoop;
@@ -116,25 +117,30 @@ class ObjectProxy : public base::RefCountedThreadSafe<ObjectProxy> {
// OnPendingCallIsCompleteThunk().
struct OnPendingCallIsCompleteData {
OnPendingCallIsCompleteData(ObjectProxy* in_object_proxy,
- ResponseCallback in_response_callback);
+ ResponseCallback in_response_callback,
+ base::TimeTicks start_time);
~OnPendingCallIsCompleteData();
ObjectProxy* object_proxy;
ResponseCallback response_callback;
+ base::TimeTicks start_time;
};
// Starts the async method call. This is a helper function to implement
// CallMethod().
void StartAsyncMethodCall(int timeout_ms,
void* request_message,
- ResponseCallback response_callback);
+ ResponseCallback response_callback,
+ base::TimeTicks start_time);
// Called when the pending call is complete.
void OnPendingCallIsComplete(DBusPendingCall* pending_call,
- ResponseCallback response_callback);
+ ResponseCallback response_callback,
+ base::TimeTicks start_time);
// Runs the response callback with the given response object.
void RunResponseCallback(ResponseCallback response_callback,
+ base::TimeTicks start_time,
void* response_message);
// Redirects the function call to OnPendingCallIsComplete().
@@ -160,7 +166,9 @@ class ObjectProxy : public base::RefCountedThreadSafe<ObjectProxy> {
DBusMessage* raw_message);
// Runs the method. Helper function for HandleMessage().
- void RunMethod(SignalCallback signal_callback, Signal* signal);
+ void RunMethod(base::TimeTicks start_time,
+ SignalCallback signal_callback,
+ Signal* signal);
// Redirects the function call to HandleMessage().
static DBusHandlerResult HandleMessageThunk(DBusConnection* connection,