Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
794741b8
Commit
794741b8
authored
Sep 11, 2017
by
Péter Szilágyi
Committed by
GitHub
Sep 11, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #15124 from fjl/debug-gcpercent
internal/debug: add debug_setGCPercent
parents
10b3f97c
48705f8a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
api.go
internal/debug/api.go
+6
-0
web3ext.go
internal/web3ext/web3ext.go
+5
-0
No files found.
internal/debug/api.go
View file @
794741b8
...
...
@@ -181,6 +181,12 @@ func (*HandlerT) FreeOSMemory() {
debug
.
FreeOSMemory
()
}
// SetGCPercent sets the garbage collection target percentage. It returns the previous
// setting. A negative value disables GC.
func
(
*
HandlerT
)
SetGCPercent
(
v
int
)
int
{
return
debug
.
SetGCPercent
(
v
)
}
func
writeProfile
(
name
,
file
string
)
error
{
p
:=
pprof
.
Lookup
(
name
)
log
.
Info
(
"Writing profile records"
,
"count"
,
p
.
Count
(),
"type"
,
name
,
"dump"
,
file
)
...
...
internal/web3ext/web3ext.go
View file @
794741b8
...
...
@@ -267,6 +267,11 @@ web3._extend({
call: 'debug_freeOSMemory',
params: 0,
}),
new web3._extend.Method({
name: 'setGCPercent',
call: 'debug_setGCPercent',
params: 1,
}),
new web3._extend.Method({
name: 'memStats',
call: 'debug_memStats',
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment