Index: dbus/object_proxy.cc |
diff --git a/dbus/object_proxy.cc b/dbus/object_proxy.cc |
index c8f00d7cbc35bd200900fb8b93f55b2a96eae115..79ab5046c95b2110f111326e9a20438f21391fbc 100644 |
--- a/dbus/object_proxy.cc |
+++ b/dbus/object_proxy.cc |
@@ -12,6 +12,7 @@ |
#include "base/stringprintf.h" |
#include "base/threading/thread.h" |
#include "base/threading/thread_restrictions.h" |
+#include "dbus/dbus_statistics.h" |
#include "dbus/message.h" |
#include "dbus/object_path.h" |
#include "dbus/object_proxy.h" |
@@ -83,6 +84,9 @@ Response* ObjectProxy::CallMethodAndBlock(MethodCall* method_call, |
UMA_HISTOGRAM_ENUMERATION("DBus.SyncMethodCallSuccess", |
response_message ? 1 : 0, |
kSuccessRatioHistogramMaxValue); |
+ DbusStatistics::AddSentCall(service_name_, |
satorux1
2012/11/12 00:40:43
This is a synchronous method call. We might want t
stevenjb
2012/11/12 19:46:40
That's makes sense. Done.
|
+ method_call->GetInterface(), |
+ method_call->GetMember()); |
if (!response_message) { |
LogMethodCallFailure(method_call->GetInterface(), |
@@ -144,6 +148,10 @@ void ObjectProxy::CallMethodWithErrorCallback(MethodCall* method_call, |
callback, |
error_callback, |
start_time); |
+ DbusStatistics::AddSentCall(service_name_, |
+ method_call->GetInterface(), |
+ method_call->GetMember()); |
+ |
// Wait for the response in the D-Bus thread. |
bus_->PostTaskToDBusThread(FROM_HERE, task); |
} |
@@ -438,6 +446,8 @@ DBusHandlerResult ObjectProxy::HandleMessage( |
const std::string interface = signal->GetInterface(); |
const std::string member = signal->GetMember(); |
+ DbusStatistics::AddReceivedCall(service_name_, interface, member); |
+ |
// Check if we know about the signal. |
const std::string absolute_signal_name = GetAbsoluteSignalName( |
interface, member); |