Skip to content
callcount

go.mongodb.org/mongo-driver/mongo.Database.Collection

third-party

The 6702nd most-called third-party method by production calls. Called 139 times across 1 modules; 89 of those run outside tests and generated code.

53% in production calls vs 2026-W37 (190 → 89)

All of go.mongodb.org/mongo-driver/mongo → Docs on pkg.go.dev ↗

prod calls
89
non-test, non-generated
all calls
139
total callsites
modules
1
distinct callers
in loop
4%
of prod calls
in tests
36%
50 calls
resolved
100%
to a known target

resolution mix

How each call resolves

How each call was attributed. Only resolved kinds, where the target function is known, count toward the ranking. Interface dispatch and unresolved receivers are reported separately and never guessed. Read the taxonomy →

  • Concrete method100%A method on a value whose type is known exactly.

where it's called

Callsites in the wild

12 representative callsites of 139, prioritizing in-loop and non-test usage. We link to source, never display it.

Database.Collection · 12 of 139 callsites
  • go.mongodb.org/mongo-driver @v1.17.10

    mongo/integration/unified/admin_helpers.go:69

    in loop
  • go.mongodb.org/mongo-driver @v1.17.10

    cmd/testoidcauth/main.go:225

    in loop
  • go.mongodb.org/mongo-driver @v1.17.10

    mongo/integration/mtest/mongotest.go:426

    in loop
  • go.mongodb.org/mongo-driver @v1.17.10

    mongo/integration/mtest/mongotest.go:531

    in loop
  • go.mongodb.org/mongo-driver @v1.17.10

    benchmark/operation_test.go:45

    in loop test
  • go.mongodb.org/mongo-driver @v1.17.10

    benchmark/operation_test.go:89

    in loop test
  • go.mongodb.org/mongo-driver @v1.17.10

    benchmark/operation_test.go:138

    in loop test
  • go.mongodb.org/mongo-driver @v1.17.10

    mongo/integration/gridfs_test.go:300

    in loop test
  • go.mongodb.org/mongo-driver @v1.17.10

    mongo/client_test.go:375

    in loop test
  • go.mongodb.org/mongo-driver @v1.17.10

    mongo/integration/change_stream_test.go:450

    in loop test
  • go.mongodb.org/mongo-driver @v1.17.10

    cmd/testaws/main.go:36

  • go.mongodb.org/mongo-driver @v1.17.10

    benchmark/multi.go:36

top callers

The modules that reach for it

The modules that call Database.Collection most in this snapshot.

  • go.mongodb.org/mongo-driver139100%

siblings

More from go.mongodb.org/mongo-driver/mongo

The other most-called members in this package. See all →