blob: bbb91a3f95957c6ac018c7b1c5e6a50ab0035407 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
package importer
import (
"log/slog"
"searchix/internal/config"
"searchix/internal/index"
"testing"
)
var cfg = config.DefaultConfig
func BenchmarkImporterLowMemory(b *testing.B) {
tmp := b.TempDir()
cfg.LogLevel = slog.LevelDebug
_, write, _, err := index.OpenOrCreate(tmp, false, &index.Options{
LowMemory: true,
})
if err != nil {
b.Fatal(err)
}
err = Start(&cfg, write, false, &[]string{"nixpkgs"})
if err != nil {
b.Fatal(err)
}
}
|