summaryrefslogtreecommitdiff
path: root/metrics_utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'metrics_utils.h')
-rw-r--r--metrics_utils.h31
1 files changed, 3 insertions, 28 deletions
diff --git a/metrics_utils.h b/metrics_utils.h
index 8f1aad1e..3aac4e5b 100644
--- a/metrics_utils.h
+++ b/metrics_utils.h
@@ -22,16 +22,14 @@
#include <base/time/time.h>
#include "update_engine/common/clock_interface.h"
+#include "update_engine/common/connection_utils.h"
#include "update_engine/common/error_code.h"
+#include "update_engine/common/metrics_constants.h"
+#include "update_engine/common/metrics_reporter_interface.h"
#include "update_engine/common/prefs_interface.h"
-#include "update_engine/connection_utils.h"
-#include "update_engine/metrics_constants.h"
-#include "update_engine/metrics_reporter_interface.h"
namespace chromeos_update_engine {
-class SystemState;
-
namespace metrics_utils {
// Transforms a ErrorCode value into a metrics::DownloadErrorCode.
@@ -50,29 +48,6 @@ metrics::AttemptResult GetAttemptResult(ErrorCode code);
metrics::ConnectionType GetConnectionType(ConnectionType type,
ConnectionTethering tethering);
-// This function returns the duration on the wallclock since the last
-// time it was called for the same |state_variable_key| value.
-//
-// If the function returns |true|, the duration (always non-negative)
-// is returned in |out_duration|. If the function returns |false|
-// something went wrong or there was no previous measurement.
-bool WallclockDurationHelper(SystemState* system_state,
- const std::string& state_variable_key,
- base::TimeDelta* out_duration);
-
-// This function returns the duration on the monotonic clock since the
-// last time it was called for the same |storage| pointer.
-//
-// You should pass a pointer to a 64-bit integer in |storage| which
-// should be initialized to 0.
-//
-// If the function returns |true|, the duration (always non-negative)
-// is returned in |out_duration|. If the function returns |false|
-// something went wrong or there was no previous measurement.
-bool MonotonicDurationHelper(SystemState* system_state,
- int64_t* storage,
- base::TimeDelta* out_duration);
-
// Returns the persisted value from prefs for the given key. It also
// validates that the value returned is non-negative.
int64_t GetPersistedValue(const std::string& key, PrefsInterface* prefs);