Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(350)

Unified Diff: content/common/inter_process_time_ticks_converter.h

Issue 481443003: Add UMA histograms for the inter-process TimeTicks skew. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/common/inter_process_time_ticks_converter.h
diff --git a/content/common/inter_process_time_ticks_converter.h b/content/common/inter_process_time_ticks_converter.h
index 01c6124288db3499d6ce6c0df9a261e50c771beb..8b005408d58a0a2d04f3e233251617f91b1322cf 100644
--- a/content/common/inter_process_time_ticks_converter.h
+++ b/content/common/inter_process_time_ticks_converter.h
@@ -61,6 +61,16 @@ class CONTENT_EXPORT InterProcessTimeTicksConverter {
// |remote_delta|.
LocalTimeDelta ToLocalTimeDelta(const RemoteTimeDelta& remote_delta) const;
+ // Returns true iff the TimeTicks are converted by adding a constant, without
+ // scaling. This is the case whenever the remote timespan is smaller than the
+ // local timespan, which should be the majority of cases due to IPC overhead.
+ bool IsSkewAdditiveForMetrics() const;
+
+ // Returns the (remote time) - (local time) difference estimated by the
+ // converter. This is the constant that is subtracted from remote TimeTicks to
+ // get local TimeTicks when no scaling is applied.
+ base::TimeDelta GetSkewForMetrics() const;
+
private:
int64 Convert(int64 value) const;

Powered by Google App Engine
This is Rietveld 408576698