mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-19 07:01:02 +01:00
a5c427bac4
Allocations are reduced by implementing custom json parser via fastjson
lib.
The change also re-uses `promInstant` object in attempt to reduce number
of
allocations when parsing big responses, as usually happens with heavy
recording rules.
```
name old allocs/op new allocs/op delta
ParsePrometheusResponse/Instant-10 9.65k ± 0% 5.60k ± 0% ~ (p=1.000 n=1+1)
```
Signed-off-by: hagen1778 <roman@victoriametrics.com>
---------
Signed-off-by: hagen1778 <roman@victoriametrics.com>
(cherry picked from commit
|
||
---|---|---|
.. | ||
testdata | ||
datasource_test.go | ||
datasource.go | ||
faker.go | ||
init.go | ||
vm_graphite_api.go | ||
vm_prom_api_test.go | ||
vm_prom_api_timing_test.go | ||
vm_prom_api.go | ||
vm_test.go | ||
vm.go |