shotover / shotover-proxy

L7 data-layer proxy
https://docs.shotover.io
Apache License 2.0
84 stars 16 forks source link

#1649 Leak query counter name to improve QueryCounter performance #1669

Closed justinweng-instaclustr closed 3 months ago

justinweng-instaclustr commented 3 months ago

Stores QueryCounter's counter_name as &'static str (i.e., leaks the counter_name string so that its memory allocation is not freed for the lifetime of the shotover process. This should improve shotover performance as it reduces cloning.

We can observe minor improvement in query_counter benchmark regarding allocating and freeing memory.

image

Progress towards #1649.

codspeed-hq[bot] commented 3 months ago

CodSpeed Performance Report

Merging #1669 will not alter performance

Comparing justinweng-instaclustr:1649-leak-query-counter-name (a83ec27) with main (b540be8)

Summary

✅ 38 untouched benchmarks