zoekt: 88 files / 463 matches / 56.43ms neogrok: 20 files / 119 matches

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

42 if parent := TraceFromContext(ctx); parent != nil {43 tr.LazyPrintf("parent: %s", parent.family)44 trace.family = parent.family + " > " + family
56 57 // LazyPrintf evaluates its arguments with fmt.Sprintf each time the58 // /debug/requests page is rendered. Any memory referenced by a will be59 // pinned until the trace is finished and later discarded.60 func (t *Trace) LazyPrintf(format string, a ...interface{}) {61 t.span.LogFields(Printf("log", format, a...))62 t.trace.LazyPrintf(format, a...)63 }

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 }
945 func (o *ListOptions) String() string {946 return fmt.Sprintf("%#v", o)947 }

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

1605 dependencies:1606 sprintf-js: "npm:~1.0.2"1607 checksum: 10c0/b2972c5c23c63df66bca144dbc65d180efa74f25f8fd9b7d9a0a6c88ae839db32df3d54770dcb6460cf840d232b60695d1a6b1053f599d84e73f7437087712de
4192 4193 "sprintf-js@npm:~1.0.2":4194 version: 1.0.34195 resolution: "sprintf-js@npm:1.0.3"4196 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

63 64 return fmt.Sprintf("%d%s", b, suffix)65 },
69 }70 return fmt.Sprintf("...(%d bytes skipped)...%s", len(pre)-limit, pre[len(pre)-limit:])71 },
75 }76 return fmt.Sprintf("%s...(%d bytes skipped)...", post[:limit], len(post)-limit)77 },
141 if err != nil {142 log.Printf("html template parse error: %v", err)143 t = template.Must(template.New("empty").Parse(""))
158 if err != nil {159 log.Printf("text template parse error: %v", err)160 t = texttemplate.Must(texttemplate.New("empty").Parse(""))

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

131 skipSection = true132 log.Printf("encountered unrecognized index section (%s), skipping over it", tag)133
677 rNgram = ngramToRunes(ngram)678 fmt.Printf("%d\t%q\n", ss.sz, string(rNgram[:]))679 }

github.com/sourcegraph/zoektindex/eval.go 1 match | Go | №7

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

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

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

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

26 27 var _ = log.Printf28
371 func (t *token) String() string {372 return fmt.Sprintf("%s:%q", tokNames[t.Type], t.Text)373 }

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 8 matches | Go | №12

80 if opts.DebugScore {81 cs.debugScore = fmt.Sprintf("%s, (line: %d)", bestScore.debugScore, bestLine)82 }
100 if opts.DebugScore {101 ls.debugScore = fmt.Sprintf("tfScore:%.2f, ", score)102 }
109 if s != 0 && opts.DebugScore {110 what += fmt.Sprintf("%s:%.2f, ", w, s)111 }
161 162 addScore(fmt.Sprintf("kind:%s:%s", language, si.Kind), scoreSymbolKind(language, filename, sym, symbolKind))163
180 if opts.DebugScore {181 what += fmt.Sprintf("boost:%.2f, ", m.scoreWeight)182 }

github.com/sourcegraph/zoektindex/merge.go 3 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))
264 _, _ = io.WriteString(h, s)265 return fmt.Sprintf("%x", h.Sum(nil))266 }

github.com/sourcegraph/zoektquery/regexp.go 2 matches | Go | №14

62 if err != nil {63 log.Printf("failed to copy regexp `%s`: %v", re, err)64 return re
71 if err != nil {72 log.Printf("failed to parse regexp after uncapture `%s`: %v", r, err)73 return re

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

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

149 hasher.Write([]byte(h.ctagsPath))150 hasher.Write([]byte(fmt.Sprintf("%t", h.cTagsMustSucceed)))151 hasher.Write([]byte(fmt.Sprintf("%d", h.sizeMax)))152 hasher.Write([]byte(fmt.Sprintf("%q", h.largeFiles)))153 hasher.Write([]byte(fmt.Sprintf("%t", h.disableCTags)))154 155 return fmt.Sprintf("%x", hasher.Sum(nil))156 }

github.com/sourcegraph/zoektindex/hititer.go 4 matches | Go | №17

46 func (i *distanceHitIterator) String() string {47 return fmt.Sprintf("dist(%d, %v, %v)", i.distance, i.i1, i.i2)48 }
153 func (i *inMemoryIterator) String() string {154 return fmt.Sprintf("mem(%s):%v", i.what, i.postings)155 }
197 func (i *compressedPostingIterator) String() string {198 return fmt.Sprintf("compressed(%s, %d, [%d bytes])", i.what, i._first, len(i.blob))199 }
238 func (i *mergingIterator) String() string {239 return fmt.Sprintf("merge:%v", i.iters)240 }

github.com/sourcegraph/zoektcmd/zoekt/main.go 8 matches | Go | №18

44 if list {45 fmt.Printf("%s%s%s\n", r, f.FileName, addTabIfNonEmpty(f.Debug))46 continue
50 l := bytes.TrimSuffix(m.Line, []byte{'\n'})51 fmt.Printf("%s%s:%d:%s%s\n", r, f.FileName, m.LineNumber, l, addTabIfNonEmpty(f.Debug))52 }
85 }86 log.Printf("repo metadata: %#v", repo)87 log.Printf("index metadata: %#v", index)88 }
170 name := os.Args[0]171 fmt.Fprintf(os.Stderr, "Usage:\n\n %s [option] QUERY\n"+172 "for example\n\n %s byte file:java -file:test\n\n", name, name)

github.com/sourcegraph/zoektindex/matchtree.go 13 matches | Go | №19

509 func (t *docMatchTree) String() string {510 return fmt.Sprintf("doc(%s)", t.reason)511 }
513 func (t *andMatchTree) String() string {514 return fmt.Sprintf("and%v", t.children)515 }
521 }522 return fmt.Sprintf("%sre(%s)", f, t.regexp)523 }
529 }530 return fmt.Sprintf("%sword(%s)", f, t.word)531 }
533 func (t *orMatchTree) String() string {534 return fmt.Sprintf("or%v", t.children)535 }

github.com/sourcegraph/zoektindex/indexdata.go 3 matches | Go | №20

274 if err != nil {275 log.Printf("error reading newline index for document %d on shard %s: %v", i, d.file.Name(), err)276 continue
290 func (d *indexData) String() string {291 return fmt.Sprintf("shard(%s)", d.file.Name())292 }
384 func (r *ngramIterationResults) String() string {385 return fmt.Sprintf("wrapper(%v)", r.matchIterator)386 }