zoekt: 86 files / 468 matches / 65.41ms neogrok: 20 files / 116 matches

github.com/sourcegraph/zoektinternal/trace/trace.go 11 matches | Go | №1

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

github.com/sourcegraph/zoektapi.go 5 matches | Go | №2

143 var b strings.Builder144 fmt.Fprintf(&b, "%s", what)145 if raw != -1 {146 fmt.Fprintf(&b, "(%s)", strconv.FormatFloat(raw, 'f', -1, 64))147 }148 fmt.Fprintf(&b, ":%.2f, ", computed)149 m.Debug += b.String()
572 func (r RepositoryBranch) String() string {573 return fmt.Sprintf("%s@%s", r.Name, r.Version)574 }
948 func (o *ListOptions) String() string {949 return fmt.Sprintf("%#v", o)950 }

github.com/isker/neogrokyarn.lock 3 matches | YAML | №3

1789 dependencies:1790 sprintf-js: "npm:~1.0.2"1791 checksum: 10c0/b2972c5c23c63df66bca144dbc65d180efa74f25f8fd9b7d9a0a6c88ae839db32df3d54770dcb6460cf840d232b60695d1a6b1053f599d84e73f7437087712de
4281 4282 "sprintf-js@npm:~1.0.2":4283 version: 1.0.34284 resolution: "sprintf-js@npm:1.0.3"4285 checksum: 10c0/ecadcfe4c771890140da5023d43e190b7566d9cf8b2d238600f31bec0fc653f328da4450eb04bd59a431771a8e9cc0e118f0aa3974b683a4981b4e07abc2a5bb

github.com/sourcegraph/zoektcmd/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)

github.com/sourcegraph/zoektweb/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 },
181 if err != nil {182 log.Printf("html template parse error: %v", err)183 t = template.Must(template.New("empty").Parse(""))
198 if err != nil {199 log.Printf("text template parse error: %v", err)200 t = texttemplate.Must(texttemplate.New("empty").Parse(""))

github.com/sourcegraph/zoektindex/read.go 2 matches | Go | №6

135 skipSection = true136 log.Printf("encountered unrecognized index section (%s), skipping over it", tag)137
786 rNgram = ngramToRunes(ngram)787 fmt.Printf("%d\t%q\n", ss.sz, string(rNgram[:]))788 }

github.com/sourcegraph/zoektindex/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

github.com/sourcegraph/zoektquery/query.go 21 matches | Go | №8

70 }71 return fmt.Sprintf("rawConfig:%s", strings.Join(s, "|"))72 }
89 }90 return fmt.Sprintf("%sregex:%q", pref, syntaxutil.RegexpString(q.Regexp))91 }
128 func (s *Symbol) String() string {129 return fmt.Sprintf("sym:%s", s.Expr)130 }
163 func (q *Repo) String() string {164 return fmt.Sprintf("repo:%s", q.Regexp.String())165 }
183 func (q *RepoRegexp) String() string {184 return fmt.Sprintf("reporegex:%q", q.Regexp.String())185 }

github.com/sourcegraph/zoektindex/btree.go 4 matches | Go | №9

268 s := ""269 s += fmt.Sprintf("%+v", bt.opts)270 bt.root.visit(func(n node) {
274 case *innerNode:275 s += fmt.Sprintf("[")276 for _, key := range nd.keys {277 s += fmt.Sprintf("%d,", key)278 }279 s = s[:len(s)-1] // remove trailing comma280 s += fmt.Sprintf("]")281

github.com/sourcegraph/zoektquery/parse.go 2 matches | Go | №10

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

github.com/sourcegraph/zoektindex/ctags.go 4 matches | Go | №11

267 if m.currentDocStuckCount > 0 {268 log.Printf("symbol analysis for %s (size %d bytes) is done and found %d symbols", m.currentDocName, m.currentDocSize, len(entries))269 m.currentDocStuckCount = 0
294 m.mu.Lock()295 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)296 m.mu.Unlock()
305 m.currentDocStuckCount++306 log.Printf("WARN: symbol analysis for %s (%d bytes) has been running for %v", m.currentDocName, m.currentDocSize, running)307 }
312 m.mu.Lock()313 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)314 m.mu.Unlock()

github.com/sourcegraph/zoektindex/score.go 9 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 }

github.com/sourcegraph/zoektindex/merge.go 4 matches | Go | №13

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

github.com/sourcegraph/zoektsearch/sched.go 2 matches | Go | №14

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

github.com/sourcegraph/zoektquery/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

github.com/sourcegraph/zoektweb/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 ""

github.com/sourcegraph/zoektindex/builder.go 13 matches | Go | №17

153 154 return fmt.Sprintf("%x", hasher.Sum(nil))155 }
341 if tenant.UseIDBasedShardNames() {342 prefix = fmt.Sprintf("%09d_%09d", o.RepositoryDescription.TenantID, o.RepositoryDescription.ID)343 } else {
425 // reindex content.426 log.Printf("warn: immutable field changed, requires re-index: %s", err)427 return IndexStateContent, fn
655 for tmp := range b.finishedShards {656 log.Printf("Builder.Finish %s", tmp)657 os.Remove(tmp)
778 }779 log.Printf("removing old shard file: %s", p)780 if err := os.Remove(p); err != nil {

github.com/sourcegraph/zoektsearch/shards.go 19 matches | Go | №18

305 306 log.Printf("[INFO] loading %d shard(s): %s", len(keys), humanTruncateList(keys, 5))307
311 if time.Since(lastProgress) > 5*time.Second {312 log.Printf("[INFO] still need to load %d shards...", len(keys)-i)313 lastProgress = time.Now()
327 metricShardsLoadFailedTotal.Inc()328 log.Printf("[ERROR] reloading: %s, err %v ", key, err)329 return
533 tr.LazyLog(q, true)534 tr.LazyPrintf("opts: %+v", opts)535 defer func() {536 if sr != nil {537 tr.LazyPrintf("num files: %d", len(sr.Files))538 tr.LazyPrintf("stats: %+v", sr.Stats)539 }

github.com/sourcegraph/zoektindex/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 }
198 func (i *compressedPostingIterator) String() string {199 return fmt.Sprintf("compressed(%s, %d, [%d bytes])", i.what, i._first, len(i.blob))200 }
239 func (i *mergingIterator) String() string {240 return fmt.Sprintf("merge:%v", i.iters)241 }

github.com/sourcegraph/zoektgitindex/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 }