summaryrefslogtreecommitdiff
path: root/metrics_utils_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* update_engine: Run clang-format on ./ (root directory)Amin Hassani2019-01-161-63/+45
| | | | | | | | | | | BUG=none TEST=unittest Change-Id: Ibd075dc7ea9a18e798f612e35725f1c83c112809 Reviewed-on: https://chromium-review.googlesource.com/1409708 Commit-Ready: Amin Hassani <ahassani@chromium.org> Tested-by: Amin Hassani <ahassani@chromium.org> Reviewed-by: Sen Jiang <senj@chromium.org>
* update_engine: Add disconnected network type for metrics reportingColin Howes2018-11-181-0/+3
| | | | | | | | | | | | | | | | | | On a failed update, correctly report that the network is disconnected rather than reporting an "unknown" network type, which is set when the connection type cannot be determined based on the properties of a given service path. BUG=chromium:660283 TEST=Added relevant unittests. Also tested manually by updating via cros flash, unplugging Ethernet after the transfer, and killing the dev_server. Metrics sends "disconnected" as expected. Change-Id: Ia681b769208b67fb5c14d41a646d816a42ccf33e Reviewed-on: https://chromium-review.googlesource.com/1231700 Commit-Ready: Colin Howes <chowes@google.com> Tested-by: Colin Howes <chowes@google.com> Reviewed-by: Amin Hassani <ahassani@chromium.org>
* Move ParseConnection*() to connection_utils.Sen Jiang2016-06-071-28/+28
| | | | | | | | | | | | | We don't need real_shill_provider if USE_DBUS is 0, but we still need these functions, and they have a duplicate copy in connection_manager, so put them in utils and deduplicate. Also moved StringForConnectionType() to connection_utils. Bug: 28800946 Test: mma Change-Id: If535fdc52bc8fb267921bea02b31d8d6580d5d54
* Move metrics time helpers to metrics_utils.Alex Deymo2015-11-171-0/+133
| | | | | | | | | | | | | | | The metrics module reports metrics periodically, for which it needs to keep track of the duration since some events (for example, the update finished). These helpers were in the common/utils.h, but they rely on the global SystemState to access both Prefs and Clock. Since these helpers are specific to the metric reporting, this CL moves them to the metrics_utils.h module. Bug: 25197634 TEST=FEATURES=test emerge-link update_engine; mmma system/update_engine Change-Id: Ia48091adbdc56c339c69c86c91c5c01aa58c54fb
* common: Split out metrics utils from utils.cc.Alex Deymo2015-11-121-0/+77
The utility functions to convert error codes and network settings to the types defined by the metrics framework are split out the utils.cc file. These tools are only used by the update_engine daemon to report back metrics on an update check. Bug: 25197634 Test: FEATURES=test emerge-link update_engine; mma Change-Id: I589dc9f6056fb1399fa84ca4f44076ed3a6b5365