may use Counter instead of Histogram for Packet IO metrics #32075
Labels
help wanted
Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
type/enhancement
The issue or PR belongs to an enhancement.
type/performance
Enhancement
I found that we use Histogram to track the packet IO, see https://github.com/pingcap/tidb/blob/master/server/packetio.go#L52
But is it necessary to use Histogram here? In the Grafana, We have a Client Traffic Panel, see below, but in the panel, we can see that here we use histogram sum, and we can use a counter instead.
Counter is much faster than Histogram, I wrote a very simple benchmark here:
The text was updated successfully, but these errors were encountered: