- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 994 for Mallocs (0.1 sec)
-
src/testing/allocs.go
var memstats runtime.MemStats runtime.ReadMemStats(&memstats) mallocs := 0 - memstats.Mallocs // Run the function the specified number of times for i := 0; i < runs; i++ { f() } // Read the final statistics runtime.ReadMemStats(&memstats) mallocs += memstats.Mallocs // Average the mallocs over the runs (not counting the warm-up).
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 02 00:13:47 UTC 2016 - 1.4K bytes - Viewed (0) -
test/closure.go
memstats := new(runtime.MemStats) runtime.ReadMemStats(memstats) n0 := memstats.Mallocs x, y := newfunc(), newfunc() if x(1) != 1 || y(2) != 2 { println("newfunc returned broken funcs") fail = true } runtime.ReadMemStats(memstats) if n0 != memstats.Mallocs { println("newfunc allocated unexpectedly") fail = true } ff(1) if fail {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun Jul 01 17:59:50 UTC 2012 - 1.7K bytes - Viewed (0) -
pkg/ctrlz/topics/assets/templates/mem.html
<tr> <td>Lookups</td> <td id="Lookups">{{.Lookups}} lookups</td> <td>Number of pointer lookups performed by the runtime.</td> </tr> <tr> <td>Mallocs</td> <td id="Mallocs">{{.Mallocs}} objects</td> <td>Cumulative count of heap objects allocated.</td> </tr> <tr> <td>Frees</td> <td id="Frees">{{.Frees}} objects</td>
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue May 23 17:08:31 UTC 2023 - 7.2K bytes - Viewed (0) -
src/net/http/internal/chunked_test.go
} if err != io.ErrUnexpectedEOF { t.Fatalf("read error = %v; want ErrUnexpectedEOF", err) } }) if mallocs > 1.5 { t.Errorf("mallocs = %v; want 1", mallocs) } } func TestParseHexUint(t *testing.T) { type testCase struct { in string want uint64 wantErr string } tests := []testCase{ {"x", 0, "invalid byte in chunk length"},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jan 04 20:45:19 UTC 2024 - 8K bytes - Viewed (0) -
cmd/admin-server-info.go
Endpoint: addr, Uptime: UTCNow().Unix() - globalBootTime.Unix(), Version: Version, CommitID: CommitID, Network: network, MemStats: madmin.MemStats{ Alloc: memstats.Alloc, TotalAlloc: memstats.TotalAlloc, Mallocs: memstats.Mallocs, Frees: memstats.Frees, HeapAlloc: memstats.HeapAlloc, }, GoMaxProcs: runtime.GOMAXPROCS(0), NumCPU: runtime.NumCPU(),
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 4.9K bytes - Viewed (0) -
src/cmd/link/internal/benchmark/bench.go
fmt.Fprintf(w, "%s 1 %d ns/op", makeBenchString(curMark.name+gcString), dur.Nanoseconds()) fmt.Fprintf(w, "\t%d B/op", curMark.endM.TotalAlloc-curMark.startM.TotalAlloc) fmt.Fprintf(w, "\t%d allocs/op", curMark.endM.Mallocs-curMark.startM.Mallocs) if m.gc == GC { fmt.Fprintf(w, "\t%d live-B", curMark.gcM.HeapAlloc) } else { fmt.Fprintf(w, "\t%d heap-B", curMark.endM.HeapAlloc) } fmt.Fprintf(w, "\n") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jan 30 18:10:36 UTC 2023 - 4.7K bytes - Viewed (0) -
src/encoding/gob/timing_test.go
if err != nil { t.Fatal("encode:", err) } }) dec := NewDecoder(&buf) allocs := testing.AllocsPerRun(N, func() { *bench = Bench{} err := dec.Decode(&bench) if err != nil { t.Fatal("decode:", err) } }) if allocs != 3 { t.Fatalf("mallocs per decode of type Bench: %v; wanted 3\n", allocs) } } func benchmarkEncodeSlice(b *testing.B, a any) { b.ResetTimer()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 04 07:16:59 UTC 2023 - 6.5K bytes - Viewed (0) -
src/cmd/cgo/internal/testerrors/testdata/malloc.go
// causes it to fail. if runtime.GOOS == "dragonfly" { size = C.size_t(0x7fffffff << (32 * (^uintptr(0) >> 63))) } p := C.malloc(size) if p == nil { fmt.Println("malloc: C.malloc returned nil") // Just exit normally--the test script expects this // program to crash, so exiting normally indicates failure. }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 766 bytes - Viewed (0) -
test/codegen/alloc.go
Iskander Sharipov <******@****.***> 1546022404 +0300
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Feb 26 23:08:15 UTC 2019 - 902 bytes - Viewed (0) -
src/testing/allocs_test.go
if allocs := testing.AllocsPerRun(100, tt.fn); allocs != tt.allocs { t.Errorf("AllocsPerRun(100, %s) = %v, want %v", tt.name, allocs, tt.allocs) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 817 bytes - Viewed (0)