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

Unified Diff: base/android/java/src/org/chromium/base/metrics/RecordHistogram.java

Issue 2477513004: android: Record the memory size of the GSA process. (Closed)
Patch Set: . Created 4 years, 1 month 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: base/android/java/src/org/chromium/base/metrics/RecordHistogram.java
diff --git a/base/android/java/src/org/chromium/base/metrics/RecordHistogram.java b/base/android/java/src/org/chromium/base/metrics/RecordHistogram.java
index 7548fc5ecf65155a2cf2fb2d27cc10aa1c673dcd..0db654ff816f15c7e36da13cb647625ab25a1828 100644
--- a/base/android/java/src/org/chromium/base/metrics/RecordHistogram.java
+++ b/base/android/java/src/org/chromium/base/metrics/RecordHistogram.java
@@ -203,6 +203,19 @@ public class RecordHistogram {
}
/**
+ * Records a sample in a histogram of sizes in KB. This is the Java equivalent of the
+ * UMA_HISTOGRAM_MEMORY_KB C++ macro.
+ *
+ * Good for sizes up to 500e6 bytes.
+ *
+ * @param name name of the histogram.
+ * @param sizeInkB Sample to record in KB.
+ */
+ public static void recordMemoryKBHistogram(String name, int sizeInKB) {
+ recordCustomCountHistogram(name, sizeInKB, 1000, 500000, 50);
+ }
+
+ /**
* Records a sample in a histogram of times with custom buckets. This is the Java equivalent of
* the UMA_HISTOGRAM_CUSTOM_TIMES C++ macro.
* @param name name of the histogram

Powered by Google App Engine
This is Rietveld 408576698