- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 788 for Mallocs (0.12 sec)
-
src/runtime/mstats.go
// Size is the maximum byte size of an object in this // size class. Size uint32 // Mallocs is the cumulative count of heap objects // allocated in this size class. The cumulative bytes // of allocation is Size*Mallocs. The number of live // objects in this size class is Mallocs - Frees. Mallocs uint64 // Frees is the cumulative count of heap objects freed // in this size class. Frees uint64
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 08 21:03:13 UTC 2024 - 34.2K bytes - Viewed (0) -
src/runtime/metrics_test.go
t.Error("allocs-by-size and frees-by-size counts don't match in length") } else { for i := range objects.alloc.Buckets { ba := objects.alloc.Buckets[i] bf := objects.free.Buckets[i] if ba != bf { t.Errorf("bucket %d is different for alloc and free hists: %f != %f", i, ba, bf) } } if !t.Failed() { var gotAlloc, gotFree uint64 want := objects.total for i := range objects.alloc.Counts {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 17:52:17 UTC 2024 - 45K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/compile.go
var stats string if logMemStats { var mEnd runtime.MemStats runtime.ReadMemStats(&mEnd) nBytes := mEnd.TotalAlloc - mStart.TotalAlloc nAllocs := mEnd.Mallocs - mStart.Mallocs stats = fmt.Sprintf("[%d ns %d allocs %d bytes]", time, nAllocs, nBytes) } else { stats = fmt.Sprintf("[%d ns]", time) } if f.Log() { f.Logf(" pass %s end %s\n", p.name, stats) printFunc(f)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 22 14:55:18 UTC 2024 - 18.6K bytes - Viewed (0) -
src/testing/benchmark.go
return 0 } return (float64(r.Bytes) * float64(r.N) / 1e6) / r.T.Seconds() } // AllocsPerOp returns the "allocs/op" metric, // which is calculated as r.MemAllocs / r.N. func (r BenchmarkResult) AllocsPerOp() int64 { if v, ok := r.Extra["allocs/op"]; ok { return int64(v) } if r.N <= 0 { return 0 } return int64(r.MemAllocs) / int64(r.N) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 23.9K bytes - Viewed (0) -
src/runtime/export_test.go
bySize[i].Frees += m.smallFreeCount[i] bySize[i].Mallocs += m.smallFreeCount[i] smallFree += m.smallFreeCount[i] * uint64(class_to_size[i]) } slow.Frees += m.tinyAllocCount + m.largeFreeCount slow.Mallocs += slow.Frees slow.TotalAlloc = slow.Alloc + m.largeFree + smallFree for i := range slow.BySize { slow.BySize[i].Mallocs = bySize[i].Mallocs slow.BySize[i].Frees = bySize[i].Frees }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 17:50:53 UTC 2024 - 46.1K bytes - Viewed (0) -
src/time/tick_test.go
runtime.GC() runtime.GC() runtime.GC() runtime.ReadMemStats(&stats) before := int64(stats.Mallocs - stats.Frees) for j := 0; j < N; j++ { f() } runtime.GC() runtime.GC() runtime.GC() runtime.ReadMemStats(&stats) after := int64(stats.Mallocs - stats.Frees) // Allow some slack, but inuse >= N means at least 1 allocation per iteration.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 11 17:10:37 UTC 2024 - 14.7K bytes - Viewed (0) -
src/net/rpc/server_test.go
func TestCountMallocs(t *testing.T) { if testing.Short() { t.Skip("skipping malloc count in short mode") } if runtime.GOMAXPROCS(0) > 1 { t.Skip("skipping; GOMAXPROCS>1") } fmt.Printf("mallocs per rpc round trip: %v\n", countMallocs(dialDirect, t)) } func TestCountMallocsOverHTTP(t *testing.T) { if testing.Short() { t.Skip("skipping malloc count in short mode") } if runtime.GOMAXPROCS(0) > 1 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jul 18 05:23:29 UTC 2023 - 19K bytes - Viewed (0) -
src/runtime/malloc_test.go
} } // Of the uint fields, HeapReleased, HeapIdle can be 0. // PauseTotalNs can be 0 if timer resolution is poor. fields := map[string][]func(any) error{ "Alloc": {nz, le(1e10)}, "TotalAlloc": {nz, le(1e11)}, "Sys": {nz, le(1e10)}, "Lookups": {eq(uint64(0))}, "Mallocs": {nz, le(1e10)}, "Frees": {nz, le(1e10)}, "HeapAlloc": {nz, le(1e10)}, "HeapSys": {nz, le(1e10)}, "HeapIdle": {le(1e10)},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 05 23:35:29 UTC 2023 - 10.6K bytes - Viewed (0) -
src/runtime/pprof/pprof.go
// Pprof will ignore, but useful for people s := memStats fmt.Fprintf(w, "\n# runtime.MemStats\n") fmt.Fprintf(w, "# Alloc = %d\n", s.Alloc) fmt.Fprintf(w, "# TotalAlloc = %d\n", s.TotalAlloc) fmt.Fprintf(w, "# Sys = %d\n", s.Sys) fmt.Fprintf(w, "# Lookups = %d\n", s.Lookups) fmt.Fprintf(w, "# Mallocs = %d\n", s.Mallocs) fmt.Fprintf(w, "# Frees = %d\n", s.Frees) fmt.Fprintf(w, "# HeapAlloc = %d\n", s.HeapAlloc)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 17:52:17 UTC 2024 - 30.6K bytes - Viewed (0) -
src/runtime/heapdump.go
// These ints should be identical to the exported // MemStats structure and should be ordered the same // way too. dumpint(tagMemStats) dumpint(m.Alloc) dumpint(m.TotalAlloc) dumpint(m.Sys) dumpint(m.Lookups) dumpint(m.Mallocs) dumpint(m.Frees) dumpint(m.HeapAlloc) dumpint(m.HeapSys) dumpint(m.HeapIdle) dumpint(m.HeapInuse) dumpint(m.HeapReleased) dumpint(m.HeapObjects)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 09 04:07:57 UTC 2024 - 17.6K bytes - Viewed (0)