Chromium Code Reviews| Index: update_attempter.cc | 
| diff --git a/update_attempter.cc b/update_attempter.cc | 
| index b5d9644970e94abc67efd75a35cca9247f839654..76a0d6349a10fd9e2ef63c0af9c8079deb13c88d 100644 | 
| --- a/update_attempter.cc | 
| +++ b/update_attempter.cc | 
| @@ -13,7 +13,10 @@ | 
| #include <tr1/memory> | 
| #include <string> | 
| #include <vector> | 
| + | 
| #include <glib.h> | 
| + | 
| +#include "metrics/metrics_library.h" | 
| #include "update_engine/dbus_service.h" | 
| #include "update_engine/download_action.h" | 
| #include "update_engine/filesystem_copier_action.h" | 
| @@ -205,6 +208,14 @@ void UpdateAttempter::ProcessingDone(const ActionProcessor* processor, | 
| if (code == kActionCodeSuccess) { | 
| SetStatusAndNotify(UPDATE_STATUS_UPDATED_NEED_REBOOT); | 
| utils::WriteFile(kUpdateCompletedMarker, "", 0); | 
| + | 
| + // Report the time it took to update the system. | 
| + int64_t update_time = time(NULL) - last_checked_time_; | 
| + metrics_lib_->SendToUMA("Installer.UpdateTime", | 
| 
 
adlr
2010/07/20 00:08:57
s/Installer/UpdateEngine/?
 
petkov
2010/07/20 00:19:44
The convention we've been trying to follow is to k
 
 | 
| + static_cast<int>(update_time), // sample | 
| + 1, // min = 1 second | 
| + 20 * 60, // max = 20 minutes | 
| 
 
adlr
2010/07/20 00:08:57
i could definitely see the long tail of updates ta
 
petkov
2010/07/20 00:19:44
The default histogram layout is exponential -- sma
 
 | 
| + 50); // buckets | 
| } else { | 
| LOG(INFO) << "Update failed."; | 
| SetStatusAndNotify(UPDATE_STATUS_IDLE); |