prometheus/promql
Tobias Guggenmos ac3932ea35 Improve PromQL parser performance by making it non-concurrent (#6356)
Before this commit, the PromQL parser ran in two goroutines:
* The lexer goroutine that splits the input into tokens and sent them over a channel to
* the parser goroutine which produces the abstract syntax tree

The Problem with this approach is that the parser spends more time on goroutine creation
and syncronisation than on actual parsing.

This commit removes that concurrency and replaces the channel by a slice based buffer.

Benchmarks show that this makes the up to 7 times faster than before.

Signed-off-by: Tobias Guggenmos <tguggenm@redhat.com>
2019-11-21 18:43:09 +00:00
..
fuzz-data textparse: Add fuzzing and fix bug caught 2017-07-07 11:12:17 +02:00
testdata Fix scalar-vector comparisons (#5454) 2019-04-11 10:42:16 +01:00
ast.go *: enable all default linters (#5504) 2019-05-03 15:11:28 +02:00
bench_test.go Refactor testutil.NewStorage into a new package 2019-08-08 19:43:04 -06:00
engine_test.go promql: Move tests to testutil (#6103) 2019-10-09 18:06:53 -06:00
engine.go fix word 'substracting' to 'subtracting' (#5822) 2019-08-01 15:44:38 +01:00
functions_test.go Refactor testutil.NewStorage into a new package 2019-08-08 19:43:04 -06:00
functions.go refine error handling in prometheus (#5388) 2019-03-26 00:01:12 +01:00
fuzz.go fix fuzz targets (#5851) 2019-08-12 20:47:57 +02:00
lex_test.go Improve PromQL parser performance by making it non-concurrent (#6356) 2019-11-21 18:43:09 +00:00
lex.go Improve PromQL parser performance by making it non-concurrent (#6356) 2019-11-21 18:43:09 +00:00
parse_test.go Improve PromQL parser performance by making it non-concurrent (#6356) 2019-11-21 18:43:09 +00:00
parse.go promql: Eliminate dead code (#6215) 2019-10-25 10:18:20 +02:00
printer_test.go promql: Move tests to testutil (#6103) 2019-10-09 18:06:53 -06:00
printer.go Correctly handle {__name__="a"} (#5552) 2019-05-11 00:46:15 +01:00
promql_test.go promql: Move tests to testutil (#6103) 2019-10-09 18:06:53 -06:00
quantile.go func name ref correct "qauntile" -> "quantile" (#5834) 2019-08-06 06:11:16 +01:00
query_logger_test.go Merge the 2.13 release branch (#6169) 2019-10-18 02:21:58 +03:00
query_logger.go Merge the 2.13 release branch (#6169) 2019-10-18 02:21:58 +03:00
test_test.go Fix some spelling issues (#5361) 2019-03-14 14:38:54 +00:00
test.go Third correction (#6012) 2019-09-20 10:48:56 +01:00
value.go fix word 'seriess' to 'series' (#5828) 2019-08-04 16:52:51 +01:00