1
1
mirror of https://github.com/walles/moar.git synced 2024-09-11 12:15:43 +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" "fmt"
"runtime" "runtime"
log "github.com/sirupsen/logrus"
"github.com/walles/moar/m/linenumbers" "github.com/walles/moar/m/linenumbers"
) )
@ -64,6 +66,8 @@ func (p *Pager) findFirstHit(startPosition linenumbers.LineNumber, beforePositio
} }
chunkSize := linesCount / chunkCount 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 // Each parallel search will start at one of these positions
searchStarts := make([]linenumbers.LineNumber, chunkCount) searchStarts := make([]linenumbers.LineNumber, chunkCount)
direction := 1 direction := 1