Details
-
Improvement
-
Resolution: Fixed
-
Major
-
None
-
None
-
None
-
1
Description
Benchmarking is showing that the amount of B/op is ~25-30% higher against 2.3 (what will be) vs 2.2.4. This is primarily due to the fact that we allocate a new map every operation to send attributes (service and operation name) to the meter. We should cache these maps instead, the map should remain quite small due to being limited by the number of operations we actually expose. This is further compounded by both gocb and gocbcore doing this.
This is especially a problem when the NoopMeter is in use, as we allocate these maps before sending to the meter it means that this penalty is paid even when the user doesn't want to use a meter.
We need to pay special attention to any perf impact in doing this, it's going to need to use some sort of concurrent datastructure or locking.
Attachments
For Gerrit Dashboard: GOCBC-1136 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
157025,5 | GOCBC-1136: Cache metrics attributes maps | master | gocbcore | Status: MERGED | +2 | +1 |
157026,3 | GOCBC-1136: Cache metrics attributes map | master | gocb | Status: MERGED | +2 | +1 |