Commit 38e1bbce authored by rkaplow's avatar rkaplow Committed by Commit bot

Remove the majority of the high-traffic Net.AsyncResourceHandler histograms.

Specifically:
Net.AsyncResourceHandler_PendingDataCount
Net.AsyncResourceHandler_PendingDataCount_WhenFull
Net.AsyncResourceHandler_SharedIOBuffer_Alloc
Net.AsyncResourceHandler_SharedIOBuffer_Used
Net.AsyncResourceHandler_SharedIOBuffer_UsedPercentage

Are any of these still looked at? They are still all unowned.

I've left Net.AsyncResourceHandler_RedirectHopTime since that is specifically owned by bnc@. Is this histogram still useful?

BUG=469288

Review URL: https://codereview.chromium.org/1025813002

Cr-Commit-Position: refs/heads/master@{#322011}
parent 3aa7a6ea
......@@ -12,7 +12,7 @@
#include "base/debug/alias.h"
#include "base/logging.h"
#include "base/memory/shared_memory.h"
#include "base/metrics/histogram.h"
#include "base/metrics/histogram_macros.h"
#include "base/strings/string_number_conversions.h"
#include "base/time/time.h"
#include "content/browser/devtools/devtools_netlog_observer.h"
......@@ -59,11 +59,6 @@ void InitializeResourceBufferConstants() {
GetNumericArg("resource-buffer-max-allocation-size", &kMaxAllocationSize);
}
int CalcUsedPercentage(int bytes_read, int buffer_size) {
double ratio = static_cast<double>(bytes_read) / buffer_size;
return static_cast<int>(ratio * 100.0 + 0.5); // Round to nearest integer.
}
} // namespace
class DependentIOBuffer : public net::WrappedIOBuffer {
......@@ -256,9 +251,6 @@ bool AsyncResourceHandler::OnWillRead(scoped_refptr<net::IOBuffer>* buf,
*buf = new DependentIOBuffer(buffer_.get(), memory);
*buf_size = allocation_size_;
UMA_HISTOGRAM_CUSTOM_COUNTS(
"Net.AsyncResourceHandler_SharedIOBuffer_Alloc",
*buf_size, 0, kMaxAllocationSize, 100);
return true;
}
......@@ -274,13 +266,6 @@ bool AsyncResourceHandler::OnReadCompleted(int bytes_read, bool* defer) {
buffer_->ShrinkLastAllocation(bytes_read);
UMA_HISTOGRAM_CUSTOM_COUNTS(
"Net.AsyncResourceHandler_SharedIOBuffer_Used",
bytes_read, 0, kMaxAllocationSize, 100);
UMA_HISTOGRAM_PERCENTAGE(
"Net.AsyncResourceHandler_SharedIOBuffer_UsedPercentage",
CalcUsedPercentage(bytes_read, allocation_size_));
if (!sent_first_data_msg_) {
base::SharedMemoryHandle handle;
int size;
......@@ -300,14 +285,8 @@ bool AsyncResourceHandler::OnReadCompleted(int bytes_read, bool* defer) {
filter->Send(new ResourceMsg_DataReceived(
GetRequestID(), data_offset, bytes_read, encoded_data_length));
++pending_data_count_;
UMA_HISTOGRAM_CUSTOM_COUNTS(
"Net.AsyncResourceHandler_PendingDataCount",
pending_data_count_, 0, 100, 100);
if (!buffer_->CanAllocate()) {
UMA_HISTOGRAM_CUSTOM_COUNTS(
"Net.AsyncResourceHandler_PendingDataCount_WhenFull",
pending_data_count_, 0, 100, 100);
*defer = did_defer_ = true;
OnDefer();
}
......
......@@ -16565,6 +16565,9 @@ Therefore, the affected-histogram name has to have at least one dot in it.
</histogram>
<histogram name="Net.AsyncResourceHandler_PendingDataCount">
<obsolete>
Deprecated 03/2015.
</obsolete>
<owner>Please list the metric's owners. Add more owner tags as needed.</owner>
<summary>
The count of unacknowledged ResourceMsg_DataReceived messages. This message
......@@ -16573,6 +16576,9 @@ Therefore, the affected-histogram name has to have at least one dot in it.
</histogram>
<histogram name="Net.AsyncResourceHandler_PendingDataCount_WhenFull">
<obsolete>
Deprecated 03/2015.
</obsolete>
<owner>Please list the metric's owners. Add more owner tags as needed.</owner>
<summary>
The count of unacknowledged ResourceMsg_DataReceived messages at the point
......@@ -16590,17 +16596,26 @@ Therefore, the affected-histogram name has to have at least one dot in it.
</histogram>
<histogram name="Net.AsyncResourceHandler_SharedIOBuffer_Alloc" units="bytes">
<obsolete>
Deprecated 03/2015.
</obsolete>
<owner>Please list the metric's owners. Add more owner tags as needed.</owner>
<summary>The size of a SharedIOBuffer allocation.</summary>
</histogram>
<histogram name="Net.AsyncResourceHandler_SharedIOBuffer_Used" units="bytes">
<obsolete>
Deprecated 03/2015.
</obsolete>
<owner>Please list the metric's owners. Add more owner tags as needed.</owner>
<summary>The number of bytes copied into a SharedIOBuffer.</summary>
</histogram>
<histogram name="Net.AsyncResourceHandler_SharedIOBuffer_UsedPercentage"
units="percentage">
<obsolete>
Deprecated 03/2015.
</obsolete>
<owner>Please list the metric's owners. Add more owner tags as needed.</owner>
<summary>
The percentage of a SharedIOBuffer allocation that is actually used.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment