mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 21:54:10 -08:00
92a3eeac55
* Refactor: extract function to make scrapeLoop for testing Signed-off-by: Bryan Boreham <bjboreham@gmail.com> * Add benchmarks for ScrapeLoopAppend For Prometheus and OpenMetrics Signed-off-by: Bryan Boreham <bjboreham@gmail.com> * Create less garbage when parsing metrics Exemplar escapes to heap due to being passed through text-parser interface, but we can reduce the impact by hoisting it out of the loop and resetting it after every use. (Note the cost was paid on every line even when exemplars were disabled) Signed-off-by: Bryan Boreham <bjboreham@gmail.com> * Create less garbage when parsing OpenMetrics After calling parseLVals() we always append the return value, so pass in what we want to append it to and save garbage. Signed-off-by: Bryan Boreham <bjboreham@gmail.com> |
||
---|---|---|
.. | ||
interface.go | ||
openmetricslex.l | ||
openmetricslex.l.go | ||
openmetricsparse.go | ||
openmetricsparse_test.go | ||
promlex.l | ||
promlex.l.go | ||
promparse.go | ||
promparse_test.go | ||
promtestdata.nometa.txt | ||
promtestdata.txt | ||
README.md |
Making changes to textparse lexers
In the rare case that you need to update the textparse lexers, edit promlex.l or openmetricslex.l and then run the following command:
golex -o=promlex.l.go promlex.l
Note that you need golex installed:
go get -u modernc.org/golex