​

zoekt: 94 files / 483 matches / 61.23ms neogrok: 20 files / 111 matches

neogrokinternal/trace/trace.go 11 matches | Go | №1

29 if parent := TraceFromContext(ctx); parent != nil {30 tr.LazyPrintf("parent: %s", parent.family)31 trace.family = parent.family + " > " + family
43 44 // LazyPrintf evaluates its arguments with fmt.Sprintf each time the45 // /debug/requests page is rendered. Any memory referenced by a will be46 // pinned until the trace is finished and later discarded.47 func (t *Trace) LazyPrintf(format string, a ...any) {48 t.span.LogFields(Printf("log", format, a...))49 t.trace.LazyPrintf(format, a...)50 }

neogrokapi.go 5 matches | Go | №2

144 var b strings.Builder145 fmt.Fprintf(&b, "%s", what)146 if raw != -1 {147 fmt.Fprintf(&b, "(%s)", strconv.FormatFloat(raw, 'f', -1, 64))148 }149 fmt.Fprintf(&b, ":%.2f, ", computed)150 m.Debug += b.String()
580 func (r RepositoryBranch) String() string {581 return fmt.Sprintf("%s@%s", r.Name, r.Version)582 }
956 func (o *ListOptions) String() string {957 return fmt.Sprintf("%#v", o)958 }

neogrokinternal/e2e/examples/large_file.cc 2 matches | C++ | №3

36 */37 #define TRACE_TXT(...) do { fprintf (stderr, __VA_ARGS__); } while (0)38 #define STACK_TRACE do {} while (0)
40 do { \41 fprintf (stderr, \42 "%s:%d:%s\n", \

neogrokcmd/flags.go 1 match | Go | №4

37 name := filepath.Base(os.Args[0])38 fmt.Printf("%s version %q\n", name, index.Version)39 os.Exit(0)

neogrokweb/server.go 6 matches | Go | №5

67 68 return fmt.Sprintf("%d%s", b, suffix)69 },
73 }74 return fmt.Sprintf("...(%d bytes skipped)...%s", len(pre)-limit, pre[len(pre)-limit:])75 },
79 }80 return fmt.Sprintf("%s...(%d bytes skipped)...", post[:limit], len(post)-limit)81 },
184 if err != nil {185 log.Printf("html template parse error: %v", err)186 t = template.Must(template.New("empty").Parse(""))
201 if err != nil {202 log.Printf("text template parse error: %v", err)203 t = texttemplate.Must(texttemplate.New("empty").Parse(""))

neogrokindex/read.go 2 matches | Go | №6

136 skipSection = true137 log.Printf("encountered unrecognized index section (%s), skipping over it", tag)138
792 rNgram = ngramToRunes(ngram)793 fmt.Printf("%d\t%q\n", ss.sz, string(rNgram[:]))794 }

neogrokindex/eval.go 1 match | Go | №7

98 if len(extFrags) > 0 {99 pattern := fmt.Sprintf("(?i)(%s)$", strings.Join(extFrags, "|"))100 // inlined copy of query.regexpQuery

neogrokquery/query.go 21 matches | Go | №8

70 }71 return fmt.Sprintf("rawConfig:%s", strings.Join(s, "|"))72 }
94 }95 return fmt.Sprintf("%sregex:%q", pref, q.RegexpString())96 }
144 func (s *Symbol) String() string {145 return fmt.Sprintf("sym:%s", s.Expr)146 }
179 func (q *Repo) String() string {180 return fmt.Sprintf("repo:%s", q.Regexp.String())181 }
199 func (q *RepoRegexp) String() string {200 return fmt.Sprintf("reporegex:%q", q.Regexp.String())201 }

neogrokindex/btree.go 2 matches | Go | №9

268 s := ""269 s += fmt.Sprintf("%+v", bt.opts)270 bt.root.visit(func(n node) {
276 for _, key := range nd.keys {277 s += fmt.Sprintf("%d,", key)278 }

neogrokquery/parse.go 2 matches | Go | №10

27 28 var _ = log.Printf29
464 func (t *token) String() string {465 return fmt.Sprintf("%s:%q", tokNames[t.Type], t.Text)466 }

neogrokindex/ctags.go 5 matches | Go | №11

274 if errors.As(err, &timeoutErr) {275 log.Printf("WARN: skipping symbol analysis after timeout: file=%q parser=%s duration=%v timeout=%v size_bytes=%d", m.currentDocName, ctags.ParserToString(parserType), now.Sub(m.currentDocStart).Truncate(time.Second), timeoutErr.Timeout, m.currentDocSize)276 } else if m.currentDocStuckCount > 0 {277 // Inform done if we warned about the current document.278 log.Printf("symbol analysis for %s (size %d bytes) is done and found %d symbols", m.currentDocName, m.currentDocSize, len(entries))279 }
305 m.mu.Lock()306 log.Printf("symbol analysis finished for shard statistics: duration=%v symbols=%d bytes=%d", now.Sub(m.start).Truncate(time.Second), m.totalSymbols, m.totalSize)307 m.mu.Unlock()
316 m.currentDocStuckCount++317 log.Printf("WARN: symbol analysis for %s (%d bytes) has been running for %v", m.currentDocName, m.currentDocSize, running)318 }
323 m.mu.Lock()324 log.Printf("DEBUG: symbol analysis still running for shard statistics: duration=%v symbols=%d bytes=%d", now.Sub(m.start).Truncate(time.Second), m.totalSymbols, m.totalSize)325 m.mu.Unlock()

neogrokindex/score.go 8 matches | Go | №12

82 if opts.DebugScore {83 cs.debugScore = fmt.Sprintf("%s, (line: %d)", bestScore.debugScore, bestLine)84 }
102 if opts.DebugScore {103 ls.debugScore = fmt.Sprintf("tfScore:%.2f, ", score)104 }
111 if s != 0 && opts.DebugScore {112 what += fmt.Sprintf("%s:%.2f, ", w, s)113 }
163 164 addScore(fmt.Sprintf("kind:%s:%s", language, si.Kind), scoreSymbolKind(language, filename, sym, symbolKind))165
182 if opts.DebugScore {183 what += fmt.Sprintf("boost:%.2f, ", m.scoreWeight)184 }

neogrokindex/merge.go 4 matches | Go | №13

45 46 dstName = filepath.Join(dstDir, fmt.Sprintf("compound-%x_v%d.%05d.zoekt", hasher.Sum(nil), NextIndexFormatVersion, 0))47 tmpName = dstName + ".tmp"
86 87 log.Printf("finished shard %s: %d index bytes (overhead %3.1f)", fn, fi.Size(),88 float64(fi.Size())/float64(ib.ContentSize()+1))
194 if err := os.Rename(tmpFn, dstFn); err != nil {195 log.Printf("explode: rename failed: %s", err)196 }
322 _, _ = io.WriteString(h, s)323 return fmt.Sprintf("%x", h.Sum(nil))324 }

neogroksearch/sched.go 2 matches | Go | №14

108 } else {109 log.Printf("ZOEKTSCHED=batchdiv=%d specified. Batch queue size 1/%d of %d.", batchdiv, batchdiv, capacity)110 }
120 } else {121 log.Printf("ZOEKTSCHED=interactiveseconds=%d specified. Search requests will move to batch queue after %d seconds.", interactiveseconds, interactiveseconds)122 }

neogrokquery/regexp.go 2 matches | Go | №15

64 if err != nil {65 log.Printf("failed to copy regexp `%s`: %v", re, err)66 return re
73 if err != nil {74 log.Printf("failed to parse regexp after uncapture `%s`: %v", r, err)75 return re

neogrokweb/snippets.go 2 matches | Go | №16

55 }); err != nil {56 log.Printf("fragment template: %v", err)57 return ""
84 if err != nil {85 log.Printf("url template: %v", err)86 return ""

neogroksearch/shards.go 17 matches | Go | №17

374 375 log.Printf("[INFO] loading %d shard(s): %s", len(keys), humanTruncateList(keys, 5))376
380 if time.Since(lastProgress) > 5*time.Second {381 log.Printf("[INFO] still need to load %d shards...", len(keys)-i)382 lastProgress = time.Now()
396 metricShardsLoadFailedTotal.Inc()397 log.Printf("[ERROR] reloading: %s, err %v ", key, err)398 return
847 tr.LazyLog(q, true)848 tr.LazyPrintf("opts: %+v", opts)849 defer func() {850 if sr != nil {851 tr.LazyPrintf("num files: %d", len(sr.Files))852 tr.LazyPrintf("stats: %+v", sr.Stats)853 }

neogrokindex/builder.go 13 matches | Go | №18

157 158 return fmt.Sprintf("%x", hasher.Sum(nil))159 }
356 if tenant.UseIDBasedShardNames() {357 prefix = fmt.Sprintf("%09d_%09d", o.RepositoryDescription.TenantID, o.RepositoryDescription.ID)358 } else {
441 // reindex content.442 log.Printf("warn: immutable field changed, requires re-index: %s", err)443 return IndexStateContent, fn
676 for tmp := range b.finishedShards {677 log.Printf("Builder.Finish %s", tmp)678 os.Remove(tmp)
799 }800 log.Printf("removing old shard file: %s", p)801 if err := os.Remove(p); err != nil {

neogrokindex/hititer.go 4 matches | Go | №19

47 func (i *distanceHitIterator) String() string {48 return fmt.Sprintf("dist(%d, %v, %v)", i.distance, i.i1, i.i2)49 }
154 func (i *inMemoryIterator) String() string {155 return fmt.Sprintf("mem(%s):%v", i.what, i.postings)156 }
199 func (i *compressedPostingIterator) String() string {200 return fmt.Sprintf("compressed(%s, %d, [%d bytes])", i.what, i._first, len(i.blob))201 }
247 func (i *mergingIterator) String() string {248 return fmt.Sprintf("merge:%v", i.iters)249 }

neogrokgitindex/tree.go 1 match | Go | №20

129 if err := rw.handleSubmodule(p, id, branch, subRepoVersions, ig); err != nil {130 log.Printf("submodule %s: ignoring error %v", p, err)131 }