CRAS: Add histograms for highest device delay

The change is related to CL:1539432. Add histogram infomation in
histograms.xml to make the histogram visible on chromedashboard.

BUG=chromium:907348

Change-Id: I793755096e2325ab769687fc9cf4efd159ec0d86
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1578146
Commit-Queue: Yu-Hsuan Hsu <yuhsuan@chromium.org>
Reviewed-by: Brian White <bcwhite@chromium.org>
Cr-Commit-Position: refs/heads/master@{#653918}
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml
index c4feccb..531c786 100644
--- a/tools/metrics/histograms/histograms.xml
+++ b/tools/metrics/histograms/histograms.xml
@@ -20457,8 +20457,33 @@
   </summary>
 </histogram>
 
+<histogram name="Cras.HighestDeviceDelayInput" expires_after="2020-04-23">
+  <owner>yuhsuan@chromium.org</owner>
+  <owner>chromeos-audio@google.com</owner>
+  <summary>
+    The highest hardware delay of input device in CRAS(ChromeOS audio server).
+    It is calculated by 1000 * highest_hw_level / largest_cb_level. The
+    highest_hw_level is the highest remaining frames in the device. The
+    largest_cb_level is the largest callback threshold of streams which have
+    attached to this device. The value is recorded when the device is removed.
+  </summary>
+</histogram>
+
+<histogram name="Cras.HighestDeviceDelayOutput" expires_after="2020-04-23">
+  <owner>yuhsuan@chromium.org</owner>
+  <owner>chromeos-audio@google.com</owner>
+  <summary>
+    The highest hardware delay of output device in CRAS(ChromeOS audio server).
+    It is calculated by 1000 * highest_hw_level / largest_cb_level. The
+    highest_hw_level is the highest remaining frames in the device. The
+    largest_cb_level is the largest callback threshold of streams which have
+    attached to this device. The value is recorded when the device is removed.
+  </summary>
+</histogram>
+
 <histogram name="Cras.HighestInputHardwareLevel" units="frames">
   <owner>yuhsuan@chromium.org</owner>
+  <owner>chromeos-audio@google.com</owner>
   <summary>
     The highest hardware level of input device in CRAS(Chrome OS audio server).
     The hardware level is the remaining frames in the device. For input device,
@@ -20468,6 +20493,7 @@
 
 <histogram name="Cras.HighestOutputHardwareLevel" units="frames">
   <owner>yuhsuan@chromium.org</owner>
+  <owner>chromeos-audio@google.com</owner>
   <summary>
     The highest hardware level of output device in CRAS(Chrome OS audio server).
     The hardware level is the remaining frames in the device. For output device,
@@ -20478,6 +20504,7 @@
 <histogram name="Cras.MissedCallbackFirstTimeInput" units="seconds"
     expires_after="2020-01-17">
   <owner>yuhsuan@chromium.org</owner>
+  <owner>chromeos-audio@google.com</owner>
   <summary>
     The first time missed callbacks happened on input streams in CRAS (Chrome OS
     audio server). In normal situation, audio thread should follow the callback
@@ -20491,6 +20518,7 @@
 <histogram name="Cras.MissedCallbackFirstTimeOutput" units="seconds"
     expires_after="2020-01-17">
   <owner>yuhsuan@chromium.org</owner>
+  <owner>chromeos-audio@google.com</owner>
   <summary>
     The first time missed callbacks happened on output streams in CRAS (Chrome
     OS audio server). In normal situation, audio thread should follow the
@@ -20504,6 +20532,7 @@
 <histogram name="Cras.MissedCallbackFrequencyInput" units="count"
     expires_after="2020-01-17">
   <owner>yuhsuan@chromium.org</owner>
+  <owner>chromeos-audio@google.com</owner>
   <summary>
     The number of missed callbacks of input streams in a day. It is calculated
     by number of the missed callbacks / runtime of the stream. This value is
@@ -20514,6 +20543,7 @@
 <histogram name="Cras.MissedCallbackFrequencyOutput" units="count"
     expires_after="2020-01-17">
   <owner>yuhsuan@chromium.org</owner>
+  <owner>chromeos-audio@google.com</owner>
   <summary>
     The number of missed callbacks of output streams in a day. It is calculated
     by number of the missed callbacks / runtime of the stream. This value is
@@ -20523,6 +20553,7 @@
 
 <histogram name="Cras.StreamCallbackThreshold" units="frames">
   <owner>yuhsuan@chromium.org</owner>
+  <owner>chromeos-audio@google.com</owner>
   <summary>
     The callback threshold of stream in CRAS(Chrome OS audio server). It is the
     number of frames when to request more from the client. This value is
@@ -20532,6 +20563,7 @@
 
 <histogram name="Cras.StreamFlags" units="value">
   <owner>yuhsuan@chromium.org</owner>
+  <owner>chromeos-audio@google.com</owner>
   <summary>
     The flags of stream in CRAS(Chrome OS audio server). It is the special
     handling for stream. This value is recorded when the stream is created.
@@ -20540,6 +20572,7 @@
 
 <histogram name="Cras.StreamSamplingFormat" enum="AlsaSampleFormatType">
   <owner>yuhsuan@chromium.org</owner>
+  <owner>chromeos-audio@google.com</owner>
   <summary>
     The sampling format of stream in CRAS(Chrome OS audio server). This value is
     recorded when the stream is created.
@@ -20548,6 +20581,7 @@
 
 <histogram name="Cras.StreamSamplingRate" units="bps">
   <owner>yuhsuan@chromium.org</owner>
+  <owner>chromeos-audio@google.com</owner>
   <summary>
     The sampling rate of stream in CRAS(Chrome OS audio server). This value is
     recorded when the stream is created.
@@ -20556,6 +20590,7 @@
 
 <histogram name="Cras.StreamTimeoutMilliSeconds" units="ms">
   <owner>hychao@chromium.org</owner>
+  <owner>chromeos-audio@google.com</owner>
   <summary>
     The longest additional time CRAS(Chrome OS audio server) ever waits for a
     stream exceeding the timeout threshold. This value is recorded per stream
@@ -20566,6 +20601,7 @@
 
 <histogram name="Cras.UnderrunsPerDevice" units="count">
   <owner>yuhsuan@chromium.org</owner>
+  <owner>chromeos-audio@google.com</owner>
   <summary>
     The number of underruns happened on one audio device. Underrun here means
     there are no samples in device buffer while device is playing. It is