​

zoekt: 93 files / 478 matches / 52.49ms neogrok: 20 files / 122 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 }
962 func (o *ListOptions) String() string {963 return fmt.Sprintf("%#v", o)964 }

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 5 matches | Go | №5

68 69 return fmt.Sprintf("%d%s", b, suffix)70 },
74 }75 return fmt.Sprintf("...(%d bytes skipped)...%s", len(pre)-limit, pre[len(pre)-limit:])76 },
80 }81 return fmt.Sprintf("%s...(%d bytes skipped)...", post[:limit], len(post)-limit)82 },
185 if err != nil {186 log.Printf("text template parse error: %v", err)187 t = texttemplate.Must(texttemplate.New("empty").Parse(""))
258 if err != nil {259 http.Error(w, fmt.Sprintf("not ready: %v", err), http.StatusInternalServerError)260 return

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

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

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 }

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

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 | №10

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 | №11

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

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

49 50 dstName = filepath.Join(dstDir, fmt.Sprintf("compound-%x_v%d.%05d.zoekt", hasher.Sum(nil), NextIndexFormatVersion, 0))51 tmpName = dstName + ".tmp"
90 91 log.Printf("finished shard %s: %d index bytes (overhead %3.1f)", fn, fi.Size(),92 float64(fi.Size())/float64(ib.ContentSize()+1))
198 if err := os.Rename(tmpFn, dstFn); err != nil {199 log.Printf("explode: rename failed: %s", err)200 }
326 _, _ = io.WriteString(h, s)327 return fmt.Sprintf("%x", h.Sum(nil))328 }

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

137 } else {138 log.Printf("ZOEKTSCHED=batchdiv=%d specified. Batch queue size 1/%d of %d.", batchdiv, batchdiv, capacity)139 }
149 } else {150 log.Printf("ZOEKTSCHED=interactiveseconds=%d specified. Search requests will move to batch queue after %d seconds.", interactiveseconds, interactiveseconds)151 }

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

68 if err != nil {69 log.Printf("failed to copy regexp `%s`: %v", re, err)70 return re
77 if err != nil {78 log.Printf("failed to parse regexp after uncapture `%s`: %v", r, err)79 return re

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

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 | №16

411 412 log.Printf("[INFO] loading %d shard(s): %s", len(keys), humanTruncateList(keys, 5))413
417 if time.Since(lastProgress) > 5*time.Second {418 log.Printf("[INFO] still need to load %d shards...", len(keys)-i)419 lastProgress = time.Now()
433 metricShardsLoadFailedTotal.Inc()434 log.Printf("[ERROR] reloading: %s, err %v ", key, err)435 return
884 tr.LazyLog(q, true)885 tr.LazyPrintf("opts: %+v", opts)886 defer func() {887 if sr != nil {888 tr.LazyPrintf("num files: %d", len(sr.Files))889 tr.LazyPrintf("stats: %+v", sr.Stats)890 }

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

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 | №18

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 | №19

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

neogrokgitindex/index.go 14 matches | Go | №20

108 }109 return fmt.Sprintf("{{URLJoinPath %s}}", strings.Join(parts, " "))110 }
309 310 remoteURL = fmt.Sprintf("ssh+git://%s@%s/%s", user, host, path)311 }
375 376 remoteURL = fmt.Sprintf("ssh+git://%s@%s/%s", user, host, path)377 }
546 if err := setTemplatesFromRepo(&opts.BuildOptions.RepositoryDescription, repo, opts.RepoDir); err != nil {547 log.Printf("setTemplatesFromRepo(%s): %s", opts.RepoDir, err)548 }
595 if err != nil {596 log.Printf("delta build: falling back to normal build since delta build failed, repository=%q, err=%s", opts.BuildOptions.RepositoryDescription.Name, err)597 opts.BuildOptions.IsDelta = false