math/rand.Rand.Float64
standard libraryThe 3794th most-called standard-library method by production calls. Called 428 times across 78 modules; 156 of those run outside tests and generated code.
- prod calls
- 156
- non-test, non-generated
- all calls
- 428
- total callsites
- modules
- 78
- distinct callers
- in loop
- 37%
- of prod calls
- in tests
- 64%
- 272 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 method96%A method on a value whose type is known exactly.
- Embedded method3%Reached through an embedded type.
- Method value<1%A method captured as a value, then called.
estimate
Estimated relative cost
Roughly 0.00× the estimated relative cost of fmt.Sprintf . Benchmarked at 2.44 ns/op × 156 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 Rand.Float64 from notable Go projects. Open one on the map to see what else it hammers.
- MinIO 28 18%
- CockroachDB 16 10%
- Kubernetes 16 10%
- HashiCorp 5 3%
- InfluxDB 3 2%
where it's called
Callsites in the wild
12 representative callsites of 428, prioritizing in-loop and non-test usage. We link to source, never display it.
-
cockroachdb/cockroach @v19.2.12+incompatible
in loop -
TheAlgorithms/Go @v0.0.3-alpha
in loop - in loop
-
fogleman/primitive @v0.0.0-20200504002142-0373c216458b
in loop - in loop
-
inancgumus/learngo @v0.0.0-20250624230352-3c475a78e543
in loop - in loop
- in loop
-
steveyegge/beads @v1.1.2
in loop - in loop
- in loop
- in loop
top callers
The modules that reach for it
The modules that call Rand.Float64 most in this snapshot.
- github.com/cockroachdb/cockroach6916%
- github.com/fogleman/gg6515%
- github.com/minio/minio276%
- github.com/kubernetes/kubernetes215%
- github.com/fogleman/primitive164%
siblings
More from math/rand
The other most-called members in this package. See all →