go-graphite / carbonapi

Implementation of graphite API (graphite-web) in golang
Other
308 stars 140 forks source link

Fix delay for negative steps and optimize perfomance #708

Closed msaf1980 closed 2 years ago

msaf1980 commented 2 years ago
carbonapi]$ benchcmp delay1.txt delay2.txt 
benchmark            old ns/op     new ns/op     delta
BenchmarkDelay-6     68379         5183          -92.42%

benchmark            old allocs     new allocs     delta
BenchmarkDelay-6     2059           11             -99.47%

benchmark            old bytes     new bytes     delta
BenchmarkDelay-6     99328         33872         -65.90%