1
1
mirror of https://github.com/walles/moar.git synced 2024-11-27 01:05:23 +03:00

Log searches

This commit is contained in:
Johan Walles 2024-05-18 07:55:46 +02:00
parent 856574c289
commit 64ae443e1f

View File

@ -4,6 +4,8 @@ import (
"fmt"
"runtime"
log "github.com/sirupsen/logrus"
"github.com/walles/moar/m/linenumbers"
)
@ -64,6 +66,8 @@ func (p *Pager) findFirstHit(startPosition linenumbers.LineNumber, beforePositio
}
chunkSize := linesCount / chunkCount
log.Debugf("Searching %d lines across %d cores with %d lines per core", linesCount, chunkCount, chunkSize)
// Each parallel search will start at one of these positions
searchStarts := make([]linenumbers.LineNumber, chunkCount)
direction := 1