Linux vmi284606.contaboserver.net 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Apache/2.4.57 (Ubuntu)
: 167.86.127.34 | : 216.73.217.31
Cant Read [ /etc/named.conf ]
7.2.24-0ubuntu0.18.04.17
root
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
local /
go /
src /
runtime /
pprof /
[ HOME SHELL ]
Name
Size
Permission
Action
internal
[ DIR ]
drwxr-xr-x
testdata
[ DIR ]
drwxr-xr-x
elf.go
2.79
KB
-rw-r--r--
label.go
2.55
KB
-rw-r--r--
label_test.go
2.53
KB
-rw-r--r--
map.go
1.94
KB
-rw-r--r--
mprof_test.go
5.35
KB
-rw-r--r--
pprof.go
27.24
KB
-rw-r--r--
pprof_test.go
34.46
KB
-rw-r--r--
proto.go
22.63
KB
-rw-r--r--
proto_test.go
16.25
KB
-rw-r--r--
protobuf.go
2.51
KB
-rw-r--r--
protomem.go
2.91
KB
-rw-r--r--
protomem_test.go
2.54
KB
-rw-r--r--
runtime.go
1.5
KB
-rw-r--r--
runtime_test.go
3
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : protomem_test.go
// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package pprof import ( "bytes" "runtime" "runtime/pprof/internal/profile" "testing" ) func TestConvertMemProfile(t *testing.T) { addr1, addr2, map1, map2 := testPCs(t) // MemProfileRecord stacks are return PCs, so add one to the // addresses recorded in the "profile". The proto profile // locations are call PCs, so conversion will subtract one // from these and get back to addr1 and addr2. a1, a2 := uintptr(addr1)+1, uintptr(addr2)+1 rate := int64(512 * 1024) rec := []runtime.MemProfileRecord{ {AllocBytes: 4096, FreeBytes: 1024, AllocObjects: 4, FreeObjects: 1, Stack0: [32]uintptr{a1, a2}}, {AllocBytes: 512 * 1024, FreeBytes: 0, AllocObjects: 1, FreeObjects: 0, Stack0: [32]uintptr{a2 + 1, a2 + 2}}, {AllocBytes: 512 * 1024, FreeBytes: 512 * 1024, AllocObjects: 1, FreeObjects: 1, Stack0: [32]uintptr{a1 + 1, a1 + 2, a2 + 3}}, } periodType := &profile.ValueType{Type: "space", Unit: "bytes"} sampleType := []*profile.ValueType{ {Type: "alloc_objects", Unit: "count"}, {Type: "alloc_space", Unit: "bytes"}, {Type: "inuse_objects", Unit: "count"}, {Type: "inuse_space", Unit: "bytes"}, } samples := []*profile.Sample{ { Value: []int64{2050, 2099200, 1537, 1574400}, Location: []*profile.Location{ {ID: 1, Mapping: map1, Address: addr1}, {ID: 2, Mapping: map2, Address: addr2}, }, NumLabel: map[string][]int64{"bytes": {1024}}, }, { Value: []int64{1, 829411, 1, 829411}, Location: []*profile.Location{ {ID: 3, Mapping: map2, Address: addr2 + 1}, {ID: 4, Mapping: map2, Address: addr2 + 2}, }, NumLabel: map[string][]int64{"bytes": {512 * 1024}}, }, { Value: []int64{1, 829411, 0, 0}, Location: []*profile.Location{ {ID: 5, Mapping: map1, Address: addr1 + 1}, {ID: 6, Mapping: map1, Address: addr1 + 2}, {ID: 7, Mapping: map2, Address: addr2 + 3}, }, NumLabel: map[string][]int64{"bytes": {512 * 1024}}, }, } for _, tc := range []struct { name string defaultSampleType string }{ {"heap", ""}, {"allocs", "alloc_space"}, } { t.Run(tc.name, func(t *testing.T) { var buf bytes.Buffer if err := writeHeapProto(&buf, rec, rate, tc.defaultSampleType); err != nil { t.Fatalf("writing profile: %v", err) } p, err := profile.Parse(&buf) if err != nil { t.Fatalf("profile.Parse: %v", err) } checkProfile(t, p, rate, periodType, sampleType, samples, tc.defaultSampleType) }) } }
Close