bytes.NewReader
standard libraryThe 143rd most-called standard-library function by production calls. Called 26,659 times across 928 modules; 7,538 of those run outside tests and generated code.
0% in production calls vs 2026-W48 (7,504 → 7,538)
- prod calls
- 7,538
- non-test, non-generated
- all calls
- 26,659
- total callsites
- modules
- 928
- distinct callers
- in loop
- 7%
- of prod calls
- in tests
- 50%
- 13,201 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 →
- Package function100%A direct call to an exported package function, resolved by type.
estimate
Estimated relative cost
Roughly 0.00× the estimated relative cost of fmt.Sprintf . Benchmarked at 1.99 ns/op × 7,538 production calls, normalized so fmt.Sprintf = 1.0.
This is not dollars and not a verdict. Per-op time depends heavily on inputs (argument sizes, contention, patterns), the benchmark ran on a single machine (darwin/arm64 (Apple Silicon), go1.26.0), and static call counts are not runtime frequency. How this is estimated →
who calls this
Notable callers
Production calls into NewReader from notable Go projects. Open one on the map to see what else it hammers.
- Grafana 208 3%
- Kubernetes 188 2%
- MinIO 157 2%
- containerd 137 2%
- Docker 114 2%
where it's called
Callsites in the wild
12 representative callsites of 26,659, prioritizing in-loop and non-test usage. We link to source, never display it.
- in loop
- in loop
-
cockroachdb/cockroach @v19.2.12+incompatible
in loop -
miekg/dns @v0.6.152
internal/dnsperf/dnsperf.go:64
in loop - in loop
-
docker/distribution @v2.8.3+incompatible
in loop -
encr.dev @v1.58.10
pkg/emulators/storage/gcsemu/batch.go:48
in loop - in loop
-
gitea.dev @v1.27.3
services/mailer/incoming/incoming_handler.go:89
in loop -
cli/cli @v1.14.0
in loop -
AlexxIT/go2rtc @v1.10.0
in loop -
Binject/debug @v0.0.0-20261126045459-e12a5013357a
in loop
top callers
The modules that reach for it
The modules that call NewReader most in this snapshot.
- github.com/elastic/go-elasticsearch/v82,60110%
- github.com/aws/aws-sdk-go-v2/service/ec21,7226%
- github.com/seaweedfs/seaweedfs5832%
- github.com/parquet-go/parquet-go5812%
- github.com/aliyun/alibabacloud-oss-go-sdk-v24662%
siblings
More from bytes
The other most-called functions in this package. See all →