mirror of https://github.com/perkeep/perkeep.git
index: ignore recpn log spam, export SetVerboseCorpusLogging for pkg/search tests
Change-Id: Ie18c8db5ab33e94a6c37e3fa19170ac046d864b2
This commit is contained in:
parent
06011342a0
commit
2f9b87ad59
|
@ -130,6 +130,7 @@ func (crashStorage) Find(start, end string) sorted.Iterator {
|
|||
|
||||
var corpusMergeFunc = map[string]func(c *Corpus, k, v []byte) error{
|
||||
"have": nil, // redundant with "meta"
|
||||
"recpn": nil, // unneeded.
|
||||
"meta": (*Corpus).mergeMetaRow,
|
||||
"signerkeyid": (*Corpus).mergeSignerKeyIdRow,
|
||||
"claim": (*Corpus).mergeClaimRow,
|
||||
|
@ -686,3 +687,9 @@ func (c *Corpus) GetImageInfo(fileRef blob.Ref) (ii camtypes.ImageInfo, err erro
|
|||
}
|
||||
return
|
||||
}
|
||||
|
||||
// SetVerboseCorpusLogging controls corpus setup verbosity. It's on by default
|
||||
// but used to disable verbose logging in tests.
|
||||
func SetVerboseCorpusLogging(v bool) {
|
||||
logCorpusStats = v
|
||||
}
|
||||
|
|
|
@ -46,8 +46,8 @@ func BenchmarkCorpusFromStorage(b *testing.B) {
|
|||
id.SetAttribute(pn, "camliContent", fileRef.String())
|
||||
}
|
||||
})
|
||||
defer index.ExpSetLogCorpusStats(true)
|
||||
index.ExpSetLogCorpusStats(false)
|
||||
defer index.SetVerboseCorpusLogging(true)
|
||||
index.SetVerboseCorpusLogging(false)
|
||||
|
||||
b.ResetTimer()
|
||||
|
||||
|
|
|
@ -29,8 +29,6 @@ func ExpUnreverseTimeString(s string) string {
|
|||
return unreverseTimeString(s)
|
||||
}
|
||||
|
||||
func ExpSetLogCorpusStats(v bool) { logCorpusStats = v }
|
||||
|
||||
func ExpNewCorpus() *Corpus {
|
||||
return newCorpus()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue