prometheus/model/labels
Bryan Boreham 579331446a
Allow downstream projects to use faster regexp (#10251)
* Add benchmark for FastRegexMatcher

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>

* Use modified regexp package with optimisations

See https://github.com/grafana/regexp/tree/speedup#readme

Includes the following changes proposed upstream:
* [regexp: allow patterns with no alternates to be one-pass](https://go-review.googlesource.com/c/go/+/353711)
* [regexp: speed up onepass prefix check](https://go-review.googlesource.com/c/go/+/354909)
* [regexp: handle prefix string with fold-case](https://go-review.googlesource.com/c/go/+/358756)
* [regexp: avoid copying each instruction executed](https://go-review.googlesource.com/c/go/+/355789)
* [regexp: allow prefix string anchored at beginning](https://go-review.googlesource.com/c/go/+/377294)

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>

* Use regexp code identical to upstream Go

Change `grafana/regexp` import to use `main` branch.

This means Prometheus is not using the proposed optimisations, but
downstream users of Prometheus code are able to `replace` the library
with the `speedup` branch which does.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2022-02-08 11:03:20 +01:00
..
labels.go Move packages out of deprecated pkg directory 2021-11-09 08:03:10 +01:00
labels_test.go Move packages out of deprecated pkg directory 2021-11-09 08:03:10 +01:00
matcher.go Move packages out of deprecated pkg directory 2021-11-09 08:03:10 +01:00
matcher_test.go Move packages out of deprecated pkg directory 2021-11-09 08:03:10 +01:00
regexp.go Allow downstream projects to use faster regexp (#10251) 2022-02-08 11:03:20 +01:00
regexp_test.go Allow downstream projects to use faster regexp (#10251) 2022-02-08 11:03:20 +01:00
test_utils.go Move packages out of deprecated pkg directory 2021-11-09 08:03:10 +01:00