Skip to content

Benchmark in-memory, index-only search

Warren Gifford requested to merge core/benchmark-do-results into master

Created by: mrnugget

This adds a benchmark for searchResolver.Results() that uses as few mocks as possible.

In order to make this benchmark possible, we had to change the code to allow for the injection of *searchbackend.Zoekt into the resolver. This removes a lot of calls to the global IndexedSearch() function and replaces them either with accesses to the injected r.zoekt attribute.

It also includes one quick performance improvement that reduces memory allocations by roughly ~30%

Test plan: go test ./...

Merge request reports

Loading