summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSiim Sammul <siims@google.com>2021-05-25 08:02:25 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2021-05-25 08:02:25 +0000
commit5141d673650be4f9f645b746459c1775f3e5acf9 (patch)
treea7a92dfc39041bcd3221615df5992829f649aa77
parent5930b62e2f052a473642cc6f50ee35bdba24726b (diff)
parent039b201f7b564d84791e6f230ddc4a98aaf46fcd (diff)
downloadbase-5141d673650be4f9f645b746459c1775f3e5acf9.tar.gz
Merge "Add buckets params to the binder latency atom"
-rw-r--r--core/java/com/android/internal/os/BinderLatencyObserver.java5
-rw-r--r--core/proto/android/internal/binder_latency.proto18
2 files changed, 21 insertions, 2 deletions
diff --git a/core/java/com/android/internal/os/BinderLatencyObserver.java b/core/java/com/android/internal/os/BinderLatencyObserver.java
index 4ca59be4877a..007980150237 100644
--- a/core/java/com/android/internal/os/BinderLatencyObserver.java
+++ b/core/java/com/android/internal/os/BinderLatencyObserver.java
@@ -157,7 +157,10 @@ public class BinderLatencyObserver {
FrameworkStatsLog.BINDER_LATENCY_REPORTED,
atom.getBytes(),
mPeriodicSamplingInterval,
- 1);
+ 1,
+ mBucketCount,
+ mFirstBucketSize,
+ mBucketScaleFactor);
}
private void noteLatencyDelayed() {
diff --git a/core/proto/android/internal/binder_latency.proto b/core/proto/android/internal/binder_latency.proto
index e32c3e3441c5..8b11f5b34645 100644
--- a/core/proto/android/internal/binder_latency.proto
+++ b/core/proto/android/internal/binder_latency.proto
@@ -34,6 +34,7 @@ message Dims {
UNKNOWN_PROCESS_SOURCE = 0;
SYSTEM_SERVER = 1;
TELEPHONY = 2;
+ BLUETOOTH = 3;
}
enum ServiceClassName {
@@ -74,4 +75,19 @@ message ApiStats {
// Stores the count of samples for each bucket. The number of buckets and
// their sizes are controlled server side with a flag.
repeated int32 buckets = 3;
-} \ No newline at end of file
+
+ // Params for histogram buckets.
+ // The number of buckets in the histogram. Store this value separately
+ // as the tail of empty buckets is truncated when stored in the proto to
+ // conserve space. Thus it is not possible to infer this value from there.
+ optional int32 bucket_count = 4;
+
+ // The size (upper bound) of the first bucket (used to avoid creating an
+ // excessive amount of small buckets). E.g. for first_bucket_size of 5, the
+ // first bucket will be [0, 5) and the second will be [5, 5 * scaleFactor).
+ optional int32 first_bucket_size = 5;
+
+ // The rate in which each consecutive bucket increases (before rounding).
+ // Implemented in: com.android.internal.os.BinderLatencyBuckets.
+ optional float scale_factor = 6;
+}