0
0
Fork 0

scorch indexing time stat

Looks like this was forgotten along the way -- the stat for analysis
time was tracked correctly, but indexing time wasn't.
This commit is contained in:
Steve Yen 2018-03-02 11:07:37 -08:00
parent 3fe7e2e4f4
commit 868a66279e
1 changed files with 5 additions and 0 deletions

View File

@ -278,6 +278,8 @@ func (s *Scorch) Batch(batch *index.Batch) (err error) {
atomic.AddUint64(&s.stats.TotAnalysisTime, uint64(time.Since(start)))
indexStart := time.Now()
// notify handlers that we're about to introduce a segment
s.fireEvent(EventKindBatchIntroductionStart, 0)
@ -303,6 +305,9 @@ func (s *Scorch) Batch(batch *index.Batch) (err error) {
atomic.AddUint64(&s.stats.TotBatches, 1)
atomic.AddUint64(&s.stats.TotIndexedPlainTextBytes, numPlainTextBytes)
}
atomic.AddUint64(&s.stats.TotIndexTime, uint64(time.Since(indexStart)))
return err
}